magento 后台导出订单同时导出产品信息 代码

require_once'Mage/Adminhtml/controllers/Sales/OrderController.php';
class EM_DeleteOrder_Adminhtml_Sales_OrderController extendsMage_Adminhtml_Sales_OrderController
{
 
   
    publicfunction reportorderAction(){
      
      $orderIds=$this->getRequest()->getPost('order_ids');
      $write =Mage::getSingleton('core/resource')->getConnection('core_write');
      $table_sales_flat_order =Mage::getSingleton('core/resource')->getTableName('sales_flat_order');
      
      header("content-type:application/octet-stream");
       header("accept-ranges: bytes");
       header("accept-length: ".strlen($outstr));
       header("content-disposition: attachment;filename=order_detail.csv");
                       echo  "orders_id,";
                        echo  "order_no,";
                        echo  "customers_id,";
                            echo  "customers_email_address,";
                       echo  "customers_phone,";
                           echo  "customers_name,";
                           echo  "customers_street_address,";
           

你可能感兴趣的:(Magento)