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'
));
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.
ReplyDeletehow can i display country name like payment option
ReplyDeleteIts really helpfull. Clean code
ReplyDeleteI 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