Here is my collection below.I tried to rewrite the sales order grid with adding another column as email .The column came but the result for the column email is not displaying in my custom grid.
On checking with collection->getData(); I am getting 'customer_email" but it's not populating in grid.
protected function _prepareCollection() {
$collection = Mage::getResourceModel($this->_getCollectionClass());
$collection->getSelect()->join('sales_flat_order', 'main_table.entity_id = sales_flat_order.entity_id',array('customer_email' => 'customer_email'));
}
$this->setCollection($collection);
//print_r($collection->getData());exit;
return parent::_prepareCollection();
}
and adding column is here
$this->addColumn('customer_email', array(
'header'=> Mage::helper('sales')->__('Email'),
'type' => 'text',
'index' => 'customer_email',
'align' => 'customer_email',
'filter_index' => 'sales_flat_order.customer_email',
));
Anyone who have faced this scenario earlier please guide me to get my self out,thanks in advance.