0

In magento backend it is possible to export the list of the orders in Excel XML format.

I would like to add columns in this file such as the company name (present in the customer address) and the payment method but I do not find the function exporting the datas...

Thank you for your help,

1 Answer 1

0

The export is based upon the grid you are rendering so if you want to add additional columns you need to add them to the grid. If you don't want to show them you need to do some custom code that hides them for specific conditions or change the grid your are exporting.

With orders however you need to note that the data is not all stored in order grid table since it only stores data used in the default grid.

So you either need to change the collection model used in Mage_Adminhtml_Block_Sales_Order_Grid method: _getCollectionClass

class Mage_Adminhtml_Block_Sales_Order_Grid

And the method

protected function _getCollectionClass()

To fit what you need. Or you can add the fields to the grid table and then make magento move them there via the config.xml (See the Sales moduls config.xml)

1
  • I managed to add the columns I needed on the grid, but the export does not include them...
    – Alexglvr
    Commented May 2, 2016 at 10:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.