Changing Compare At Price For Supply Theme

Highlighted
New Member
1 0 0

Hi guys,

I know this topic has been brought up in the past but I have searched all over for threads to help me out but none have been capable of doing so. I am trying to change the compare at price template for the supply theme from saying "Save $xx" to showing the sales price and crossing out the original price. I tried messing with the HTML/CCS myself but I couldn't figure it out.

Thanks in advance.

0 Likes
Shopify Partner
2433 0 436

You can relatively easy change this for collection pages. You will need to change the price-sale.liquid  snippet. Look for the following at the bottom:

{{ 'products.general.save_html' | t: saved_amount: saved_amount }}

{% comment %}
{% if compare_price > product_price %}
  Save {{ compare_price | minus: product_price | times: 100 | divided_by: compare_price | round }}%
{% endif %}
{% endcomment %}

and replace it with the following:

{% comment %}
{{ 'products.general.save_html' | t: saved_amount: saved_amount }}
{% endcomment %}

{% if compare_price > product_price %}
 <span style="text-decoration:line-through;">
  {{ product_price | money_without_trailing_zeros }}
 </span>
{% endif %}

Then style it as you want with CSS.

However, changing the discount display for the product page as well will require digging deeper in javascript files. You may consider using the Debut theme, where this display is default.

Want to hire me to tweak a theme? Mail me at tairli@yahoo.com! My post solved your problem? This is my Paypal too :)
0 Likes
New Member
1 0 0

{{ product_price | money_without_trailing_zeros }}

 

Change with 

 

{{ compare_price | money_without_trailing_zeros }}

0 Likes