如何使用跟踪号获取跟踪信息


9

I want get tracking info, which is used in popup.phtml. In trackingcontroller.php tracking info load by hash.

 $shippingInfoModel = Mage::getModel('shipping/info')->loadByHash($this->getRequest()->getParam('hash'));

How to load tracking info using tracking number?

Answers:


3

One of the easiest ways would be to extend the shipping/info model with your own extension, add a method to load it from tracking number without the hash. You can also look at Mage_Shipping_Helper_Data::decodeTrackingHash() and see how to build the hash yourself.

I believe the intent behind the hash is to stop people from fishing for shipping info on orders/shippments that are not related to them.


@Marius how to add custom tracking info, i have developed one custom shipping method, what are the methods used to add the tracking information
manokarthick karthick

if your shipping carrier supports tracking, you can check how it's done for DHL or UPS and implement something similar.
Marius
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.