1

I am trying to set the Billing and Shipping address for the Quote extracted from the Order like this,

$quote->setBillingAddress($order->getBillingAddress());
$quote->setShippingAddress($order->getShippingAddress());

But the address is picked up in the quote hence the order is not created on Magento

The following are the messages gathered from the logs

ERR (3): Recoverable Error: Argument 1 passed to Mage_Sales_Model_Quote::setBillingAddress() must be an instance of Mage_Sales_Model_Quote_Address, instance of Mage_Sales_Model_Order_Address given, called in app/code/localXmlConnect/controllers/CheckoutController.php and defined  in app/code/core/Mage/Sales/Model/Quote.php

ERR (3): Recoverable Error: Argument 1 passed to Mage_Sales_Model_Quote::setShippingAddress() must be an instance of Mage_Sales_Model_Quote_Address, instance of Mage_Sales_Model_Order_Address given, called in app/code/local/XmlConnect/controllers/CheckoutController.php and defined  in /app/code/core/Mage/Sales/Model/Quote.php

Any help is appreciated.

  • You have override checkout controller right? – Raj Jun 28 at 7:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.