2
votes

Apologies that this will be a slightly vague question.

I have a customised version of Awesomecheckout (a onepage checkout) running on Mangento 1.9, but I've run into a problem where the customer's email address isn't being saved in the database when checking out as a guest.

I think this could easily be something that I've caused myself, so unlikely that anyone will know a solution right away, but I was hoping that someone might point me in the direction of what files might be responsible for this.

I've found that /app/code/Core/Mage/Checkout/Model/Type/Onepage.php does have the email ok in saveBilling() (it appears under both $address->getEmail() and $this->getQuote()->getCustomerEmail() ), but I can't work out what happens next (and so where it gets lost).

Many thanks for any suggestions.

1
that function you mentioned is in magento core and if the data is there, then this issue might not even be related to awesome checkout. By default, awesome checkout calls that function to save the data only after all the preprocessing is finished.Mridul Aggarwal
AnattaDesign_AwesomeCheckout_OnepageController::saveBillingAction() is the function which calls the magento's default saveBilling()Mridul Aggarwal

1 Answers

1
votes

I've experienced same error. In the /app/code/core/Mage/Checkout/Model/Type/Onepage.php file magento validates customer data with $result = $customer->validate(); around line 440.

This function tries to get e-mail address and validate it.

But in my case there was no e-mail data in $customer object.

1 ) Copy /app/code/core/Mage/Checkout/Model/Type/Onepage.php to /app/code/local/Mage/Checkout/Model/Type/Onepage.php

2 ) Find this line : $result = $customer->validate();

3 ) Add this code above it : if ($customer->getEmail() == '' and @$data['email'] != '') {$customer->setEmail($data['email']);}