How to show "total savings" on cart and checkout page?

New Member
1 0 0

Hello Shopify community,


I'm looking to add "total savings" onto the cart and checkout page of one of my client's store.

Essentially, once a visitor is on the cart and checkout page. I want to show the amount they've saved from items being on sale.

How can I make this happen? If I need professional help to do so. I'm totally fine with that. 


This is a new store and we're using Debut theme.


Thank you


Shopify Partner
24 0 12

You can print total savings on the cart page using below code.


{% assign total_saving = 0 %}
{% for item in cart.items %}
  {% if item.variant.compare_at_price > item.variant.price %}
  	{% assign saving = item.variant.compare_at_price | minus: item.variant.price | times: item.quantity %}
  	{% assign total_saving = saving | plus: total_saving %}
  {% endif %}
{% endfor %}

You Saved: {{ total_saving }}


For showing the saving total on the checkout page, you need an Shopify plus account to make any changes or need to depend on some paid apps.