1

config.xml file

<?xml version="1.0"?><config>
<modules>
    <Ible_DownloadOrder>
        <version>1.0.0</version>
    </Ible_DownloadOrder>
</modules>
<global>
    <rewrite>
    <ible_ibleadmin_adminhtml_sales_order>
        <from><![CDATA[#/admin/sales_order/#]]></from>
        <to>/ibleadmin/adminhtml_sales_order/</to>
    </ible_ibleadmin_adminhtml_sales_order>
    </rewrite>

    <blocks>
      <adminhtml>
         <rewrite>
                <sales_order_grid>Ible_DownloadOrder_Block_Adminhtml_Sales_Order_Grid</sales_order_grid>
         </rewrite>
         <rewrite>
                <sales_order_downloadorder>Ible_DownloadOrder_Block_Adminhtml_Sales_Order_Downloadorder</sales_order_downloadorder>
         </rewrite>
        <layout>
            <updates>
                 <downloadorder>
                     <file>downloadorder.xml</file>
                 </downloadorder>
            </updates>   
         </layout>
        </adminhtml>
   </blocks>    
</global>

<admin>
    <routers>
        <ible_downloadorder>
            <use>admin</use>
            <args>
                <module>Ible_DownloadOrder</module>
                <frontName>ibleadmin</frontName>
            </args>
        </ible_downloadorder>           
        <adminhtml>
            <args>
              <modules>
                <Ible_DownloadOrder_Adminhtml before="Mage_Adminhtml">Ible_DownloadOrder_Adminhtml</Ible_DownloadOrder_Adminhtml>
              </modules>
            </args>
        </adminhtml>
    </routers>
</admin>

OrderController.php

    <?php 

      require_once 'Mage/Adminhtml/controllers/Sales/OrderController.php';

    class Ible_DownloadOrder_Adminhtml_Sales_OrderController extends Mage_Adminhtml_Sales_OrderController

{
    public function downloadorderAction()
    {       $orderIds = $this->getRequest()->getPost('order_ids');
         //$orderData= $orderIds->get

        //$order = Mage::getModel('sales/order')->loadByIncrementId('100000176');
       //echo "<pre>";print_r($order->getAllItems());
        foreach($orderIds as $orderId){
            $order = Mage::getModel('sales/order')->load($orderId);
            $order_item_collection = $order->getItemsCollection();
            //echo "<pre>";  print_r($order_item_collection);
            $url ="";
            foreach($order_item_collection as $item){
                //print_r($item); echo"<pre>";
                $oId = $item->getOrderId();
                $pId = $item->getProductId();
                $iId = $item->getId();

                $url = "http://dev.justfordemo.biz/voucolar/index.php/pdp/view/finalDesign/product-id/".$pId."/order-id/".$oId."/item-id/".$iId;
                $cont[] = file_get_contents($url);
                echo"<pre>";
                print_r($url);
                $this->loadLayout();
                $this->renderLayout();
             }

         }
    }
}
?>
4
  • Any one please help for this issue
    – Allamsetti
    Commented Nov 6, 2015 at 12:37
  • I need post the data from controller to Downloadorder.php file where it is Block\Adminhtml\Sales\Order path. can you any one help for this
    – Allamsetti
    Commented Nov 6, 2015 at 12:44
  • you can set data in adminhtml session and get those session value from block. Commented Nov 6, 2015 at 12:58
  • 1
    Please add more context. And text. I don't want to read code. I want to read a short summary what you want to achieve - please. Commented Jan 14, 2016 at 15:36

0

Browse other questions tagged or ask your own question.