How to get tracking info using tracking Number
-
22-10-2019 - |
Question
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?
Solution
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.
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange