In checkout process when I select either "Checkout as a guest" or "Register" and then fill out the proper form, clicking on the button to go to the next step generates error. This is what the exception is caught:
{"error":-1,"message":"The first name cannot be empty., The last name cannot be empty., Invalid email address \"\"."}
The problem is I am inserting all the fields and when I debug using Firebug, these fields show as validation passed fields. So they pass the proper validation on client side, what could be causing this error then? Some kind of server side validation?
Can anyone please give me some solution for this issue? Why Magento is giving this error when all the fields are properly filled up?
Edit: I have debug the Onepage.php files of both my site as well as default Magento setup. The extractData
method is returning an empty array in my site, which is causing error during validation because the fields are missing after the data is extracted. Can anyone please help me out here?
Best Answer
After spending lot of time, I got solution for this. If data is not getting from the extractData, you can set the value again for the firstname, lastname, email in app\code\core\Mage\Checkout\Model\Type\Onepage.php. You can copy paste Onepage.php to your local folder add the below lines look like below code.
I hope it will work fine and it will be helpfull for someone.