Monday, June 29, 2020

How to Add Custom Column in Sales Order Grid of Magento 2

In Magento 2 store owner has the necessity of getting extra information like customer comments. But just receiving such information and saving it into the database is not helpful. Because all time you need to navigate in backend order details views to see selected information. Instead, adding one extra column in Backend Sales Order Grid will help you to have quick look at all useful information.


Firstly, we need to create a “sales_order_grid.xml” file at this path using the below code.
app\code\Webiators\OrderColumn\view\adminhtml\ui_component\

Now you have to create one more file “Mycolumn.php” at the following location.
app\code\Webiators\OrderColumn\Ui\Component\Listing\Column\

That’s it

No comments: