I am creating shipment programmatically. I want to get shipment id what shipment currently creating. See my code,You can understand my question.
$shipment = $order->prepareShipment($qty); if ($shipment) { $shipment->register(); $shipment->addComment($history_comment, $email && $includeComment); $shipment->getOrder()->setIsInProcess(true); try { $transactionSave = Mage::getModel('core/resource_transaction') ->addObject($shipment) ->addObject($shipment->getOrder()) ->save(); } catch (Mage_Core_Exception $e) { Mage::getSingleton('adminhtml/session')->addError("Cannot create an empty shipment for ".$order->getIncrementId()); }
I want to get shipment id of this shipment. Anyone knows how to get..?