Is it possible to put multiple conditions inside a single if statement in Shopify Liquid?
For example this is what I have:
{% if product.type != "A" and product.type != "B" and product.type != "C" %}
//do something
{% endif %}
The reason I'm wondering is because syntax highlighting stops after the first "and" operator, as if everything after that has incorrect syntax.
Your syntax is 100% valid and will work in Shopify
{% if product.type != "A" and product.type != "B" and product.type != "C" %}
//do something
{% endif %}
I guess the editor what you are using has a bug in syntax highlighter for liquid. That's why you confused
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With