Show Payment Method in Order Grid in Magento (Enhance Order Grid in admin side)


Copy Grid.php "app\code\core\Mage\Adminhtml\Block\Sales\Order\Grid.php"
and paste on below path.
"app\code\local\Mage\Adminhtml\Block\Sales\Order".

Find this code "$collection = Mage::getResourceModel($this->_getCollectionClass());".


Put below line after find text.
$collection->join(array('payment'=>'sales/order_payment'),'main_table.entity_id=parent_id','method');


After that put below code where you want to show Payment Method. After which column in grid you want to show.


$this->addColumn('method', array(
'header' => Mage::helper('sales')->__('Payment Method'),
'index' => 'method',
'filter_index' => 'method',
'type' => 'text'

));


Comments

  1. supposed am not copy and paste, changes made same file app\code\core\Mage\Adminhtml\Block\Sales\Order\Grid.php, may i know the error. am faced no error.

    ReplyDelete
  2. how can i display country name like payment option

    ReplyDelete
  3. Its really helpfull. Clean code

    ReplyDelete
  4. I was looking for this query ie "Show Payment Method in Order Grid in Magento" since two weeks and finally got it here. I'm working in Magento agency and always be ready to learn new things and solve my queries in the blogs as like yours. Thanks for this technical post.

    ReplyDelete

Post a Comment

Popular posts from this blog

Adding Contact us link to Top Menu in Magento

Credit card number for Testing payment methods

Magento create invoice of specific order by programmatically