Show Percentage on Sale items on Debut Theme

Highlighted
New Member
1 0 1

Hi Shopify Team,


Can you please help me add code in my website to show sale percentage on product images? 

Regards.

1 Like
Highlighted
Shopify Expert
3692 550 893

Hi @kh_funkyIreland 

You can follow this article to show % on product.

 

Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
0 Likes
Highlighted
New Member
2 0 0

Hi there,

I was unable to locate the '{{ product. price }}' in the 'product.liquid'  (please see attached as reference).

Robert.

Debut themeDebut theme

0 Likes
Highlighted
Shopify Expert
3692 550 893

You have to find in section->product-template.liquid file 

Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
0 Likes
Highlighted
New Member
2 0 0

Thank you, it worked. However, the percentage is fixed to 67%?

{% if product.compare_at_price_max > product.price %}You save {{ product.compare_at_price_max | minus: product.price | times: 100.0 | divided_by: product.compare_at_price_max | money_without_currency | times: 100 | remove: '.0'}}%{% endif %}

 

Screen Shot 2020-08-14 at 3.57.48 pm.pngScreen Shot 2020-08-14 at 3.58.04 pm.png

0 Likes
Highlighted
Shopify Expert
3692 550 893

Its liquid code so must work for first variant not on variant change. if you want to change base on variant changes then need Js code to manage it. 

Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
0 Likes