I want to override sales order grid in Magento admin. I have created custom module for that, but seems my override doesn't work. There is no errors.
Please find my codes above:
app/etc/modules/
<config>
<modules>
<Bikebear_SalesGrid>
<active>true</active>
<codePool>local</codePool>
</Bikebear_SalesGrid>
</modules>
app/code/local/Bikebear/SalesGrid/etc
<config>
<modules>
<Bikebear_SalesGrid>
<version>1.0.0</version>
</Bikebear_SalesGrid>
</modules>
<global>
<blocks>
<ordergrid>
<class>Bikebear_SalesGrid_Block</class>
</ordergrid>
<adminhtml>
<rewrite>
<sales_order_grid>Bikebear_SalesGrid_Block_Adminhtml_Sales_Order_Grid</sales_order_grid>
</rewrite>
</adminhtml>
</blocks>
</global>
app/code/local/Bikebear/SalesGrid/Block/Adminhtml/Sales/Order
class Bikebear_SalesGrid_Block_Adminhtml_Sales_Order_Grid extends Mage_Adminhtml_Block_Sales_Order_Grid {
protected function _prepareCollection(){
$collection = Mage::getResourceModel($this->_getCollectionClass());
$this->setCollection($collection);
return $this;
}
protected function _prepareColumns()
{
$this->addColumn('real_order_id', array(
'header'=> Mage::helper('sales')->__('Order #'),
'width' => '80px',
'type' => 'text',
'index' => 'increment_id',
));
$this->addColumn('postcode', array(
'header' => Mage::helper('sales')->__('Postcode 1'),
'index' => 'postcode',
));
if (!Mage::app()->isSingleStoreMode()) {
$this->addColumn('store_id', array(
'header' => Mage::helper('sales')->__('Purchased From (Store)'),
'index' => 'store_id',
'type' => 'store',
'store_view'=> true,
'display_deleted' => true,
));
}
$this->addColumn('created_at', array(
'header' => Mage::helper('sales')->__('Purchased On'),
'index' => 'created_at',
'type' => 'datetime',
'width' => '100px',
));
/*$this->addColumn('billing_name', array(
'header' => Mage::helper('sales')->__('Bill to Name'),
'index' => 'billing_name',
));*/
$this->addColumn('shipping_name', array(
'header' => Mage::helper('sales')->__('Ship to Name'),
'index' => 'shipping_name',
));
/*$this->addColumn('base_grand_total', array(
'header' => Mage::helper('sales')->__('G.T. (Base)'),
'index' => 'base_grand_total',
'type' => 'currency',
'currency' => 'base_currency_code',
));*/
$this->addColumn('grand_total', array(
'header' => Mage::helper('sales')->__('G.T. (Purchased)'),
'index' => 'grand_total',
'type' => 'currency',
'currency' => 'order_currency_code',
));
$this->addColumn('status', array(
'header' => Mage::helper('sales')->__('Status'),
'index' => 'status',
'type' => 'options',
'width' => '70px',
'options' => Mage::getSingleton('sales/order_config')->getStatuses(),
));
return parent::_prepareColumns();
}}
What I'm doing wrong and why there is no result? Thanks in advance.