Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.