I am trying to rewrite Grid in Magento Admin for Newsletter Subscribers. I am using code below to rewrite Grid in Custom module:

config.xml (only required part is added)

                <!-- Extra column in newsletter subscribers grid  -->


    class Namespace_Module_Block_Adminhtml_Newsletter_Subscriber_Grid extends Mage_Adminhtml_Block_Newsletter_Subscriber_Grid 
        protected function _prepareColumns()
            // extra grid column added

But Grid is not updating in Admin... Anything wrong I am doing here...??


First, your configuration file should be config.xml and not config.php.

Second it must declare the module like this, this bit seems to be missing in the code you pasted:


And the XML code must be surrounded with a <config> tag.

Now, most of the time, the main error when trying to add columns to an existing grid using block rewrite is that the extended class method calls the following:

return parent::_prepareColumns();

Calling this will call the original _prepareColumns method and thus, override the extra column you're trying to add.

To avoid that, you need to call the following instead in your custom code:

return Mage_Adminhtml_Block_Widget_Grid::_prepareColumns();

Personal Suggestion

Instead of rewriting the entire block, use an observer.

In your config.xml add the following code under the <config> tag:


Now create the following file Namespace/Module/Model/Observer.php with the following content:


class Namespace_Module_Model_Observer {
    public function blockCreateAfter(Varien_Event_Observer $observer)
        $block = $observer->getBlock();

        if ($block instanceof Mage_Adminhtml_Block_Newsletter_Subscriber_Grid) {
                    'header' => Mage::helper('newsletter')->__('Custom Column'),
                    'index' => 'customcolumn'

In this code you need to replace the after_column with the name of the original column you want to place your custom column after.

  • +1 for answer.. Mistake was from my side.. good suggestion though... :) – Chaitanya Jun 9 '16 at 11:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.