title: magento - add customer name to order grid in magento 1.7.0.2
body: <p>I'm trying to add a new <code>column</code> for Customer Name in the Sales Order Grid located here:</p>
  
  <pre><code>App/code/local/Mage/Adminhtml/Block/Sales/Order/Grid.php
  </code></pre>
  
  <p>I want add Customer Name like Name in Manage Customers.</p>
  
  <p>I have added the following code:</p>
  
  <pre><code>protected function _getCollectionClass()
  {
      return 'sales/order_grid_collection';
  }
  
  protected function _prepareCollection()
  {
      $collection = Mage::getResourceModel($this-&gt;_getCollectionClass());
      /*junpeng add start*/
  
      $collection-&gt;getSelect()
      -&gt;join(
      'customer_entity',
      'main_table.customer_id = customer_entity.entity_id', array('email' =&gt; 'email'));
  
      $collection-&gt;getSelect()-&gt;join(
      'customer_entity_varchar',
      'main_table.entity_id = customer_entity_varchar.entity_id', array('name' =&gt; 'value')
      );
  
      /*junpeng add end*/
      $this-&gt;setCollection($collection);
      return parent::_prepareCollection();
  }
  protected function _prepareColumns()
  {
      $this-&gt;addColumn('name', array(
          'header'    =&gt; Mage::helper('sales')-&gt;__('Customer Name'),
          'index' =&gt; 'name',
      ));
  
      $this-&gt;addColumn('email', array(
          'header'    =&gt; Mage::helper('Sales')-&gt;__('Customer Email'),
          'index'     =&gt; 'email',
          'type'        =&gt; 'text',
      ));
  }
  </code></pre>
  
  <p>Customer Email is OK,but add Customer Name does not work it!</p>
  
  <p>Can someone please help me solve this problem?</p>