### 8.4.3.2 Conditions

 8.4.3.2.2 Negation  <<  8.4.3.2.3  >>  8.4.3.2.4 Right operand

# 8.4.3.2.3 Operator

The operator determines in which way the left operand is compared to the right operand of the condition. The operators are grouped based on their type:

• Text operators: For comparing text values.

• Numeric operators: For comparing numeric values.

Depending on the condition type (i.e. the left operand), all or only some types of operators may be used. For example, cart total price is a numeric value, so only a numeric operator can be used. Product's open field 1, on the other hand, can have the values "123" and "foobar". The first value can be compared with a numeric operator (and with a text operator), but the second value can not. When a numeric operator is used in the comparison, and the left operand accepts both number and text values, then the property value defined by the left operand is converted to a number before the comparison. A dot ( . ) in the converted value is considered to be a decimal separator.

When the left operand is such that it accepts more than one type of operator, then it must be decided which operator actually makes sense in the expression. This depends entirely on the shop setup (i.e. the contents of product cards), and no general rules can thus be given. It is important to note that if the operator's type is such that it can not be used to compare the value of the left operand to the value of the right operand, then the condition will evaluate to false. For example, if a numeric operator were used to compare product's open field 1 value (the left operand) to the number "100" (the right operand), but some product had the text "foobar" in open field 1, then the condition would evaluate to false for this product.

If more than one type of operator can be used, make sure that the chosen type is suitable in the expression.

 Name Description Equals Are the values equal. Equals (ignore case) Are the values equal, ignoring case. Starts with Does the left value start with the right value. Ends with Does the left value end with the right value. Contains Does the left value contain the right value.
 Table 8.1 : Text operators

 Name Description Equals Are the values equal. Greater than Is the left value greater than the right value. Less than Is the left value less than the right value.
 Table 8.2 : Numeric operators