Skip to content

Instantly share code, notes, and snippets.

View kathy330's full-sized avatar
🏠
Working from home

todayIsKathy kathy330

🏠
Working from home
View GitHub Profile
@kathy330
kathy330 / gist:e28e9ac435151dd90fe97f059383b290
Created August 29, 2019 02:53 — forked from kyleaparker/gist:5949872
Shopify - Show total savings on cart page
{% assign total_saving = 0 %}
{% for item in cart.items %}
{% if item.variant.compare_at_price > item.variant.price %}
{% capture saving %}{{ item.variant.compare_at_price | minus: item.variant.price }}{% endcapture %}
{% assign total_saving = saving | plus: total_saving %}
{% endif %}
...rest of cart code within for loop
{% endfor %}
Display saving: