Last active
May 25, 2016 06:19
-
-
Save davelowensohn/d5dc71d52339281be5999c4bf64068d0 to your computer and use it in GitHub Desktop.
Shopify cart item tags contain one or more
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% 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