Adding "You Save X% ($X)" under my product price

Highlighted
New Member
5 0 0

Hi

I want to add "You Save X% ($X)" under my product price on my product page.

Running Debutify theme.

Please help! :)

0 Likes
Highlighted

Hello Essers,
Add this code at the bottom of
Online Store->Theme->Edit code->Snippets->product.price.liquid

<div class="you-save">
        {% if product.compare_at_price_max > product.price %}"You save {{ 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'}}% ({{ product.compare_at_price_max | minus: product.price|money}})"{% endif %}
</div>
Want to modify or incorporate custom changes on store, Hire us
If helpful then please Like and Accept Solution .
Email: pallavi@oscprofessionals.com
Skype : oscprofessionals-87
Whats app
Free Website Review and advice for sale from Shopify Conversion Experts | Shopify Private App | Custom Theme Development | Custom Modifications In To Shopify Theme | Shopify SEO ; Digital Marketing & amp | Site Speed Optimization | Performance Site Audit
0 Likes
Highlighted
New Member
5 0 0

It shows fine but the calculations are all wrong

0 Likes
Highlighted

Hello Essers,
Refer below link for more help:

https://www.blackbeltcommerce.com/shopify-how-to-show-percentage-discount-saved/
Want to modify or incorporate custom changes on store, Hire us
If helpful then please Like and Accept Solution .
Email: pallavi@oscprofessionals.com
Skype : oscprofessionals-87
Whats app
Free Website Review and advice for sale from Shopify Conversion Experts | Shopify Private App | Custom Theme Development | Custom Modifications In To Shopify Theme | Shopify SEO ; Digital Marketing & amp | Site Speed Optimization | Performance Site Audit
0 Likes
Highlighted
New Member
5 0 0

Ok - I got that part figured out, the maths is correct!

Now, how do I make it change when the variant is changed?

0 Likes