Develo Design


Magento catalog price rules not applying conditions to bundle products correctly

I recently found an issue on a Magento 1 site where no matter what I tried, product SKU, product attribute in any combinations the product would always get the discount rule applied and the customer group would receive a discount on a product the merchant did not want discounted.

Simple products worked fine but there seems to be a bug for bundle products. We tried to add exclusions for the simple product and the bundle product but whenever the rule was applied again the bundle was always discounted.

So the following solution was found to fix the issue without spending too much more time working out why the rules conditions were not being checked correctly.

I wrote a small bit of code that checks a category which I setup not in the navigation called ‘Do not discount’. This category can then be used by the merchant to add any products they want. After being added this product can never be discounted by any catalog price rules.

As a simple fix add the following code.

Implement the following code by attaching an event observer to the catalogrule_before_apply event.

With $exclusionCategoryId being the category you can place product that will always be excluded.


Loading Disqus Comments ...
Loading Facebook Comments ...

Post Comment

Your email address will not be published. Required fields are marked *

Discuss My Project

We want to hear about your project! Provide us with a few details and we’ll get back to you for a chat.