Add custom attribute in magento admin product grid

We all know that magento admin product grid display some attribute of the product. Some time we require displaying the custom attribute value into that grid. So I post this blog to fulfill that requirement.

Step: 1: Create the attribute for the product and give the proper type.

Example: Crates attribute ‘newstatus’


Step: 2: Crate directory structure.

For that first we create the following directory structure in our magento.



Step: 3: Overwrite the default product grid.

For adding new attribute to grid, overwrite the default grid file. For that we copy the file “Grid.php” from the following location


And paste this file at our new created location. So path become like this:



Step: 4­: Add Attribute to grid.

First find out the following function.

protected function _prepareColumns()

Now add the code for displaying the attribute to grid. Here I insert the attribute ‘newstatus’ created at step-1.



'header'=> Mage::helper('catalog')->__('Company Status'),

'width' => '80px',

'index' => 'newstatus',

'type'  => ‘text’,


Step: 5­: Add Attribute to filter grid.

Find the following function.

protected function _prepareCollection()


Add the fields in that code for filtration.



Refresh the cache memory and reindexing the data. Now this attributes display into admin product grid.

I hope this will help you.

Thank you.

Speak Your Mind

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: