Example #1
0
 /**
  * Retrieve tracking url with params
  *
  * @param  string $key
  * @param  Mage_Sales_Model_Order|Mage_Sales_Model_Order_Shipment|Mage_Sales_Model_Order_Shipment_Track $model
  * @param  string $method Optional - method of a model to get id
  * @return string
  */
 protected function _getTrackingUrl($key, $model, $method = 'getId')
 {
     $helper = Mage::helper('Mage_Core_Helper_Data');
     $urlPart = "{$key}:{$model->{$method}()}:{$model->getProtectCode()}";
     $param = array('hash' => $helper->urlEncode($urlPart));
     $storeModel = Mage::app()->getStore($model->getStoreId());
     return $storeModel->getUrl('shipping/tracking/popup', $param);
 }