Display collection of Shopping cart rules and products categories associated to each rule

前端 未结 4 523

I want to check if there is a sales promotion on the product then stick the promotion label on that product on category list page. But I don\'t know how to loop through all

4条回答
  •  执念已碎
    2021-01-06 10:26

    The rules are associated to all product for a website. There is no rules set for a specific products/categories from the database point of view. For each product in the cart, Magento will validate all the rules you have for a website. This operation is done in the class Mage_SalesRule_Model_Validator. The only way to solve your request is to extend the function process from this class (at least I think so :p).

提交回复
热议问题