If "doesn't contains"

New Member
2 0 0

Hello,

 

I would like to create a condition : if product.title doesn't contains 'a word'

 

I know for contains : if product.title contains 'a word'

But for "doesn't contains" what is it ?

 

Thank you!

0 Likes
Shopify Partner
440 84 96

Helo Mao,

Use

{% if product.title contains "word" %}{% else %}YOUR CODE HERE{% endif %}

or

{% unless product.title contains 'word' %}
  Your code here
{% endunless %}
Want to modify or custom changes on store hire me.
My Email: guleriathakur43@gmail.com
Skype: navrocks1
If helpful then please Like and Accept Solution.
If you are happy and want to donate small Click here (Its my paypal)
0 Likes
New Member
2 0 0

I'm an idiot! I hadn't thought of that.

 

Thank you very much!

0 Likes