when I export shipments on Magento admin ( Sales > Shipments > export (to csv) ) I'd like to export Shipping method(carrier) too. How can I do that? Thank you
1 Answer
You can do this by override Mage_Adminhtml_Block_Sales_Order_Grid Just need to change prepareCollection funcion with the below code:
protected function _prepareCollection()
{
$collection = Mage::getResourceModel($this->_getCollectionClass());
$collection->getSelect()->join('sales_flat_order', 'main_table.entity_id = sales_flat_order.entity_id',array('shipping_method'));
$this->setCollection($collection);
return parent::_prepareCollection();
}
and after that add a column for shipping method:
$this->addColumn('shipping_method', array(
'header' => Mage::helper('sales')->__('Shipping Method'),
'index' => 'shipping_method',
));
Now try exporting the csv.