Catalog Expressions using AND and OR
The following Note appears in the Commerce Server 2002 dcoumentation regarding Discount awards.
Note When using the Catalog Expression Builder in Commerce Server 2002, both AND and OR cumulative conditions are allowed, but only the OR condition is supported for discounts. The AND condition is not supported and should not be used.
It has become painfully obvious that this note needs some clarification:
The limitation in the note has to do with using AND in the catalog expression for a discount. Since the expressions are evaluated against one line item at a time, it is not possible to use compound conditions; they will never evaluate to true. For example: Buy a product where SKU=A and SKU=B -> get discount will never evaluate to true against any line item since a product can only have one SKU. It is perfectly valid to use AND when more than once criteria exists for the same product. For example: Buy a product where Manufacturer=Sony and Price>$200 -> get discount. Note that ‘OR’ doesn’t present a problem - Buy a product where SKU=A or SKU=B -> get discount (where either SKU is a valid condition for the discount).