Hello,
Use this ( paste in top of product-form.liquid )
{% assign has_z = 0 %}
{% for collection in product.collections %}
{% if collection.handle == 'your-collection-handle' %}
{% assign has_z = has_z | plus: 1 %}
{% endif %}
{% endfor %}
Note: Change 'your-collection-handle' to actual you collection handle
now wrap your text in this condition
{% if has_z >= 1 %}
// Your text will go here
{% endif %}
Thanks
If you want to use it with multiple collection then use logical 'or' operator.
Here you can check more about logical operator.
User | Count |
---|---|
867 | |
113 | |
102 | |
98 | |
73 |