Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
This is an accepted solution.
@labelnumaani Add the below code just in your price snippet where you want to display the % off.
{% 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'}}%
{% endif %}
@labelnumaani Hope you are doing well.
Could you please share your store URL? and also share which theme you are using.
This is an accepted solution.
@labelnumaani Add the below code just in your price snippet where you want to display the % off.
{% 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'}}%
{% endif %}
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025