Pergunta

What happens with 2 (or more) (catalog/shopping cart) price rules with the same priority?
Which one will be applied first?

Foi útil?

Solução

There is no way to determine for sure what is the order of the rules if they have the same priority. In this case the rules are retrieved as MySQL want's it and it may not be always the same order. The order can be different depending even on the MySQL version. See this answer here (and comments). These guys really know what they are talking about. I had the same issue/question before and during tests I got strange results for different items in the cart. I've even got lost in the numbers when I had combinations of rules that were applied on a specific item and on the full cart.
Conclusion Always specify priorities to rules that might affect the same product.

Outras dicas

I believe what happens is they are applied in the order they were created, by merit of them being sorted that way when they are loaded for calculation.

This behaviors should not be relied on, however, and rather the priority numbers should be updated to reflect the desired order where it makes a difference.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a magento.stackexchange
scroll top