Shopify Supply theme sale price show wrong when product has not default variant

Solved
AvidBrio
Shopify Expert
231 12 18

 

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. 


If you find our comment helpful, hit the like button and accept it as a solution.
Want us to implement custom changes in your store? Contact us
Email me directly - jim@avidbrio.com
Accepted Solution (1)

Accepted Solutions
AvidBrio
Shopify Expert
231 12 18

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 %}
          
        
If you find our comment helpful, hit the like button and accept it as a solution.
Want us to implement custom changes in your store? Contact us
Email me directly - jim@avidbrio.com

View solution in original post

Reply 1 (1)
AvidBrio
Shopify Expert
231 12 18

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 %}
          
        
If you find our comment helpful, hit the like button and accept it as a solution.
Want us to implement custom changes in your store? Contact us
Email me directly - jim@avidbrio.com

View solution in original post