Magento load shipment by shipment id
Magento load shipment by shipment id : Sometimes you need to load shipment using the shipment id. You can load shipment Mage::getModel(‘sales/order_shipment’); model and shipment id. After loading shipment object you can use it to update shipment or get the information of shipment.
Magento load shipment by shipment id
Load Shipment By Id
Here is an example to load shipment by shipment id –
Magento load shipment by shipment id:
$shipmentId = 198; $shipment = Mage::getModel('sales/order_shipment')->load($shipmentId); |
Which will give you the shipment object.
Load Shipment By Increment Id
Here is an example to load shipment by shipment increment id –
Magento load shipment by shipment increment id:
$shipmentIncId = 198; $shipment = Mage::getModel('sales/order_shipment')->loadByIncrementId($shipmentIncId); |
Which will also give you the shipment object as above.
Advertisements