Created
May 11, 2020 14:52
-
-
Save loughlincodes/367edfdffb24430d3672b4b85d786dd8 to your computer and use it in GitHub Desktop.
Check if a product is in a particular collection (shopify)
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 found = false %} | |
{% for c in product.collections %} | |
{% if c.handle=='merchandise' %} | |
{% assign found = true %} | |
{% endif %} | |
{% endfor %} | |
{% if found %} | |
... do stuff ... | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment