im getting 404 error while displaying pop up in admin orders grid page in magento 1.9

by mohsin ali   Last Updated March 08, 2018 07:09 AM

class Tcs_Couriers_Model_Rendor extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract {

        public function render(Varien_Object $row) {

    $order      =   Mage::getModel('sales/order')->load($row->getEntityId());

    $order_id   =   $order->getIncrementId();

    $model = Mage::getModel('couriers/couriers');

    $model->load($order_id, 'order_id');

    $tracking_number    =   $model->tracking_number;

    $courier_name       =   $model->courier_name;

    if(empty($tracking_number)){

    $apiUrl = $this->getUrl('*/couriers/index/index', array('order_id' => $row->getEntityId()));
            //$apiUrl = Mage::helper('adminhtml')->getUrl('adminhtml/couriers_index/');
            //$apiUrl = Mage::helper('adminhtml')->getUrl('adminhtml/couriers/index', array('_secure' => true));        
return "<a href='$apiUrl' onClick='javascript:openMyPopup()' class='form-button'> Ship Now </a>";

    }   else    {

    return "$courier_name : $tracking_number";

    }       
  }
}

here my controller is in adminhtml folder by name CouriersController and index is function



Related Questions


Problems with DI in custom controller

Updated August 21, 2018 13:09 PM

How to add image in controller success message

Updated May 26, 2015 08:04 AM

Controller class extend not working

Updated June 12, 2015 22:04 PM

Display header and footer in controller method

Updated February 17, 2016 01:04 AM