Liquid, JavaScript, themes, sales channels
I have 2 arrays and I want to validated if any element in array1 equals any element in array 2.
Specifically, if any customer tags equals any tags in list of tags held in comma separated metafield.
Solved! Go to the solution
This is an accepted solution.
You should only need to loop through the customer tags, and check if the metafield contains the tag:
{% for tag in customer.tags %}
{% if your.metafield contains tag %}
<!-- Do stuff -->
{% endif %}
{% endfor %}
This is an accepted solution.
You should only need to loop through the customer tags, and check if the metafield contains the tag:
{% for tag in customer.tags %}
{% if your.metafield contains tag %}
<!-- Do stuff -->
{% endif %}
{% endfor %}
Ah, yes! Thank you!
Are you ready to take your business to the next level? Look no further than the latest ...
By SarahF_Shopify Apr 15, 2024We’re keeping the ball rolling to make sure you’re always ahead of the game. So buckle ...
By JasonH Apr 8, 2024Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024