I have created an placeorder function that is placing order programmatically. Now, I need to another function which can update the shipping address of an order. I am using the below code, but it is giving error Call to a member function getId() on boolean in.

Please help me if anyone idea about this.

                $order = Mage::getModel('sales/order')->load($data['orderId']);

                $orderShippingAddress = $order->getBillingAddress()->getId();
                $orderShipping = Mage::getModel('sales/order_address')->load($orderShippingAddress);
                         '0' => $data['area'], // compulsory
                         '1' => $data['landmark'] // optional
  • I am getting the post data in $data variable, Mar 20, 2018 at 10:52
  • I have resolved the issue. The issue was I was trying to load the order using load function. But I was passing increment_id instead of entity_id. So, solution was loadByIncrementId. Mar 21, 2018 at 10:21


Your Answer

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

Browse other questions tagged or ask your own question.