* */ class Webshopapps_Tracker_Model_Order_Shipment_Track extends Mage_Sales_Model_Order_Shipment_Track { /** * Retrieve detail for shipment track * * @return string */ public function getNumberDetail() { $carrierInstance = Mage::getSingleton('shipping/config')->getCarrierInstance($this->getCarrierCode()); if (!$carrierInstance) { $custom['title'] = $this->getTitle(); $custom['number'] = $this->getNumber(); return $custom; } else { $carrierInstance->setStore($this->getStore()); } $rplChars = array(" " => ''); $string = $this->getShipment()->getShippingAddress()->getPostcode(); $postcode = strtr($string,$rplChars); if (!$trackingInfo = $carrierInstance->getTrackingInfo($this->getNumber(), $postcode )) { return Mage::helper('sales')->__('No detail for number "%s"', $this->getNumber()); } return $trackingInfo; } }