Liquid, JavaScript, themes, sales channels
Shopify Supply theme sale price show wrong when product has not default variant
theme/sections/product-template.liquid
{% if product.compare_at_price_max > product.price and section.settings.product_show_saved_amount %}
<li>
<span id="comparePrice-{{ section.id }}" class="sale-tag large">
{% assign compare_price = variant.compare_at_price %}
{% assign product_price = variant.price %}
{% include 'price-sale' %}
</span>
{% endif %}
</li>
{% endif %}
don't show the correct sale price.
Solved! Go to the solution
This is an accepted solution.
here is solution
{% if product.compare_at_price_max > product.price and section.settings.product_show_saved_amount %}
<li>
{% if product.price_varies %}
<span id="comparePrice-{{ section.id }}" class="sale-tag large">
{% assign compare_price = variant.compare_at_price %}
{% assign product_price = variant.price %}
{% include 'price-sale' %}
</span>
{% else %}
<span id="comparePrice-{{ section.id }}" class="sale-tag large">
{% assign compare_price = product.compare_at_price %}
{% assign product_price = product.price %}
{% include 'price-sale' %}
</span>
{% endif %}
</li>
{% endif %}
This is an accepted solution.
here is solution
{% if product.compare_at_price_max > product.price and section.settings.product_show_saved_amount %}
<li>
{% if product.price_varies %}
<span id="comparePrice-{{ section.id }}" class="sale-tag large">
{% assign compare_price = variant.compare_at_price %}
{% assign product_price = variant.price %}
{% include 'price-sale' %}
</span>
{% else %}
<span id="comparePrice-{{ section.id }}" class="sale-tag large">
{% assign compare_price = product.compare_at_price %}
{% assign product_price = product.price %}
{% include 'price-sale' %}
</span>
{% endif %}
</li>
{% endif %}
Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024Digital marketers and app developers have tracked activity in apps and websites for yea...
By Ollie Mar 13, 2024February was an exciting month with Shopify Editions, informative webinars, and more! F...
By JasonH Mar 7, 2024