如何在magento中获得航运数据

bz4sfanl  于 2023-01-17  发布在  其他
关注(0)|答案(1)|浏览(126)

我正在尝试获取发货数据,但结果为空

$orderID = 100000062;
        $order = Mage::getModel('sales/order')->load($orderID);
        foreach ($order->getShipmentsCollection() as $shipment) {
            Mage::log($shipment->getData()); 
        }
n6lpvg4x

n6lpvg4x1#

您可以尝试以下方法:

$shipmentCollection = Mage::getResourceModel('sales/order_shipment_collection')
                ->setOrderFilter($order)
                ->load();

相关问题