Show Percentage on Sale items on Debut Theme

Highlighted
New Member
1 0 2

Hi Shopify Team,


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

Regards.

Highlighted
Shopify Expert
3913 559 940

Hi @kh_funkyIreland 

You can follow this article to show % on product.

 

Want to modify or custom changes on store hire me.
Want to give Gift for time? its my Paypal too.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com Or WhatsApp
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
Highlighted
New Member
2 0 1

Hi there,

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

Robert.

Debut themeDebut theme

Highlighted
Shopify Expert
3913 559 940

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

Want to modify or custom changes on store hire me.
Want to give Gift for time? its my Paypal too.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com Or WhatsApp
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
Highlighted
New Member
2 0 1

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
3913 559 940

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.
Want to give Gift for time? its my Paypal too.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com Or WhatsApp
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
0 Likes