Customer Email In Magento sales order grid

Get Customer Email In Magento sales order grid : This is very Important hack for all the magento merchants and store owners many times merchants want that the email information of the customers should display in the sales  order grid of magento .So here is a simple hack of it .

Go to /app/code/core/Mage/Adminhtml/Block/Sales/Order and open Grid.php and replace your _prepareCollection() function code with the following one

 protected function _prepareCollection()
    {
        $collection = Mage::getResourceModel($this->_getCollectionClass());
		$collection->getSelect()
			    ->join(
			    'customer_entity',
			    'main_table.customer_id = customer_entity.entity_id', array('customer_name' => 'email'));
        $this->setCollection($collection);
        return parent::_prepareCollection();
    }

Now Add the column in Grid , add this code in _prepareColumns() function

$this->addColumn('thumbnail', array(
	            'header'    => Mage::helper('Sales')->__('Email'),
	            'width'     => '100px',
	            'index'     => 'customer_name',
	            'type'        => 'text',

	        ));

You will see the output like this

Order Grid email

Feel free to put your suggestion or mail us at sahu.vipin@webkul.com . Enjoy 🙂

We also provide extended version of the module for magento extended sales order grid .

Magento Slider

This module supports following product properties in sales order grid –

★ Product image

★ Product id

★ SKU

★ Product Name

★ Buyer Email address

★ Gender

★ Ordered Quantity

Feel free to contact us  or add a ticket at our ticket support system – http://webkul.com/ticket/index.php