Get Free Audit

How to Manage Displaying of Sales Order Grid Columns in Magento

Feb 9, 2016

1373 Aleksei Grigorenko

How to Manage Displaying of Sales Order Grid Columns in Magento

In this article I explained how to delete columns from sales order grid. Now basing on this functionality, we will find out how to implement the dynamic filter for columns in sales order grid.

First of all you need to change config.xml and add and add 2 sections to global:


Then we build a list of elements for displaying the filter in the helper/Data.php file.


Then it’s possible to add a filter layout on the page by adding the block to the file belvg/ordershinegrid.xml

Vlad Yunusov
Partner With Us Let's discuss how to grow your business. Get a Free Quote.
Talk to Vlad


and the layout itself in the template file belvg/sales/grid/column/filter.phtml


In this file it’s necessary to pay attention to the event onchange=”sales_order_gridJsObject.doFilter()” – it will allow using the default grid.js in order to refresh content after applying the filter.

In order to make the filter start transferring the “column-filter” parameters, let’s redefine the doFilter() method in the file js/belvg/adminhtml/ordershinegrid.js


Now the filter is displayed on order sales page:

How to Manage Displaying of Sales Order Grid Columns in Magento

Last step is to monitor and delete filter columns selected  Model/Observer.php

As a result only the columns with checkboxes selected will be displayed:

How to Manage Displaying of Sales Order Grid Columns in Magento

Vlad Yunusov
Partner With Us Looking for a partner that will help you to grow your business? We are the right company to develop your webstore. Feel free to get in touch with us. We will be happy to discuss your business opportunities and provide you with a Free Quote. Talk to Vlad

Post a new comment

BelVG Newsletter
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.
Email *