If you have the $orderItem
, you can easily get all the ShipmentItems:
$shipmentItems = Mage::getResourceModel('sales/order_shipment_item_collection')
->addFieldToFilter('order_item_id', $orderItem->getId());
foreach ($shipmentItems as $item) {
$item->getShipment();
}
if this doesn't work, you need to load the shipment based on the $item->getParentId()