Skip to content

Instantly share code, notes, and snippets.

@davelowensohn
Last active May 25, 2016 06:19
Show Gist options
  • Save davelowensohn/d5dc71d52339281be5999c4bf64068d0 to your computer and use it in GitHub Desktop.
Save davelowensohn/d5dc71d52339281be5999c4bf64068d0 to your computer and use it in GitHub Desktop.
Shopify cart item tags contain one or more
{% assign finalsale_in_cart = false %}
{% for item in cart.items %}
{% capture tag_pile %}
{% for tag in item.product.tags %}
{{ tag }}
{% endfor %}
{% endcapture %}
{% if tag_pile contains 'Jewelry' or tag_pile contains 'Swim' or tag_pile contains 'Intimate' %}
{% assign finalsale_in_cart = true %}
<div class="final-sale-warning-cart">{{settings.finalsale.warning}}</div>
{% endif %}
{% if finalsale_in_cart %}
<div class="final-sale-message">{{settings.finalsale.message}}</div>
{% endif %}
{% endfor %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment