0

i have an important problem with checkout. When i try to do checkout with guest account or i want to register into site, i have a popup with error "Customer email is required”.

But i have inserted my email, it is correct, but i can't go on next step of checkout.

What is this bug? It's a problem of database or..?

Please help me to solve the problem because a user can't buy products.

EDIT - 1

the problem there is for all magento theme. This error is on the standard onepage checkout of magento. This is an php error and none javascript, the value of email is don't save, it is seems blank.

i have view the phtml file and no problem, the table of database is correct.

I have commented the line:

$errors[] = Mage::helper('customer')->__('Invalid email address "%s".', $this->getEmail());

in file /app/code/core/Mage/Customer/Model/Resource/Customer.php

So in this moment, with guest checkout, i don't have the error but Magento doesn't save the email address of customer in orders page. In backend i don't view the email.

Please help me to solve the problem.

  • are u using default magento checkout or using any checkout module – Pradeep Sanku Feb 3 '15 at 10:16
1

This suggests that the email attribute isn't being saved correctly.

You haven't mentioned whether it's flagged in an in-page validation (i.e. the field is highlighted), or in a post-process error message (the page reloads and an error message is displayed). These two circumstances would require vastly different solutions.

If order for better debugging, you'll need to provide much more detailed information. We'll need to know if you are using any custom or third-party checkout modules, and if any attribute modification has happened during the production of the store. This could also be an issue with the template, so I'll try and cover all bases in my answer.

In-Page Issue

If the error is flagged during in-page validation, you'll want to visit the phtml file of the checkout and ensure that it's validation settings are correct. The field's classes should be:

class="input-text required-entry validate-email"

Post Process Issue

Without knowing more about your store, and whether or not you're using a custom checkout module, you'll want to check against the following (there's a range of issues that it could be indicative of):

The name of the field in the phtml file.
If the name of the field is incorrect, then the value won't be received correctly in the backend process.

The email attribute in the database.
Check the email attribute is set correctly in the database. In the eav_attribute table, the email attribute should match many of the settings of any of the other 'required' customer fields (such as firstname or lastname) - denoted by entity_type_id of 1 (customer).

Receiving the data in the controller
When a process is submitted, it gets posted to a specific URL. This URL can be matched to a Controller and an Action. Within the action, you'll be able to utilise the following method to ensure that the attribute itself is being posted to the controller:

var_dump($this->getRequest()->getParams());
exit();

This will print out every single variable that gets posted to the controller action and if email is not present, then this would suggest the issue is on the template itself.

Whilst this answer in itself isn't definitive, I hope it provides you with a bit more information and some guidance on where to look for the error.

  • Everything seems to checkout fine except for when i var_dump on my billing.phtml page it returns array(0) { } @Dan Hanly – Singleton Jan 25 '18 at 22:03

Your Answer

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

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