Use Magento Rules properly: common mistakes corrected

If you’re an experienced Magento user, go and do some weekend reading on BuzzFeed! Because this article is for Magento newbies.

Setting Magento Table Rates, Promotions and various restrictions is an important part of managing a fully-functional Magento shop. That’s why our clients ask questions about Magento rules very often, and to help them use rules logic properly, we collected several mistakes that can be most often found in Amasty support queries.

1. ‘IS’ in condition with lists

IS in conditions - wrong variant
If you use conditions as in the picture above, Magento will search for ‘17,15,12,44’ category ID. Naturally, we don’t have such a category, and we actually need another result. Here’s the right variant:

IS in conditions - correct

Here Magento will be searching for these IDs: ’17’, ’15’, ’12’, and the rule will work as desired.

2. Compare with zero

Compare with zero in Magento rules - wrong

At first sight this condition looks legit. But there’s a technical issue: basically, you should avoid comparing with zero everywhere in Magento, not only in promotions or shipping rules.

The following condition is identical logically and, what is more important, it will work correctly.

Compare with zero in Magento rules - correct

 3. ‘greater than’ condition operator

Sometimes people use > or < symbols to describe amount comparison relations, but Magento won’t understand them properly. Use a special conditions operator instead:

Greater than conditions operator in MagentoGreater than conditions operator - correct






4. Range/list

Very often we notice that Magento shop owners use ‘range’ when they need Magento to apply something to a list of items. This is wrong, and Magento won’t understand this combination as a range. You need to list items (in our case – SKUs) one by one using a comma. And yes, ‘is/is one of’ case shown once again.
Range/list in Magento conditions
Range/list in Magento conditions - correct

5. Default shipping address vs Shipping state/Province

Names can’t be used with default shipping address, you need to use the default shipping ID instead. Literal location names are used with Shipping state/province entities.

Default shipping address condition in Magento - wrongShipping address condition in Magento - correct





We do hope this information will be helpful for you, and you’ll never make these mistakes again! If you have any other questions on typical conditions logic mistakes, welcome to ask.