Charles Park
Charles Park

Reputation: 63

Magento How to add additional fields to export order csv

Im trying to add additional fields to export order on the magento backend orders.

I googled the general information to add new fields ...

protected function _prepareCollection(){
        $collection = Mage::getResourceModel($this->_getCollectionClass());
        $collection->getSelect()->join('sales_flat_order_address', 'main_table.entity_id = sales_flat_order_address.parent_id',array('postcode'));
        $this->setCollection($collection);
        return parent::_prepareCollection();
    }

protected function _prepareColumn() {
$this->addColumn('postcode', array(
            'header' => Mage::helper('sales')->__('Postcode'),
            'index' => 'postcode',
        ));

however when i try to edit the /var/www/html/app/code/local/mage/adminhtml/block/sales/order/grid.php nothing happens. I think i might be editing the wrong file or something may be over riding the grid.php. How do i find out which files are over riding it? My website is fs1inc.com. THank you in advance for any help.

Upvotes: 0

Views: 1120

Answers (1)

Randhir Yadav
Randhir Yadav

Reputation: 1459

Please Try this below Solution

kindly visit below URL, download and install this "OrdersPlus", no need to add custom code. I have tested It's working magento 1.7 to 1.9.3.1

https://github.com/gsafcik/OrdersPlus

I Hope It's helpful for you.

Upvotes: 1

Related Questions