Is it possible in Magento to ship single items of an order independently of each other programatically?

For example, say i have an order with 5 order items and i want to ship only 1 of those how can this be done?

Additionally, i would like to determine if any of the single items has been shipped.

1 Answer 1


Yes, it's possible.


Go to the order, generate shipment, and then enter the # of qty/items to ship in that particular shipment.

enter image description here

The order will remain in Processing or your custom status until all items have been shipped before it will be marked as Completed.


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

There are several ways to check if an item has been shipped

1) Look at the order item's qty_shipped value:

foreach($order->getAllItems() as $item){
    echo $item->getQtyShipped();

2) Look at the order item status:


To get more information on how a status is determined (it's not a stored value, it's derived) see this class:


More reading about generating shipments programmatically:

Programmatically Creating Shipments

  • Sorry, this is my mistake. I would like to do this in code Aug 27, 2013 at 21:11
  • I have updated the question to avoid any future confusion. Sorry for that Aug 27, 2013 at 21:11
  • See my edit to the answer.
    – philwinkle
    Aug 27, 2013 at 21:15
  • Let's see how long it takes to flush out the downvoter. Care to explain? :)
    – philwinkle
    Aug 27, 2013 at 22:49
  • @philwinkle I didn't got the screen which you answered in community edition, Am I doing anything wrong? Jul 31, 2017 at 7:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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