65 votes
Accepted

Magento 2 How to Add a New Column to Orders Grid

After lots of digging into Magento's core code, I found a solution to my question. Instead of adding a column to the grid via the database, I created a UI component sales_order_grid.xml under [...
André Ferraz's user avatar
43 votes

Magento 2 How to Add a New Column to Orders Grid

My solution may be a bit more efficient since it follows the native way of adding a column to the grid, and you won't have to load every order displayed on the page to obtain the column data (...
MageParts's user avatar
  • 531
30 votes
Accepted

Magento2.1 ui grid, remove or clear filter issue (after removing filter, result row apply to whole collection)

Just to add to the previous solution by Tony Bartiloro. The specific fix is to add the 'storageConfig' item. If this is missing you will see the issue where row data is duplicated. <item name="...
Chris's user avatar
  • 1,004
18 votes

Add More Mass action in Order grid in magento2

You need to define router for adminhtml in order to get it work with your custom module. You can define the same at app\code{{your_package}}{{your_module}}\etc\adminhtml\routes.xml as like below: ...
Himmat Paliwal's user avatar
18 votes

Magento2.1 ui grid, remove or clear filter issue (after removing filter, result row apply to whole collection)

i had same issue and I resolve with this code in ui_component xml: <dataSource name="storelocator_store_listing_data_source"> <argument name="dataProvider" xsi:type="configurableObject"&...
Tony Bartiloro's user avatar
17 votes

Column 'store_id' in where clause is ambiguous when adding custom order attribute to grid and changing store

