I'm using magento 1.9 and I have to change the order status from shipped to delivered, both status having the same state "complete"
How can I able to change this?
I have tried following code
$order = Mage::getModel("sales/order")->loadByIncrementId(100000123); $order->setData("state", "complete"); $order->setStatus("delivered"); $history = $order->addStatusHistoryComment('A ser executada a rotina de recarga.', false); $history->setIsCustomerNotified(false); $order->save();
But it gives
PHP Fatal error: Call to a member function getMethodInstance() on boolean in /app/code/core/Mage/Payment/Model/Observer.php on line 46