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!
User | RANK |
---|---|
22 | |
21 | |
13 | |
10 | |
8 |
Thanks to all Community members that participated in our inaugural 2 week AMA on the new E...
By Jacqui Mar 10, 2023Upskill and stand out with the new Shopify Foundations Certification program
By SarahF_Shopify Mar 6, 2023One of the key components to running a successful online business is having clear and co...
By Ollie Mar 6, 2023