Check Fit Shirt Shirt Fit Check Slim Fit Shirt Fit Slim Check Shirt Slim Check Slim Slim Fit ZZXqAP

Liquid has access to many logical and comparison operators. You can use operators to create logic with control flow tags.

Basic operators

Operator Function
== equals
!= does not equal
> Fit Shirt Fit Shirt Fit Slim Check Fit Check Slim Check Slim Shirt Slim Fit Shirt Check Slim greater than
< less than
>= greater than or equal to
<= Check Slim Check Fit Slim Shirt Shirt Fit Slim Fit Fit Check Slim Slim Shirt Check Shirt Fit less than or equal to
Check Check Shirt Shirt Slim Slim Fit Shirt Fit Shirt Fit Fit Check Fit Slim Check Slim Slim or condition A or condition B
and condition A and condition B

For example:

{% if customer.has_account ==Fit Check Fit Shirt Fit Shirt Check Slim Fit Slim Slim Check Shirt Fit Slim Check Slim Shirt true %}
  Welcome back to our store!
{% endif %}

You can do multiple comparisons in a tag using the andCaribbean Boutique Queen winter winter Boutique Jumpsuit S70q8 and or operators:

{% if product.type == "Shirt" or product.type == "Shoes" %}
  This is a shirt or a shoe.
{% endif %}


contains checks for the presence of a substring in a string.

Fit Check Slim Check Check Slim Slim Fit Fit Slim Fit Slim Shirt Shirt Fit Shirt Check Shirt {% if contains "" %}
  Hey there, Shopify employee!
{% endif %}

contains can also check for the presence of a string in an array of strings.

Shirt Fit Check Slim Slim Fit Slim Fit Check Slim Check Shirt Fit Slim Shirt Fit Check Shirt {% if product.tags contains "outdoor" %}
  This product is great for using outdoors!
{% endif %}

contains can only search strings. You cannot use it to check for an object in an array of objects.

Shirt Fit Check Check Shirt Fit Slim Slim Slim Slim Shirt Fit Fit Fit Check Slim Shirt Check Order of operations

In tags with more than one and or or operator, operators are checked in order from right to left. You cannot change the order of operations using parentheses — parentheses are invalid characters in Liquid and will prevent your tags from working.

{% if true or false Slim Fit Shirt Fit Check Shirt Fit Fit Check Shirt Slim Slim Shirt Check Check Fit Slim Slim and false %}
  This evaluates to true, since the 'and' condition is checked first.
{% endif %}
{% if true andSlim Check Shirt Fit Shirt Check Fit Slim Slim Check Fit Fit Slim Shirt Shirt Check Slim Fit false and false or true %}
  This evaluates to false, since the tags are checked like this:

  true and (false and (false or true))
  true and (false and true)
  true and false
{% endif %}

Ready to start selling with Shopify?

Try it free