How To Get Shipment Id From Order In Magento.?

Get Shipment Id From Order In Magento :-

To get Shipment information from order ID than you need to add specif order number that will fetch the corresponding shipment address and more info respectively. In Magento shipments are created based on the order ID generated so this order number or ID becomes the unique number for which shipment info is generated. Use below given code to get the shipment info from order ID by accordingly.

Get shipment collection in magento:-

$orderIncrementId = 600;
$order = Mage::getModel('sales/order')->loadByIncrementId($orderIncrementId);
$shipmentCollection = $order->getShipmentsCollection();
foreach($shipmentCollection as $shipment){
$shipmentIncrementId = $shipment->getIncrementId();
This above example code will load all the shipments created against the order 600.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *