How to Delete Columns in Sales Grid

Jan 4, 2016444Aleksei Grigorenko
How to Delete Columns in Sales Grid

When the number of extension grows on your Magento store, you need to get rid of certain columns in the table Order => Sales, Customers => Manage Customers etc.

In order to solve this problem, you can use observer events.

1. Add the following code to config.xml :

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

2. Then in the Model/Observer.php file delete the column using its code.

You can find column code using browser’s debugger (F12  or Ctrl+Shift+i).

How to Delete Columns in Order Sales Grid

You need to use different conditions instanceof to delete columns depending on the table from which you want to delete them.

  • For Sales => Orders  – Mage_Adminhtml_Block_Sales_Order_Grid;
  • For Customers => Manage Customers  – Mage_Adminhtml_Block_Customer_Grid;

As a result, the Billing Name column won’t be displayed.

How to Delete Columns in Order Sales Grid

In the next article I’ll show you how you can create a dynamic filter for columns based on this event.

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 *