Under a sales_order_place_after event Observer, I try I save a guest customer and I try to save the order Adresses into the guest customer Adresses:

I get the the Billing and Shipping Adresses like this:

$order = $observer->getEvent()->getOrder();  
$billingAddress = $order->getBillingAddress(); 
$shippingAddress = $order->getShippingAddress();

And I want to save them to the guest customer.

How can I do it ?

Thanks a lot.

2 Answers 2


Please check below link for adding customer: http://inchoo.net/magento/programming-magento/programmaticaly-adding-new-customers-to-the-magento-store/

  • Thanks, I have already seen that link, is there any method to save directly the complete Shipping or BillingAdress in better method that setting each Address attribute alone like in the link ? Thanks
    – Bizboss
    Commented Nov 4, 2016 at 12:58
  • Hii, we can not set directly you need to assign the values of the field like see the below links:
    – Rajan Soni
    Commented Nov 4, 2016 at 13:05
  • Hi, see this link
    – Rajan Soni
    Commented Nov 4, 2016 at 13:07
  • feltsales-magento.blogspot.in/2012/04/…
    – Rajan Soni
    Commented Nov 4, 2016 at 13:07
  • I have already seen this link, it haven't worked for me
    – Bizboss
    Commented Nov 4, 2016 at 14:55

Please use this extension for that : https://www.magentocommerce.com/magento-connect/quick-register.html

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.