I am looking for a good working solution to prevent Magento 2.4 to apply catalogrules to products that have a special price.

When trying to do it via a plugin/override on getMatchingProductIds from Magento\CatalogRule\Model\Rule and then checking the product id's for special prices is costing a lot of time resulting in some rules taking over an hour.

1 Answer 1


One way you could do it is to put your discounted products in to a hidden category, then exclude that category from your catalog rules.

E.g, create a category "Discounted items", set "enabled" to false, then select the products with special prices. Update your catalogue rules Conditions to "Category IS NOT X".

You'll have to make sure all products are in the category, including all Simple products belonging to Configurable items.

  • 1
    While I would agree with this solution, it's not manageable for 1000 catalog rules and over 100k products. And very error prone. As people who create a new rule would always have to keep this in mind.
    – JJ15
    Commented Feb 10, 2023 at 7:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.