FROM CACHE - en_header

Compare price...

kooger21
Explorer
81 2 18

Hi 

In the highlighted section below I would like a calculation that works out the percentage savings and display it.

So in the example below it would say - You Save 50%

https://worldofpaws.store

Thanks

 

Capture.JPG

Replies 2 (2)
Kinjaldavra
Shopify Partner
2302 569 1407

hello @kooger21 

{% 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'}}% {% endif %}

Want to theme customize contact us E-mail : natztech2312@gmail.com | Whatsapp
Build your professional store with GemPage Page Builder
kooger21
Explorer
81 2 18
Wow, thanks.

Might not be something I will be able to do myself and sounds a little complicated.

Thanks anyway