Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elisei/a547275b27ce9ead3deee18278247468 to your computer and use it in GitHub Desktop.
Save elisei/a547275b27ce9ead3deee18278247468 to your computer and use it in GitHub Desktop.
To add a export button to Magento Recurring Profiles edit this file: /app/code/core/Mage/Adminhtml/controllers/Sales/Recurring/ProfileController.php
<?php
// ADD THIS CODE
/**
* Export order grid to CSV format
*/
public function exportCsvAction()
{
$fileName = 'subscriptions.csv';
$grid = $this->getLayout()->createBlock('sales/adminhtml_recurring_profile_grid');
$this->_prepareDownloadResponse($fileName, $grid->getCsvFile());
}
/**
* Export order grid to Excel XML format
*/
public function exportExcelAction()
{
$fileName = 'subscriptions.xml';
$grid = $this->getLayout()->createBlock('sales/adminhtml_recurring_profile_grid');
$this->_prepareDownloadResponse($fileName, $grid->getExcelFile($fileName));
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment