I am a relative novice at Magento (and new to StackExchange, so bear with me). My client is running a rather old community version (1.4).
They have set up checkout with Onepage checkout = YES, and Guest checkout allowed = NO.
What they discovered is that when new customers register as part of checkout, the customer record is not getting created. This seems like a pretty glaring error but in all my searching I can’t find anything to suggest that anyone is having this problem.
All of my research pointed to the submitOrder method of Quote.php as the place to look and I found this code:
if ($quote->getCustomerId()) {
$transaction->addObject($quote->getCustomer());
}
When I set a breakpoint at this point I (as I expected) found that this new customer has NO id, so the Customer object never gets added to the transaction.
Really, this seemed too obvious a problem so I kept exploring expecting to find that the Customer gets saved elsewhere, but found nothing. So, as a test, I changed the code to be:
if (!$quote->getCustomerId()) {
$transaction->addObject($quote->getCustomer());
}
Well, the Customer and the Order got saved just as I hoped. But this seems WAY too obvious and might create issues for me if I want to save changes to customer data for existing Customers. But, I can deal with that for now.
I looked ahead in V1.8 to see if somehow this problem got fixed in a newer version, but the code is the same. That, and the fact that I can’t find any report of this problem makes me think I am not looking in the right place and have just put a convenient patch on the problem.
Can anyone help me out with this? Am I in the right place or way off base? Please advise!
Thanks in advance.
diffcommand to get a quick impression of all the changes that were made. Maybe something pops up that explains this. You can also turn off all third party modules by setting active = false in the module xml and go from there. Good luck. – Vicky Mar 20 '14 at 15:35