0

I want to get tracking details for an order:

http://www.magentocommerce.com/api/soap/sales/salesOrderShipment/sales_order_shipment.info.html

If I have an order object, how do I get the shipmentIncrementId? How do I query shipments, based on an order_id or a increment_id?

1

you can load order by its increment id as below

$orderIncrementId = 100000055'';

$order = Mage::getModel('sales/order')->loadByIncrementId($orderIncrementId);

$shipment = $order->getShipmentsCollection()->getFirstItem();

$shipmentIncrementId = $shipment->getIncrementId();

hope this will work for you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.