Is is possible to make order state to processing from complete programmatically?
-
30-10-2019 - |
Question
i'm try to make a order's state to processing from complete. here is the code
class TempName_HelloWorld_IndexController extends Mage_Core_Controller_Front_Action
{
public function indexAction()
{
$this->loadLayout(array('default'));
$this->renderLayout();
$order = Mage::getModel('sales/order');
$order->loadByIncrementId(100000041);
$order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true, 'Gateway has authorized the payment.');
$order->save();
}
}
?>
the above code can update the order state from pending/pending payment to processing, but i can't update the order state from complete to processing. Anyone can what is the problem?
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange