Hi There,
I’m trying to create a variable and depending on the condition, assign and concatenate various string slogans. Here’s what I have so far in liquid – unfortunately, it’s not working but I’m hoping someone can guide me to get the code below to work properly.
Much appreciated in advance!
Best,
CF.
{% for tagID in product.tags %}
{% assign cf_tag_name = '' %}
{% if tagID contains 'deal' %}
{% cf_tag_name = 'Awesome Buy' %}
{% endif % }
{% if tagID contains 'eggs' %}
{% cf_tag_name = cf_tag_name | append: ' + Free Range' %}
{% endif % }
{{ cf_tag_name }}
{% endfor %}