Show Price, Compare Retail Price, Savings in Amount and Percentage

attotasolutions
Shopify Partner
24 0 12

Hi
This might be helpful to other developers.

Here is the script to show savings amount and percentage on product pages.

Product Price: {{ product.price | money }}
Compare Retail Price: {{ product.compare_at_price_max | money }}
You save: {{ product.compare_at_price_max | minus:product.price | difference:product.compare_at_price_max | money }}
You save: {{ product.compare_at_price_max | minus:product.price | times:100 | divided_by:product.compare_at_price_max }}%
0 Likes