Hello,
I’m working on a client’s wesbite, and currently the site is showing the wrong price - it’s just repeating the sale price, rather than showing the original price - which should be £30.
Here is the URL: https://nimblebabies.com/products/new-parents-gift-set
And the code for the product-card.liquid:
{% comment %}
Renders a product card using "Grid" style
Accepts:
- max_height: {Number} Maximum height of the product's image (required)
- product: {Object} Product Liquid object (required)
- show_vendor: {Boolean} Show the product's vendor depending on the section setting (optional)
Usage:
{% include 'product-card-grid', max_height: max_height, product: product, show_vendor: section.settings.show_vendor %}
{% endcomment %}
- {{ product.title }}
{% capture img_id %}ProductCardImage-{{ section.id }}-{{ product.id }}{% endcapture %}
{% capture wrapper_id %}ProductCardImageWrapper-{{ section.id }}-{{ product.id }}{% endcapture %}
{%- assign preview_image = product.featured_media.preview_image -%}
{%- assign img_url = preview_image | img_url: '1x1' | replace: '_1x1.', '_300x.' -%}
{{ product.title }}
{%- liquid
if product.title
assign compare_at_price = product.compare_at_price
assign price = product.price
assign available = product.available
assign variant = product.variants.first
else
assign compare_at_price = 1999
assign price = 1999
assign available = true
endif
assign money_price = price | money
-%}
<dl>
{% if show_vendor and product %}
<dt>
{{ 'products.product.vendor' | t }}
</dt>
<dd>
{{ product.vendor }}
</dd>
{% endif %}
{%- comment -%}
Explanation of description list:
- div.price__regular: Displayed when there are no variants on sale
- div.price__sale: Displayed when a variant is a sale
- div.price__unit: Displayed when the first variant has a unit price
- div.price__availability: Displayed when the product is sold out
{%- endcomment -%}
<dt>
{{ 'products.product.regular_price' | t }}
</dt>
<dd>
{%- if product.price_varies -%}
{{ 'products.product.from_lowest_price_html' | t: lowest_price: money_price }}
{%- else -%}
{{ money_price }}
{%- endif -%}
</dd>
<dt>
{{ 'products.product.sale_price' | t }}
</dt>
<dd>
{%- if product.price_varies -%}
{{ 'products.product.from_lowest_price_html' | t: lowest_price: money_price }}
{%- else -%}
{{ money_price }}
{%- endif -%}
</dd>
<dt>
{{ 'products.product.regular_price' | t }}
</dt>
<dd>
<s>
{{ compare_at_price | money }}
</s>
</dd>
<dt>
{{ 'products.product.unit_price_label' | t }}
</dt>
<dd>
{%- capture unit_price_separator -%}
/{{ 'general.accessibility.unit_price_separator' | t }}
{%- endcapture -%}
{%- capture unit_price_base_unit -%}
{%- if variant.unit_price_measurement -%}
{%- if variant.unit_price_measurement.reference_value != 1 -%}
{{- variant.unit_price_measurement.reference_value -}}
{%- endif -%}
{{ variant.unit_price_measurement.reference_unit }}
{%- endif -%}
{%- endcapture -%}
{{ variant.unit_price | money }}{{- unit_price_separator -}}{{- unit_price_base_unit -}}
</dd>
{{ 'products.product.on_sale' | t }}
{{ 'products.product.sold_out' | t }}
</dl>
Do you know what the issue might be?
Many thanks.
