How to Add New Field in Cart Price Rules Form in Magento 2 Backend

How to Add New Field in Cart Price Rules Form in Magento 2 Backend

Magento 2 CMS is popular among store merchants due to its capability of customization to satisfy custom business requirements.

Today, I will talk about one such customization to add new field in cart price rules form in Magento 2 backend.

The admin can use the below programmatic solution to add a new custom field in the cart price rules form in the admin panel of Magento 2.

For instance, while using any third-party APIs for offers, you need to pass any data and for that, you require adding a custom field.

Any such requirements can be done using the below method:

Method to Add New Field in Cart Price Rules Form in Magento 2 Backend:

  1. Create UpgradeSchema.php file at app\code\Meetanshi\Mtapi\Setup\

    2. Create sales_rule_form.xml file at app\code\Meetanshi\Mtapi\view\adminhtml\ui_component\

That’s it.

Any doubts? Do mention them in the Comments section below.

I would be glad to help you out.

Also, please share the solution with Magento Community via social media.

Thank you.

Related PostHow To Add Magento Shopping Cart Price Rules

Get Weekly Updates

Never miss Magento tips, tricks, tutorials, and news.

Thank you for subscribing.

Something went wrong.

5
(based on 3 Reviews)

An expert in his field, Jignesh is the team leader at Meetanshi. His passion for Magento has inspired others in the team too. Apart from work, he is a cricket lover.

Leave a reply:

Your email address will not be published.