【发布时间】:2011-04-20 22:14:53
【问题描述】:
给定一个 magento 订单对象,我如何找到与该订单关联的跟踪号?
$order = Mage::getModel('sales/order')->loadByIncrementId(100000064);
$shipmentCollection = Mage::getResourceModel('sales/order_shipment_collection')
->setOrderFilter($order)
->load();
foreach ($shipmentCollection as $shipment){
// This will give me the shipment IncrementId, but not the actual tracking information.
$shipment->getData();
}
【问题讨论】:
-
stackoverflow.com/questions/3155671/… 这里有一些相关代码。
-
在谷歌搜索时帮助我的答案:stackoverflow.com/questions/9433627
标签: magento magento-1.4