Magento – how to change status from pending to processing

magento-1.9order-stateordersPHP

I want to change order status from pending to processing in Magento
1.9, how can I do this?

Best Answer

The states like "pending" and "processing" change based on certain conditions. You can define custom statuses but those are always assigned to one of those states.

To get from "pending" from "processing", create an invoice or a shipment. Orders become "processing" if one of these exist but not both.

Update: I see, you tagged the post with . Programmatically, you can change the state like this:

$order->setState(Mage_Sales_Model_Order::STATE_PROCESSING);

Note that there are some guards in place before the order is saved. You cannot change from any to any state, but from pending to processing it's always possible.