Cart ‘you saved’ message

Solved
New Member
52 0 0
Hello all,

I am attempting to add a message to my cart which displays the amount a person saved on each line item.
For example if the customer has 3x white t-shirt in the cart it displays the total saved just for the white t-shirt, then underneath the same for a black t-shirt etc etc.

I already have this set up and working fine for the total amount saved but would also like it per cart line, any help appreciated!
0 Likes

Success.

Shopify Expert
2529 424 535

Hi @DEAUXTECH 

Add bellow condition in your cart page item loop.

{% if item.variant.compare_at_price %}
 <span>Save: </span>{{ item.variant.compare_at_price | minus: item.variant.price | times: 100.0 | divided_by: item.variant.compare_at_price | round }}}
{% endif%}
Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
1 Like
New Member
52 0 0

Just implemented this and it worked perfectly, Thanks!

0 Likes
New Member
6 0 0

Could you explain please to where  exactly I should insert this code? Thanks

0 Likes
Shopify Expert
2529 424 535

You have to add this code in your section->cart-template.liquid file inside item loop

Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
0 Likes