cancel
Showing results for 
Search instead for 
Did you mean: 

How to change the Magento export order CSV layout?

How to change the Magento export order CSV layout?

I want to change the export orders CSV column layout. For example, it is showing the following column-

Order #
Purchased On
Bill to Name
Ship to Name
G.T. (Base)
G.T. (Purchased)
Status

Check my screenshot http://take.ms/d3OVH

 

But I want it like following-

Sales Record Number
Buyer Full name
SKU
Quantity
Post To Address 1
Post To Address 2
Post To City
Post To County
Post To Postcode
Post To Country

Check my screenshot http://take.ms/jloSf

 

Thank you

1 REPLY 1

Re: How to change the Magento export order CSV layout?

Hi @khandaker_ikrama,

 

Take a look at the app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php controller.

You'll find this method:

 

    /**
     *  Export order grid to Excel XML format
     */
    public function exportExcelAction()
    {
        $fileName   = 'orders.xml';
        $grid       = $this->getLayout()->createBlock('adminhtml/sales_order_grid');
        $this->_prepareDownloadResponse($fileName, $grid->getExcelFile($fileName));
    }

Maybe you can try to override to call your own block with the right columns/order.