I have products that have a zone as a tag. For those products that meet the tag, an “Available in:” message is displayed, followed by the tag (See photo1)
What I want is that the products that do not have the zone tag do not show the “Available in:” message. Since the message is empty and I want to validate that the message is not displayed if the product does not have the zone tag (See photo2)
I am using the following code:
Available in:
{% assign allowedTags = 'SANTA CRUZ, LA PAZ, CBBA' | split:',' %}
{% for tag in product.tags %}
{% if allowedTags contains tag %}
{{ tag }}
{% endif %}
{% endfor %}

