Hello Magento Friends,

Today’s guide is about How to Add Custom Field in Catalog Price Rule Form in Magento 2?

Catalog price rules are created when merchants want to offer discounts on store products or services. Store owners set rules that must be fulfilled to avail discounts.

Learn – How to Create a Catalog Price Rule in Magento 2

While creating catalog price rules from the Magento 2 backend, the admin needs to apply the required configuration settings. But if you want a custom field in creating catalog price rules, refer to the below steps.

Steps to Add Custom Field in Catalog price Rule Form in Magento 2:

Step 1: Add a custom field in the catalog rule table with db_schema.xml. Navigate to the following path


Now, add the below code

Step 2: Create catalog_rule_form.xml  file inside ui_component. Go to the below path


Then, add the code as follows


Hence, this way you can add any custom field to the catalog price rule form in Magento 2. If you are unable to add a custom field to the catalog price rule, let me know through the comment section. Share the article with your friends and stay updated with us for more solutions.

Happy Coding!

Click to rate this post!
[Total: 0 Average: 0]