how to show % of discount

Anonymous
Not applicable
1628 0 0

Hello, I need the % discount next to the discount price. URL cosantiboutique.it

I already tried this code but it doesn't work or maybe I put it in the wrong place. Can somebody help me?

{% capture discount %}
{{ product.compare_at_price_max | minus:product.price | times:100 | divided_by:product.compare_at_price_max }}%
{% endcapture %}

 

0 Likes

I had a youtube video talking about this problem before, please check it out https://youtu.be/A6shsWjABNg

Visit my Shopify Youtube channel to learn how to code your Shopify store and fix various coding issues on Shopify.(subscribe if you like it :)).
Glad to help out and wish your Shopify store great success.
0 Likes
Anonymous
Not applicable
1628 0 0

I'm using another theme

0 Likes