I am trying to extend the admin order grid by adding a single column. I don't want to add all the logic again in my code, so the only method I'm calling is _prepareColumns()
:
protected function _prepareColumns()
{
$this->addColumn('customer_group', array(
'header'=> Mage::helper('sales')->__('Customer Group'),
'width' => '80px',
'type' => 'text',
'index' => 'increment_id',
));
return parent::_prepareColumns();
}
I've read this article on overriding methods, but I don't know if I'm following it correctly. My module file at ~/app/etc/modules/Namespace_Module.xml
includes the following:
<config>
<modules>
<Namespace_Module>
<active>true</active>
<codePool>community</codePool>
<depends>
<Mage_Adminhtml />
<Mage_Core />
<Mage_Sales />
</depends>
</Namespace_Module>
</modules>
</config>
My config.xml
file contains:
<config>
...
<global>
<blocks>
<adminhtml>
<rewrite>
<sales_order_grid>Namespace_Module_Block_Adminhtml_Sales_Order_Grid</sales_order_grid>
</rewrite>
</adminhtml>
</blocks>
</global>
...
</config>
On my testing site, I get only this Customer Group
column on the grid. I am expecting all the columns AND this column. Am I wrong to think it will work like this?
My code is all in a custom module. Thanks.
A picture might help. I'm trying to edit this:
Namespace_Module_Block_Adminhtml_Sales_Order_Grid
and it extendsMage_Adminhtml_Block_Widget_Grid
. Yes, please see the edit forconfig.xml
code. Thx.