{% assign found = false %} {% for c in product.collections %} {% if c.handle == "secret-sauce" %} {% assign found = true %} {% endif %} {% endfor %} {% if found == true %} <h1>You found the secret sauce!</h1> {% endif %}
{% assign found = false %} {% for c in product.collections %} {% if c.handle == "secret-sauce" %} {% assign found = true %} {% endif %} {% endfor %} {% if found == true %} <h1>You found the secret sauce!</h1> {% endif %}