cancel
Showing results for 
Search instead for 
Did you mean: 

Account is not created if purchase process is not completed

Account is not created if purchase process is not completed

Hi all, I hope someone can shed some light on this. If I try to purchase a product regarless whether I log in as a guest or register a new account, Magento does not register the user unless the purchase process is completed. Is there a way of achieving this, that is capturing the user details and create an account before they actually complete the purchase process?

Thanks for you help.

1 REPLY

Re: Account is not created if purchase process is not completed

Customer object is only created and saved when order is submitted, the method creating the customer object is _prepareNewCustomerQuote in Mage_Checkout_Model_Type_Onepage, the method saving it is $transaction->addObject($quote->getCustomer()); in submitOrder() in Mage_Sales_Model_Service_Quote.

To save customer before that, you can rewrite Mage_Checkout_Model_Type_Onepage and call prepareNewCustomerQuote and save customer object in the end of saveBilling(), then change checkout method of current quote to METHOD_CUSTOMER.

 

The catch is after customer account created, if the customer want to edit billing address, it will try to create the same customer account again.