{"id":11491,"date":"2016-08-09T15:00:33","date_gmt":"2016-08-09T12:00:33","guid":{"rendered":"http:\/\/blog.belvg.com\/?p=11491"},"modified":"2025-06-30T22:40:44","modified_gmt":"2025-06-30T20:40:44","slug":"how-to-add-column-in-sales-order-grid-in-magento-2-1","status":"publish","type":"post","link":"https:\/\/belvg.com\/blog\/how-to-add-column-in-sales-order-grid-in-magento-2-1.html","title":{"rendered":"How to Add Column in Sales Order Grid in Magento 2"},"content":{"rendered":"\n<p>Magento 2 UI components allow to generate and display several lists and grid types. As well you can create your own component based on the already existing code, but that&rsquo;s the topic for another article.<\/p>\n<p><strong>Now I want to describe how to extend sales order grid with an additional column.<\/strong><!--more--><\/p>\n<p>Adding a new column to a grid is not so complex task as distinct from creation a column with filtering. Let&rsquo;s take a look how to perform it in Magento 2.1, by adding a new column into the order grid.<\/p>\n<p><em><strong>Note.<\/strong>&nbsp;The code listed below in XML format is valid only for Magento 2.1 version or later.&nbsp;And we are not going to consider a code for elder versions in this article. If you still use Magento 1, we highly recommend that you <a href=\"https:\/\/belvg.com\/migration-to-magento-2\" target=\"_blank\" rel=\"noopener\">migrate to Magento 2<\/a>.<\/em><\/p>\n<p>All of the directives are placed in the<em> &lt;module&gt;\/view\/adminhtml\/ui_component\/ <\/em>directory<em>.&nbsp;<\/em>Let&rsquo;s create the &ldquo;<em>sales_order_grid.xml<\/em>&rdquo; file. The name of the file has to match with a parent component, which we want to extend.<\/p>\n<p>So let&rsquo;s add the code into the file as follows:<\/p>\n<pre class=\"lang:xml decode:true \">&lt;listing xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:magento:module:Magento_Ui:etc\/ui_configuration.xsd\"&gt;\r\n&lt;columns&gt;\r\n   \t&lt;column name=\"example_status\" class=\"Module\\Ui\\Component\\Columns\\OrderGrid\"&gt;\r\n       \t&lt;argument name=\"data\" xsi:type=\"array\"&gt;\r\n\t           &lt;item name=\"config\" xsi:type=\"array\"&gt;\r\n           \t&lt;item name=\"label\" xsi:type=\"string\" translate=\"true\"&gt;Status example&lt;\/item&gt;\r\n               \t&lt;item name=\"sortOrder\" xsi:type=\"number\"&gt;50&lt;\/item&gt;\r\n               \t&lt;item name=\"align\" xsi:type=\"string\"&gt;left&lt;\/item&gt;\r\n               \t&lt;item name=\"dataType\" xsi:type=\"string\"&gt;text&lt;\/item&gt;\r\n               \t&lt;item name=\"visible\" xsi:type=\"boolean\"&gt;true&lt;\/item&gt;\r\n               \t&lt;item name=\"bodyTmpl\" xsi:type=\"string\"&gt;ui\/grid\/cells\/html&lt;\/item&gt;\r\n           \t&lt;\/item&gt;\r\n       \t&lt;\/argument&gt;\r\n   \t&lt;\/column&gt;\r\n   &lt;\/columns&gt;\r\n&lt;\/listing&gt;\r\n<\/pre>\n<p>Let&rsquo;s break down this code:<\/p>\n<div class=\"content_sales_info\" style=\"background-image: url(https:\/\/belvg.com\/blog\/wp-content\/uploads\/2019\/03\/Sales_background.png\"><img width=\"65\" height=\"65\" src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2015\/11\/Andrey_Dubina.png\" alt=\"Andrey_Dubina\" title=\"How to Add Column in Sales Order Grid in Magento 2\"><div class=\"content_part\"><h3 class=\"title\">Partner With Us <\/h3><span class=\"sales_content_text\">Let's discuss how to grow your business. Get a Free Quote.<\/span><\/div> <a class=\"call-to-action\" href=\"https:\/\/belvg.com\/contact?utm_source=blog&amp;utm_campaign=sales_block&amp;utm_content=middle\" target=\"_blank\" rel=\"noopener\">Talk to Andrey<\/a><\/div>\n<p>In line<\/p>\n<pre class=\"lang:xml decode:true\">&lt;column name=\"example_status\" class=\"Module\\Ui\\Component\\Columns\\OrderGrid\"&gt;<\/pre>\n<p>We add the column into order grid. Class <em>Module\\Ui\\Component\\Columns\\OrderGrid<\/em> should extend the <em>Magento\\Ui\\Component\\Listing\\Columns\\Column<\/em> class.<\/p>\n<p>We should override the <em>prepareDataSource()<\/em> method:<\/p>\n<pre class=\"lang:php decode:true \">public function prepareDataSource(array $dataSource)\r\n{\r\n    if (isset($dataSource['data']['items'])) {\r\n        foreach ($dataSource['data']['items'] as &amp;$item) {\r\n            \/\/put logic here\r\n        }\r\n    }\r\n    return $dataSource;\r\n}<\/pre>\n<p>Current grid row data is stored in the variable <em>$item<\/em>. The name of the column is available in the array element <em>&ldquo;name&rdquo;<\/em>:<\/p>\n<pre class=\"lang:php decode:true \">$item[$this-&gt;getData('name')] = $value;<\/pre>\n<p>Thus we can fill the row the data.<\/p>\n<p>But let&rsquo;s get back to the <em>sales_order_grid.xml<\/em> file. All what we can see in the argument line and below is related to the description of column.<\/p>\n<pre class=\"lang:xml decode:true\">&lt;item name=\"bodyTmpl\" xsi:type=\"string\"&gt;ui\/grid\/cells\/html&lt;\/item&gt;<\/pre>\n<p>The following line states that we can render any valid HTML code in the cell. Magento 2 supports a few pre-defined template renders out of the box, all of them are placed in the <em>module-ui.<\/em><\/p>\n<p>In the following example we didn&rsquo;t specify the <em>component<\/em>, but additionally, we can specify the <em>component<\/em> of the column in <em>argument<\/em> tag as well. For example:<\/p>\n<pre class=\"lang:xml decode:true \">&lt;item name=\"component\" xsi:type=\"string\"&gt;Magento_Ui\/js\/grid\/columns\/date&lt;\/item&gt;<\/pre>\n<p>Component defines which type of column will be used. For example, it could be <em>date, column, actions, multiselect, select or thumbnail<\/em> type. As well as templates, all of the components are placed in the <em>module-ui<\/em>. At this stage, we already have the column in order grid, and in case we don&rsquo;t need the filtering by this column, we can finish. But if we do, that is becoming not so easy task.<\/p>\n<div class=\"module_in_content_container\"><a href=\"https:\/\/belvg.com\/magento-webdesign\" class=\"link_to_module\" target=\"_blank\" rel=\"noopener\"><\/a><div class=\"module_content\"><img src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2019\/01\/magento-webdesign-1.png\" width=\"100\" height=\"100\" alt=\"magento webdesign\" class=\"module_image\" title=\"How to Add Column in Sales Order Grid in Magento 2\"><div class=\"module_content_part\"><h3 class=\"title\">Magento Webdesign<\/h3><p class=\"module_content_text\">Take your online store to the next level with BelVG Magento Webdesign<\/p><a href=\"https:\/\/belvg.com\/magento-webdesign\" class=\"link_2_to_module\" target=\"_blank\" style=\"display:inline-block\" rel=\"noopener\"><span class=\"read-more\">Visit the page<\/span><\/a><\/div><\/div><\/div>\n<h3>There are 2 ways of solving the problem:<\/h3>\n<ul>\n<li>To add our column into <em>sales_order<\/em> and <em>sales_order_grid<\/em> tables and control CRUD operations for the <em>sales_order<\/em> table (<em>sales_order_grid<\/em> table is synchronized with <em>sales_order<\/em> table by cron).<\/li>\n<li>To write a new plugin for rapid column update.<\/li>\n<\/ul>\n<p>In my view <em>sales_order<\/em> table update way leads to the overmuch data and compatibility reduction. That&rsquo;s why I decided to perform it through the plugin filtering. At first, let&rsquo;s add the filter into <em>sales_order_grid.xml<\/em> file. Then add the following code right after the close tag:<\/p>\n<pre class=\"lang:xml decode:true \">&lt;listingToolbar name=\"listing_top\"&gt;\r\n    &lt;filters name=\"listing_filters\"&gt;\r\n        &lt;filterSelect name=\"example_status\"&gt;\r\n            &lt;argument name=\"optionsProvider\" xsi:type=\"configurableObject\"&gt;\r\n                &lt;argument name=\"class\" xsi:type=\"string\"&gt;Modulei\\Model\\Config\\Statuses&lt;\/argument&gt;\r\n            &lt;\/argument&gt;\r\n            &lt;argument name=\"data\" xsi:type=\"array\"&gt;\r\n                &lt;item name=\"config\" xsi:type=\"array\"&gt;\r\n                    &lt;item name=\"provider\" xsi:type=\"string\"&gt;${ $.parentName }&lt;\/item&gt;\r\n                    &lt;item name=\"dataScope\" xsi:type=\"string\"&gt;example_status&lt;\/item&gt;\r\n                    &lt;item name=\"caption\" xsi:type=\"string\" translate=\"true\"&gt;Select status&lt;\/item&gt;\r\n                    &lt;item name=\"label\" xsi:type=\"string\" translate=\"true\"&gt;Select status&lt;\/item&gt;\r\n                    &lt;item name=\"component\" xsi:type=\"string\"&gt;Magento_Ui\/js\/form\/element\/ui-select&lt;\/item&gt;\r\n                    &lt;item name=\"template\" xsi:type=\"string\"&gt;ui\/grid\/filters\/elements\/ui-select&lt;\/item&gt;\r\n                &lt;\/item&gt;\r\n            &lt;\/argument&gt;\r\n        &lt;\/filterSelect&gt;\r\n    &lt;\/filters&gt;\r\n&lt;\/listingToolbar&gt;<\/pre>\n<p>So we are going to create dropdown filter, with multiselect.<\/p>\n<p>In line:<\/p>\n<pre class=\"lang:xml decode:true\">&lt;argument name=\"class\" xsi:type=\"string\"&gt;Modulei\\Model\\Config\\Statuses&lt;\/argument&gt;<\/pre>\n<p>We designate class, in which filter value will be defined. This class should carry out interface <em>\\Magento\\Framework\\Data\\OptionSourceInterface<\/em>.<\/p>\n<p>The line<\/p>\n<pre class=\"lang:xml decode:true\">&lt;item name=\"provider\" xsi:type=\"string\"&gt;${ $.parentName }&lt;\/item&gt;<\/pre>\n<p>defines the provider we use. In this case, we are using the parental provider.<\/p>\n<p>For each filter, we should designate collection, where data will be shown<\/p>\n<p>Statement <em>${ $.parentName}<\/em> referrers to the collection used by default. <em>dataSource<\/em> tag specifies the collection name. For example, for order sales grid it should be as follows:<\/p>\n<pre class=\"lang:xml decode:true \">&lt;dataSource name=\"sales_order_grid_data_source\"&gt;\r\n    &lt;argument name=\"dataProvider\" xsi:type=\"configurableObject\"&gt;\r\n        &lt;argument name=\"class\" xsi:type=\"string\"&gt;Magento\\Framework\\View\\Element\\UiComponent\\DataProvider\\DataProvider&lt;\/argument&gt;\r\n        &lt;argument name=\"name\" xsi:type=\"string\"&gt;sales_order_grid_data_source&lt;\/argument&gt;\r\n        &lt;argument name=\"primaryFieldName\" xsi:type=\"string\"&gt;entity_id&lt;\/argument&gt;\r\n        &lt;argument name=\"requestFieldName\" xsi:type=\"string\"&gt;id&lt;\/argument&gt;\r\n        &lt;argument name=\"data\" xsi:type=\"array\"&gt;\r\n            &lt;item name=\"config\" xsi:type=\"array\"&gt;\r\n                &lt;item name=\"update_url\" xsi:type=\"url\" path=\"mui\/index\/render\"\/&gt;\r\n                &lt;item name=\"component\" xsi:type=\"string\"&gt;Magento_Ui\/js\/grid\/provider&lt;\/item&gt;\r\n            &lt;\/item&gt;\r\n        &lt;\/argument&gt;\r\n    &lt;\/argument&gt;\r\n&lt;\/dataSource&gt;<\/pre>\n<div class=\"module_in_content_container\"><a href=\"https:\/\/belvg.com\/migration-to-magento-2\" class=\"link_to_module\" target=\"_blank\" rel=\"noopener\"><\/a><div class=\"module_content\"><img src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2019\/06\/migration-to-magento-2.png\" width=\"100\" height=\"100\" alt=\"migration to magento 2\" class=\"module_image\" title=\"How to Add Column in Sales Order Grid in Magento 2\"><div class=\"module_content_part\"><h3 class=\"title\">Magento 2 Migration<\/h3><p class=\"module_content_text\">Take your online store to the next level with BelVG Magento 2 Migration<\/p><a href=\"https:\/\/belvg.com\/migration-to-magento-2\" class=\"link_2_to_module\" target=\"_blank\" style=\"display:inline-block\" rel=\"noopener\"><span class=\"read-more\">Visit the page<\/span><\/a><\/div><\/div><\/div>\n<p>The collection class for the order sales is <em>sales_order_grid_data_source<\/em>, which is defined in <em>vendor\/magento\/module-sales\/etc\/di.xml<\/em>:<\/p>\n<pre class=\"lang:xml decode:true \">&lt;type name=\"Magento\\Framework\\View\\Element\\UiComponent\\DataProvider\\CollectionFactory\"&gt;\r\n   &lt;arguments&gt;\r\n   \t&lt;argument name=\"collections\" xsi:type=\"array\"&gt;\r\n       \t&lt;item name=\"sales_order_grid_data_source\" xsi:type=\"string\"&gt;Magento\\Sales\\Model\\ResourceModel\\Order\\Grid\\Collection&lt;\/item&gt;\r\n<\/pre>\n<p>So we use the collection as a source for filtering. And now, all that we have to do is to add a plugin, which could add our data into filtering results.<\/p>\n<p>Let&rsquo;s register a plugin in etc\/di.xml<\/p>\n<pre class=\"lang:xml decode:true \">&lt;type name=\"Magento\\Framework\\View\\Element\\UiComponent\\DataProvider\\CollectionFactory\"&gt;\r\n    &lt;plugin\r\n            name=\"sales_order_additional_columns\"\r\n            type=\"Module\\Plugin\\AdditionalFields\\CollectionFactory\"\r\n            sortOrder=\"100\"\r\n            disabled=\"false\"\r\n    \/&gt;\r\n&lt;\/type&gt;<\/pre>\n<p>And add method <em>Module\\Plugin\\AdditionalFields\\CollectionFactory::aroundGetReport()<\/em><\/p>\n<pre class=\"lang:php decode:true \">public function aroundGetReport(\r\n    \\Magento\\Framework\\View\\Element\\UiComponent\\DataProvider\\CollectionFactory $subject,\r\n    \\Closure $proceed,\r\n    $requestName\r\n)\r\n{\r\n    $result = $proceed($requestName);\r\n    if ($requestName == 'sales_order_grid_data_source') {\r\n        if ($result instanceof Magento\\Sales\\Model\\ResourceModel\\Order\\Grid\\Collection) {\r\n            \/\/add code to join table, and mapping field to select\r\n        }\r\n    }\r\n    return $result;\r\n}<\/pre>\n<p>Filtering by the current field should be available after plugin installation.<\/p>\n<p>The following lines<\/p>\n<pre class=\"lang:xml decode:true\">&lt;item name=\"component\" xsi:type=\"string\"&gt;Magento_Ui\/js\/form\/element\/ui-select&lt;\/item&gt;\r\n&lt;item name=\"template\" xsi:type=\"string\"&gt;ui\/grid\/filters\/elements\/ui-select&lt;\/item&gt;\r\n<\/pre>\n<p>are needed for multiselect rendering, and if we remove them, parental filter type-select will be in use by default. The current filter helps to perform selecting by several filter values.<\/p>\n<h3>As a result, we have:<\/h3>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"lazy aligncenter wp-image-11492 size-full\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2016\/08\/add_column_in_admin_sales_grid.png\" alt=\"add column in admin sales grid\" width=\"602\" height=\"349\" title=\"How to Add Column in Sales Order Grid in Magento 2\"><\/p>\n<p>Magento 2 provides a very comfortable way of adding the column into order grid. But in case you need to add filtering by the current column, there are 2 ways.<\/p>\n<p><strong>The first is more simple<\/strong> &mdash; to add two columns into the sales_order and sales_order_grid tables. But this way has a few disadvantages.<br>\n<strong>And another one I&rsquo;ve just covered in this article<\/strong> &mdash; adding filter through the plugins method. This method is quite more complex, but it has no disadvantages that we mentioned before.<\/p>\n<p><strong>UPD:<\/strong>&nbsp;Magento has changed some syntax of *.xml files for ui-components for 2.1.3 and newer versions. Here is a module with an example: <a href=\"https:\/\/github.com\/Galillei\/sample_add_columns_to_order_grid\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/github.com\/Galillei\/sample_add_columns_to_order_grid<\/a>. It has been&nbsp;successfully tested on Magento 2.1.4 CE, and it should work on Magento 2.1.5 as well.<\/p>\n<p>Need a quality Magento extension for great Administration functionalities? Visit out BelVG <a href=\"https:\/\/store.belvg.com\/extensions\/administration.html\" target=\"_blank\" rel=\"noopener\">store<\/a>!<\/p>\n<div class=\"module_in_content_container\"><a href=\"https:\/\/belvg.com\/magento-custom-development\" class=\"link_to_module\" target=\"_blank\" rel=\"noopener\"><\/a><div class=\"module_content\"><img src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2019\/01\/magento-custom-development.png\" width=\"120\" height=\"120\" alt=\"magento custom development\" class=\"module_image\" title=\"How to Add Column in Sales Order Grid in Magento 2\"><div class=\"module_content_part\"><h3 class=\"title\">Magento Custom Development<\/h3><p class=\"module_content_text\">Take your online store to the next level with BelVG Magento Custom Development <\/p><a href=\"https:\/\/belvg.com\/magento-custom-development\" class=\"link_2_to_module\" target=\"_blank\" style=\"display:inline-block\" rel=\"noopener\"><span class=\"read-more\">Visit the page<\/span><\/a><\/div><\/div><\/div>\n\n","protected":false},"excerpt":{"rendered":"Magento 2 UI components allow to generate and display several lists and grid types. As &#8230;","protected":false},"author":47,"featured_media":11493,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"image","meta":{"_acf_changed":false,"footnotes":""},"categories":[14,389],"tags":[],"class_list":["post-11491","post","type-post","status-publish","format-image","has-post-thumbnail","hentry","category-magento","category-magento2-development","post_format-post-format-image"],"acf":[],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.4 - aioseo.com -->\n\t<meta name=\"description\" content=\"Discover how to add column in sales order grid in Magento 2 in the easiest way. Code extracts are provided.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Artsem Miklashevich\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/belvg.com\/blog\/how-to-add-column-in-sales-order-grid-in-magento-2-1.html\" \/>\n\t\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.4\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-to-add-column-in-sales-order-grid-in-magento-2-1.html#article\",\"name\":\"How to Add Column in Sales Order Grid in Magento | BelVG Blog\",\"headline\":\"How to Add Column in Sales Order Grid in Magento 2\",\"author\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/author\\\/artsem-miklashevich#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/08\\\/How-to-Add-Column-in-Admin-Order-Sales-Grid-in-Magento-2.jpg\",\"width\":700,\"height\":190,\"caption\":\"How to Add Column in Admin Order Sales Grid in Magento 2\"},\"datePublished\":\"2016-08-09T15:00:33+02:00\",\"dateModified\":\"2025-06-30T22:40:44+02:00\",\"inLanguage\":\"en-US\",\"commentCount\":14,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-to-add-column-in-sales-order-grid-in-magento-2-1.html#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-to-add-column-in-sales-order-grid-in-magento-2-1.html#webpage\"},\"articleSection\":\"Magento, Magento 2 Development, Image\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-to-add-column-in-sales-order-grid-in-magento-2-1.html#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/belvg.com\\\/blog\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/category\\\/magento#listItem\",\"name\":\"Magento\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/category\\\/magento#listItem\",\"position\":2,\"name\":\"Magento\",\"item\":\"https:\\\/\\\/belvg.com\\\/blog\\\/category\\\/magento\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-to-add-column-in-sales-order-grid-in-magento-2-1.html#listItem\",\"name\":\"How to Add Column in Sales Order Grid in Magento 2\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-to-add-column-in-sales-order-grid-in-magento-2-1.html#listItem\",\"position\":3,\"name\":\"How to Add Column in Sales Order Grid in Magento 2\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/category\\\/magento#listItem\",\"name\":\"Magento\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#organization\",\"name\":\"BelVG Blog\",\"description\":\"Magento and Prestashop articles\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/author\\\/artsem-miklashevich#author\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/author\\\/artsem-miklashevich\",\"name\":\"Artsem Miklashevich\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-to-add-column-in-sales-order-grid-in-magento-2-1.html#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/145dc6a225439ebb3a257da8fd0f46383a3649cdca2e58190b33a28af5f216a5?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Artsem Miklashevich\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-to-add-column-in-sales-order-grid-in-magento-2-1.html#webpage\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-to-add-column-in-sales-order-grid-in-magento-2-1.html\",\"name\":\"How to Add Column in Sales Order Grid in Magento | BelVG Blog\",\"description\":\"Discover how to add column in sales order grid in Magento 2 in the easiest way. Code extracts are provided.\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-to-add-column-in-sales-order-grid-in-magento-2-1.html#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/author\\\/artsem-miklashevich#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/author\\\/artsem-miklashevich#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/08\\\/How-to-Add-Column-in-Admin-Order-Sales-Grid-in-Magento-2.jpg\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-to-add-column-in-sales-order-grid-in-magento-2-1.html\\\/#mainImage\",\"width\":700,\"height\":190,\"caption\":\"How to Add Column in Admin Order Sales Grid in Magento 2\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-to-add-column-in-sales-order-grid-in-magento-2-1.html#mainImage\"},\"datePublished\":\"2016-08-09T15:00:33+02:00\",\"dateModified\":\"2025-06-30T22:40:44+02:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/\",\"name\":\"BelVG Blog\",\"description\":\"Magento and Prestashop articles\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"How to Add Column in Sales Order Grid in Magento | BelVG Blog","description":"Discover how to add column in sales order grid in Magento 2 in the easiest way. Code extracts are provided.","canonical_url":"https:\/\/belvg.com\/blog\/how-to-add-column-in-sales-order-grid-in-magento-2-1.html","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/belvg.com\/blog\/how-to-add-column-in-sales-order-grid-in-magento-2-1.html#article","name":"How to Add Column in Sales Order Grid in Magento | BelVG Blog","headline":"How to Add Column in Sales Order Grid in Magento 2","author":{"@id":"https:\/\/belvg.com\/blog\/author\/artsem-miklashevich#author"},"publisher":{"@id":"https:\/\/belvg.com\/blog\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2016\/08\/How-to-Add-Column-in-Admin-Order-Sales-Grid-in-Magento-2.jpg","width":700,"height":190,"caption":"How to Add Column in Admin Order Sales Grid in Magento 2"},"datePublished":"2016-08-09T15:00:33+02:00","dateModified":"2025-06-30T22:40:44+02:00","inLanguage":"en-US","commentCount":14,"mainEntityOfPage":{"@id":"https:\/\/belvg.com\/blog\/how-to-add-column-in-sales-order-grid-in-magento-2-1.html#webpage"},"isPartOf":{"@id":"https:\/\/belvg.com\/blog\/how-to-add-column-in-sales-order-grid-in-magento-2-1.html#webpage"},"articleSection":"Magento, Magento 2 Development, Image"},{"@type":"BreadcrumbList","@id":"https:\/\/belvg.com\/blog\/how-to-add-column-in-sales-order-grid-in-magento-2-1.html#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/#listItem","position":1,"name":"Home","item":"https:\/\/belvg.com\/blog\/","nextItem":{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/category\/magento#listItem","name":"Magento"}},{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/category\/magento#listItem","position":2,"name":"Magento","item":"https:\/\/belvg.com\/blog\/category\/magento","nextItem":{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/how-to-add-column-in-sales-order-grid-in-magento-2-1.html#listItem","name":"How to Add Column in Sales Order Grid in Magento 2"},"previousItem":{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/how-to-add-column-in-sales-order-grid-in-magento-2-1.html#listItem","position":3,"name":"How to Add Column in Sales Order Grid in Magento 2","previousItem":{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/category\/magento#listItem","name":"Magento"}}]},{"@type":"Organization","@id":"https:\/\/belvg.com\/blog\/#organization","name":"BelVG Blog","description":"Magento and Prestashop articles","url":"https:\/\/belvg.com\/blog\/"},{"@type":"Person","@id":"https:\/\/belvg.com\/blog\/author\/artsem-miklashevich#author","url":"https:\/\/belvg.com\/blog\/author\/artsem-miklashevich","name":"Artsem Miklashevich","image":{"@type":"ImageObject","@id":"https:\/\/belvg.com\/blog\/how-to-add-column-in-sales-order-grid-in-magento-2-1.html#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/145dc6a225439ebb3a257da8fd0f46383a3649cdca2e58190b33a28af5f216a5?s=96&d=mm&r=g","width":96,"height":96,"caption":"Artsem Miklashevich"}},{"@type":"WebPage","@id":"https:\/\/belvg.com\/blog\/how-to-add-column-in-sales-order-grid-in-magento-2-1.html#webpage","url":"https:\/\/belvg.com\/blog\/how-to-add-column-in-sales-order-grid-in-magento-2-1.html","name":"How to Add Column in Sales Order Grid in Magento | BelVG Blog","description":"Discover how to add column in sales order grid in Magento 2 in the easiest way. Code extracts are provided.","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/belvg.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/belvg.com\/blog\/how-to-add-column-in-sales-order-grid-in-magento-2-1.html#breadcrumblist"},"author":{"@id":"https:\/\/belvg.com\/blog\/author\/artsem-miklashevich#author"},"creator":{"@id":"https:\/\/belvg.com\/blog\/author\/artsem-miklashevich#author"},"image":{"@type":"ImageObject","url":"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2016\/08\/How-to-Add-Column-in-Admin-Order-Sales-Grid-in-Magento-2.jpg","@id":"https:\/\/belvg.com\/blog\/how-to-add-column-in-sales-order-grid-in-magento-2-1.html\/#mainImage","width":700,"height":190,"caption":"How to Add Column in Admin Order Sales Grid in Magento 2"},"primaryImageOfPage":{"@id":"https:\/\/belvg.com\/blog\/how-to-add-column-in-sales-order-grid-in-magento-2-1.html#mainImage"},"datePublished":"2016-08-09T15:00:33+02:00","dateModified":"2025-06-30T22:40:44+02:00"},{"@type":"WebSite","@id":"https:\/\/belvg.com\/blog\/#website","url":"https:\/\/belvg.com\/blog\/","name":"BelVG Blog","description":"Magento and Prestashop articles","inLanguage":"en-US","publisher":{"@id":"https:\/\/belvg.com\/blog\/#organization"}}]}},"aioseo_meta_data":{"post_id":"11491","title":"How to Add Column in Sales Order Grid in Magento | #site_title","description":"Discover how to add column in sales order grid in Magento 2 in the easiest way. Code extracts are provided.","keywords":null,"keyphrases":null,"focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_custom_url":null,"og_image_custom_fields":null,"og_image_url":null,"og_image_width":null,"og_image_height":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_image_url":null,"twitter_title":null,"twitter_description":null,"schema_type":"default","schema_type_options":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null,"created":"2026-11-03 18:37:28","updated":"2026-11-03 18:37:28"},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/belvg.com\/blog\/\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/belvg.com\/blog\/category\/magento\" title=\"Magento\">Magento<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tHow to Add Column in Sales Order Grid in Magento 2\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/belvg.com\/blog\/"},{"label":"Magento","link":"https:\/\/belvg.com\/blog\/category\/magento"},{"label":"How to Add Column in Sales Order Grid in Magento 2","link":"https:\/\/belvg.com\/blog\/how-to-add-column-in-sales-order-grid-in-magento-2-1.html"}],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/posts\/11491","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/users\/47"}],"replies":[{"embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/comments?post=11491"}],"version-history":[{"count":12,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/posts\/11491\/revisions"}],"predecessor-version":[{"id":29679,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/posts\/11491\/revisions\/29679"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/media\/11493"}],"wp:attachment":[{"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/media?parent=11491"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/categories?post=11491"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/tags?post=11491"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}