1

I am trying to export the transaction data into csv. To achieve this I have added following line of code

$this->addExportType(’*/*/exportCsv’, Mage::helper(’sales’)->__(’CSV’));

to

“protected function _prepareColumns()” function in app/code/core/Mage/Adminhtml/Block/Sales/Transactions/grid.php file.

Also I have added an action exportCsvAction in /app/code/core/Mage/Adminhtml/controllers/Sales/TransactionsController.php

public function exportCsvAction()
{
$fileName = ‘transactions.csv’;
$grid = $this->getLayout()->createBlock(’adminhtml/sales_transactions_grid’);
$this->_prepareDownloadResponse($fileName, $grid->getCsvFile());
}

Now, when i try to export the transactions data I get error saying “You cannot define a correlation name ‘sop’ more than once”.

Can anyone help me on this?

1 Answer 1

-1

Just use this free module and it should take care of your issues:

http://www.magentocommerce.com/magento-connect/simple-order-export.html

1
  • Sarvagya is looking for help in programming. Answer bypasses the question. May 28, 2013 at 11:59

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.