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();
}
}
}
}
?>