How to Add Custom Mass Action in Order Grid in Magento 2

How to Add Custom Mass Action in Order Grid in Magento 2

The admin grids in Magento 2 backend are an easy way to manage data, sort, edit, filter, or delete it.

The admin grids are well-equipped with mass actions such as Cancel, Print, Delete, etc.

The default Magento 2 order grid mass action looks something like this:

Default Magento 2 Order Grid Mass Action

However, increasing business innovations and urgency to complete the task lists have compelled the developers to customize the admin grids and add mass actions to get things done quickly.

Talking about the standard Magento 2 order grid, it’s mass actions is pretty much enough for basic order management tasks. But we are not satisfied with the basics, are we!

Therefore, I’ve come up with a programmatic solution to add custom mass action in order grid in Magento 2.

Adding custom mass action in Magento 2 order grid will allow the store admins to:

  • Process orders efficiently
  • Convenience in order management
  • More work, less time
  • Less dependency on the developers

Using Magento 2 UI components, one can add new mass action to the existing order grid in Magento 2 as shown below:

Method to Add Custom Mass Action in Order Grid in Magento 2:

Create sales_order_grid.xml file at app\code\Vendor\Extension\view\adminhtml\ui_component\

That’s it.

It is an example to add “Print Order Preparation” mass action in the order grid as shown below:

Custom Mass Action in Magento 2 Order grid - Meetanshi

You can refer the same for adding custom mass actions to order grid as per your Magento 2 project requirements!

Meanwhile, you can use the Comments section below if you have any doubts. I’d be happy to help you out.

Also, do share this useful solution with Magento 2 store admins and developers via social media.

Thank you.

(based on 2 Reviews)

An expert in his field, Jignesh is a senior Magento developer 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.

(based on 5 Reviews)