use below code just before the $this->setCollection($collection); $collection->addFilterToMap('store_id', 'main_table.store_id'); Second Solution edit your column code: if (!Mage::app()->...
Prashant Valanda's user avatar
14 votes
Accepted

Magento 2 Could not acquire lock for cron group: default

In our case the issue was caused by a hanging cron job. The solution was to kill the cron job then everything returned to normal. https://help.nexcess.net/magento/how-to-find-and-remove-hanging-...
nlaitchison's user avatar
13 votes
Accepted

Magento 2: Add custom column to filter option in order grid?

For the performance, the Order Admin Grid will load the values from sales_order_grid. So, we need to add more columns to this table. app/code/Vendor/SalesOrder/Setup/UpgradeSchema.php <?php ...
Khoa TruongDinh's user avatar
12 votes

Magento2.1 ui grid, remove or clear filter issue (after removing filter, result row apply to whole collection)

I've got the same issue on Magento 2.3 and resolved by using the following code in ui_component.xml. <dataSource component="Magento_Ui/js/grid/provider" name="listing_data_source&...
Aasim Goriya's user avatar
  • 5,414
11 votes
Accepted

Admin Grid - Remove columns from export

Got it, if set is_system true for a column, it will not be exported.So $this->addColumn('customer_name', array( 'header' => Mage::helper('sales')->__('Customer'), 'index' ...
Abdul Ghaffar's user avatar
11 votes
Accepted

Magento 2 Filter not working while Custom column added on Sales Grid Using Ui Component

I have the same issue and $this->addFilterToMap() fix my issue.. check this answer Magento 2 grid uiComponent: include a table alias in a column filter
Emipro Technologies Pvt. Ltd.'s user avatar
11 votes

Magento 2 + Custom column added sku on grid not showing data in export file

To add SKUs Column in order Ui grid. You need to modify below files. TO add column, add below code in your module [vendor]/[module]/view/adminhtml/ui_component/sales_order_grid.xml <?xml ...
Nirav Patel's user avatar
11 votes

(Zend_Db_Statement_Exception): SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'created_at' in where clause is ambiguous

You can achieve this task by below 2 option Option - 1 You need to change 'created_at' column in view/adminhtml/ui-component/sales_order_grid.xml Change column <column name="created_at" ...
Suresh Chikani's user avatar
11 votes

Add Phone Number column in sales order grid

Please add the ui_component class for your column as per below. <?xml version="1.0" encoding="UTF-8"?> <listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
Aasim Goriya's user avatar
  • 5,414
11 votes
Accepted

Add Phone Number column in sales order grid

You added the column in ui_component correctly Just replace the _renderFiltersBefore function with my function in your module collection class Path should be Vendor/Yourmodule/Model/ResourceModel/...
Muhammad Hasham's user avatar
9 votes

Export a field from custom model grid with a diferent render to Csv

I got it. There is the renderExport method to do it. My render file: class Namespace_MyModule_Block_Adminhtml_Sales_Order_Renderer_Grid_MyModule extends ...
Denis Spalenza's user avatar
8 votes

Add Column to Admin > Sales > Orders Grid

Its a 2 step simple process. (for ex. i want to add Email Address and Order City in this order grid). Copy this core file to you local first in same directory. app/code/core/Mage/Adminhtml/Block/Sales/...
Abhilash's user avatar
7 votes

Magento 2 How to Add a New Column to Orders Grid

The answers here were very helpful, thank you! Here's an answer with some updated material (usage of db_schema.xml vs setup scripts, how to populate column data & clear UI bookmarks). 1. Create ...
Logan's user avatar
  • 456
7 votes
Accepted

Magento 2 Product Details Column in Sales order Grid

Create sales_order_grid.xml at app/code/Vendor/Module/view/adminhtml/ui_component/sales_order_grid.xml <?xml version="1.0" encoding="UTF-8"?> <listing xmlns:xsi="http://www.w3.org/2001/...
Prince Patel's user avatar
  • 22.7k
7 votes
Accepted

Magento 2 : Sales Order Grid table is empty but data exist in sales_order

Disable Asynchronous indexing under Store > Configuration > Advance > Developer > Grid Settings Clear cache and reindex, Hope this will work or you.
Kishor Thummar's user avatar
6 votes
Accepted

Magento2 Add Quote ID in Sales Order Grid

Add sequence tag inside module.xml <sequence> <module name="Magento_Sales"/> </sequence> Create Vendor/Module/etc/di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3....
Sohel Rana's user avatar
  • 35.7k
6 votes
Accepted

Magento 2: display yes/no in order grid instead 0/1 (Custom column value)

After some digging found the solution. What i need was just to make some changes in ui_comonent XML file: I changed this: <?xml version="1.0"?> <listing xmlns:xsi="http://www.w3.org/2001/...
Akhil Gupta's user avatar
  • 1,946
6 votes
Accepted

Magento 2 bar disappeared in Sales Order Grid after adding column

The bar was under the table and not disappeared. Just adjust the order and you'll get this solved. I solved the problem in Magento 2.2.x adding <listingToolbar name="listing_top"/> on top of ...
Vixent's user avatar
  • 349
6 votes
Accepted

Magento2 : sales order grid add new column with it's values

I created a UI component sales_order_grid.xml under [Vendor]/[Module]/view/adminhtml/ui_component/sales_order_grid.xml and add the following code to your sales_order_grid.xml: <?xml version="...
Sukumar Gorai's user avatar
6 votes
Accepted

Magento 2, add color style in Status column in sale order

Create a module named Vendor_Module. Create all the files and structure like below: Step 1: /app/code/Vendor/Module/registration.php <?php \Magento\Framework\Component\ComponentRegistrar::...
Sukumar Gorai's user avatar
6 votes
Accepted

Magento 2 - Call custom phtml before order grid

Add new block in your custom module for your custom phtml File path should be like: app\code\Vendor\Module\Block\Adminhtml\Yourblockname.php <?php namespace Vendor\Module\Block\Adminhtml; class ...
Muhammad Hasham's user avatar
5 votes
Accepted

Hide completed orders from sales/orders

The observer way: <events> <sales_order_grid_collection_load_before> <observers> <vendor_module_salesgrid> <model>module/observer&...
Raphael at Digital Pianism's user avatar
5 votes
Accepted

Magento 1.9 add custom button in admin order grid page

I've got it works.Here the complete files: <config> <modules> <Company_Module> <version>0.1.0</version> </Company_Module> </modules> <...
krybbio's user avatar
  • 1,258
5 votes
Accepted

Magento 2 sales order grid custom column export csv issue

join is happening twice in process of exporting, to avoid it, add checking in registry: use Magento\Framework\Message\ManagerInterface as MessageManager; use Magento\Framework\Registry; use Magento\...
Ilja's user avatar
  • 1,258
5 votes
Accepted

Get additional_information from sales_order_payment to show in backend sales order grid

You can display the additional_information by using the joinLeft concept. The actual "additional_information" data resides in sales_order_payment table. We can join the sales_order_grid ...
Siranjeevi K S's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible