I want to add the discount percentage on product page. Please suggest the solution.
https://taoparis.in/collections/heels/products/may-tao-paris-heels?variant=42442750460100
I want to add the discount percentage on product page. Please suggest the solution.
https://taoparis.in/collections/heels/products/may-tao-paris-heels?variant=42442750460100
Hi @Mukuldm
I’m not sure what your product template liquid file name is, but if you know the file’s name, you can use this code to display the discount percentage on it.
{% if product.compare_at_price_max > product.price %}
{{ 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'}}% OFF
{% endif %}
not working for current variant.