How to Get all active Catalog Rules collection Magento 2?

Magento 2 You can retrieve the active catalog rules of the system. Using Active rules, You can identify a number of rules that are active and working for the catalog category pages.

To identify, an active rule you need to filter the catalog collection by is_active field. Value 1 contains the active and 0 used to disable the rule in the system. Continue reading “How to Get all active Catalog Rules collection Magento 2?”

How to Get Catalog Price Rule collection by Rule name Magento 2?

You can get catalog price rule data by Rule name or title using Magento 2.

You need to get a rule name from the Catalog rule Grid from the admin panel and you can filter the collection of catalog rule by the name field. Continue reading “How to Get Catalog Price Rule collection by Rule name Magento 2?”

How to Delete Catalog Price Rule by rule id Magento 2?

You can delete catalog rule by rule id in Magento 2 using delete by id method of catalog rule repository interface.

You can see a list of available Catalog Price rules from the admin panel by Marketing -> Promotions -> Catalog Price rule. Continue reading “How to Delete Catalog Price Rule by rule id Magento 2?”