Compare price...

kooger21
Excursionist
43 2 5

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

0 Likes
Natztech
Shopify Partner
1890 492 1170

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
PageFly Advanced Page Builder visit pagefly
0 Likes
kooger21
Excursionist
43 2 5
Wow, thanks.

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

Thanks anyway
0 Likes