Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

shopify cart show total save

{% 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 }}
 
PREVIOUS NEXT
Tagged: #shopify #cart #show #total #save
ADD COMMENT
Topic
Name
2+3 =