original_string: public function exportAction()
      {
          $orders = $this->getRequest()->getPost('order_ids', array());
  
          try {
              // Build the CSV and retrieve its path
              $filePath = Mage::getModel('australia/shipping_carrier_clickandsend_export_csv')->exportOrders($orders);
  
              // Download the file
              $this->_prepareDownloadResponse(basename($filePath), file_get_contents($filePath));
          } catch (Exception $e) {
              Mage::getSingleton('core/session')->addError($e->getMessage());
              $this->_redirect('adminhtml/sales_order/index');
          }
      }
code: public function exportAction()
      {
          $orders = $this->getRequest()->getPost('order_ids', array());
  
          try {
              // Build the CSV and retrieve its path
              $filePath = Mage::getModel('australia/shipping_carrier_clickandsend_export_csv')->exportOrders($orders);
  
              // Download the file
              $this->_prepareDownloadResponse(basename($filePath), file_get_contents($filePath));
          } catch (Exception $e) {
              Mage::getSingleton('core/session')->addError($e->getMessage());
              $this->_redirect('adminhtml/sales_order/index');
          }
      }
code_tokens: public function exportAction ( ) { $ orders = $ this -> getRequest ( ) -> getPost ( 'order_ids' , array ( ) ) ; try { // Build the CSV and retrieve its path $ filePath = Mage :: getModel ( 'australia/shipping_carrier_clickandsend_export_csv' ) -> exportOrders ( $ orders ) ; // Download the file $ this -> _prepareDownloadResponse ( basename ( $ filePath ) , file_get_contents ( $ filePath ) ) ; } catch ( Exception $ e ) { Mage :: getSingleton ( 'core/session' ) -> addError ( $ e -> getMessage ( ) ) ; $ this -> _redirect ( 'adminhtml/sales_order/index' ) ; } }
docstring: Export Orders to CSV
  
  This action exports orders to a CSV file and downloads the file.
  The orders to be exported depend on the HTTP POST param "order_ids".
docstring_tokens: Export Orders to CSV