$orderId = 2;
$order = Mage::getModel('sales/order')->load($orderId);
$shipment = $order->prepareShipment();
$shipment->register();
$order->setIsInProcess(true);
$order->addStatusHistoryComment('ship by aditya.', false);
$transactionSave = Mage::getModel('core/resource_transaction')->addObject($shipment)
->addObject($shipment->getOrder())
->save();
No comments:
Post a Comment