How to Display Discount Percentage and Savings on product page DAWN THEME

enovation
New Member
6 0 0

How can we display the percentage of the discount and the amount saved in the product page like the image below:

 

save.PNG

Replies 2 (2)

deepaksharma
Shopify Partner
448 62 92

You can Paste below code 

{%- assign savings = product.selected_or_first_available_variant.compare_at_price
      | minus: product.selected_or_first_available_variant.price
      | times: 100.0
      | divided_by: product.selected_or_first_available_variant.compare_at_price
      | round
      | append: '%'
    -%}
    <p>You Save {{ savings }} (${{ product.compare_at_price | minus: product.price | divided_by: 100 }}.00)</p>

If it does not helps contact me: ds2305187@gmail.com

Deepak Sharma || Shopify Developer || Helping eCommerce Stores
- Was my reply helpful? Accept it as solution
- Was your question answered? Mark it as an Accepted Solution.
-CHAT ON WHATSAPP | BUY ME A COFFEE | MAIL ME: ds2305187@gmail.com
enovation
New Member
6 0 0

Hello @deepaksharma , paste the code in which section?