`
kirenenko04
  • 浏览: 145949 次
  • 性别: Icon_minigender_2
  • 来自: 上海
社区版块
存档分类
最新评论

Add Shipment to Adminhtml Order List Grid

 
阅读更多

1. rewrite the grid block file

<global>
        <blocks>
            <adminhtml>
                <rewrite>
                   <sales_order_grid>Raveinfosys_Deleteorder_Block_Adminhtml_Sales_Order_Grid</sales_order_grid>
                </rewrite>	

 2. edit _prepareCollection function to left join ·sales_flat_order· table

    protected function _prepareCollection()
    {
        $collection = Mage::getResourceModel($this->_getCollectionClass());
        $collection->getSelect()->joinLeft(array('b'=>'sales_flat_order'),'b.entity_id = main_table.entity_id',array('shipping_description'));
        $this->setCollection($collection);
        return parent::_prepareCollection();
    }

 3.add a 'shipping_description' column to _prepareColumns()function

 $this->addColumn('shipping_description', array(
        		'header' => Mage::helper('sales')->__('Shipping Method'),
        		'index' => 'shipping_description'
        ));

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics