cancel
Showing results for 
Search instead for 
Did you mean: 

First name cannot be empty

First name cannot be empty

Hello,

 

I've installed magento recently and I am having some trouble with registering accounts.

 

When I am trying to checkout, no matter if I choose as a Guest or create an account, when I enter all the fields and try to go to the next step I get an error

 

"The first name cannot be empty., The last name cannot be empty."

 

How can I fix that?

 

Regards.

George

10 REPLIES

Re: First name cannot be empty

Hi @xdelios 

 

The error is a result of Magento running through requried attributes and using there attribute validation. I assume you haven't removed the first and lastname from the checkout process, or renamed them or made them one field. You need to check the Customer object.

 

Mage_Customer_Model_Customer

 

And see what values are passed to this object. If they are empty you will have to backtrack a bit further.

 

 

Re: First name cannot be empty

Hello,

 

Thank you for you reply.

Unfortunately I am new to the Magento platform so I can really say I understand what you mean.

 

Is there some sort of guide for doing this?

You probably assume correct that I haven't removed anything from the checkout process.

 

Regards,

George


Theis Corfixen wrote:

Hi @xdelios 

 

The error is a result of Magento running through requried attributes and using there attribute validation. I assume you haven't removed the first and lastname from the checkout process, or renamed them or made them one field. You need to check the Customer object.

 

Mage_Customer_Model_Customer

 

And see what values are passed to this object. If they are empty you will have to backtrack a bit further.

 

 


 

Re: First name cannot be empty

Is there anyone with a solution to this problem?

Re: First name cannot be empty

Hi @xdelios 

 

If you are not very confirable looking around in the code you properly need a developer to help you out, but if you are. As mentioned you need to take a look around the validate method of the Mage_Customer_Model_Customer object

 

This is located in app/code/core/Mage/Core/Model/Customer.php

 

 

Re: First name cannot be empty

If you have not modified any core files/template files there should not be an issue with the validation.

 

Have you installed a custom template or extensions?

 

Can you post your website URL so i can have a look?


Freelance Web Developer - Graphic Designer - SEO Analyst
Conor Rhys Tomkins

Re: First name cannot be empty

Hello,

 

I ended up commenting out some lines in customer.php file and its working fine now.

 

Don't know if I have done well but after some search over at google others have done the same to resolve this error.

 

Just to answer your thoughts, I havent touched any of the core files before so maybe it was a theme error or maybe an extension one.

 

Regards

Re: First name cannot be empty

Glad its resolved.

 

Installing extensions can cause issues with core Magento functionality, after installing each extension is good practise to do a test purchase on your store because its almost impossible to predict what may break!

 

Happy coding.


Freelance Web Developer - Graphic Designer - SEO Analyst
Conor Rhys Tomkins

Re: First name cannot be empty

Hi @xdelios 

 

I would never say its good practice just to edit out a line in the core, since it will break if you ever want to update your store. If however you plan on doing this defendly make a note somewhere so you remember what you changed, wether it is in your version controll tool of choice or just some old txt file :-).

 

But I'm glad you solved your problem :-)

Re: First name cannot be empty

I too have been having this issue, & cannot find anyone to help me. I followed the instructions & was able to access the code in the customer.php file, comparing the code in my store to what it should be, I found no differences, however, I am NOT a programmer & don't want to mess around in the code.

I had extensions installed and had each developer in the reverse order of installation check their software. Each stated that with or without the software the error still occurred. I contacted the developer who set up my store in the first place, and pointed him to the resolutions given in this forum, but he insists the problem lies within the shipping suite extension & will not troubleshoot for me. So basically, I have a store that I cannot use.

Can anyone point me to a technical support team that won't over charge me? I've looked online, & pricing averages $150 per hour with a 5 hour minimum required. I cannot afford that.