I am using below code to create shipment programmatically.

$shipment = Mage::getModel('sales/service_order', $order)->prepareShipment($qty);

But nothing is happening. No shipment is created in back-end and no error is reported.


I'm assuming your $qty and $order are correct. I don't think shipments can be created just doing a save(). Try this.

$shipment = Mage::getModel('sales/service_order', $order)

$transactionSave = Mage::getModel('core/resource_transaction')

See Mage_Adminhtml_Sales_Order_ShipmentController::_saveShipment for the exact implementation details.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.