Thursday, 14 April 2016

Diffrent Order status and how to change Order status.

Order status

Mage_Sales_Model_Order::STATE_NEW
Mage_Sales_Model_Order::STATE_COMPLETE
Mage_Sales_Model_Order::STATE_PROCESSING
Mage_Sales_Model_Order::STATE_PENDING_PAYMENT
Mage_Sales_Model_Order::STATE_HOLDED
Mage_Sales_Model_Order::STATE_CANCELED
Mage_Sales_Model_Order::STATE_CLOSED

Some time we need to explicitly update the order status. We can change or update the order status as below,

$yourOrder->setState(Mage_Sales_Model_Order::STATE_HOLDED, true);
$yourOrder->save();

It's always good practice to take database backup while doing such operations.