Jump to content

Removing last name in registration in 1.6.0.9


Recommended Posts

hi

I tried to use the advice from @vekia at this forum page

In classes/Customer.php and classes/Address.php I removed 'required' => true for

'lastname' => 	array('type' => self::TYPE_STRING, 'validate' => 'isName', 'size' => 32),

But it did not work for PrestaShop 1.6.0.9 

 

 

I have next error

TECHNICAL ERROR: unable to save account Details: Error thrown: [object Object] Text status: error

 

In chrome console i see 

 

post-832687-0-82401600-1410711992_thumb.png

Link to comment
Share on other sites

  • 1 month later...
  • 5 months later...
  • 11 months later...

hi

I tried to use the advice from @vekia at this forum page

In classes/Customer.php and classes/Address.php I removed 'required' => true for

'lastname' => 	array('type' => self::TYPE_STRING, 'validate' => 'isName', 'size' => 32),

But it did not work for PrestaShop 1.6.0.9 

 

 

I have next error

TECHNICAL ERROR: unable to save account Details: Error thrown: [object Object] Text status: error

 

In chrome console i see 

 You cannot just delete the required field because it's still in required 

 

1. Set customer lastname in database is NULL.

2. Delete required field "last name" in classes/ - Address.php and Customer.php.

3. Hide or delete lastname input in your themes/your-themes/- authentication.tpl & address.tpl.

4. Done.

 

Hope this will help you.

  • Like 1
  • Haha 1
Link to comment
Share on other sites

  • 1 year later...
  • 1 month later...

 You cannot just delete the required field because it's still in required 

 

1. Set customer lastname in database is NULL.

2. Delete required field "last name" in classes/ - Address.php and Customer.php.

3. Hide or delete lastname input in your themes/your-themes/- authentication.tpl & address.tpl.

4. Done.

 

Hope this will help you.

 

Hi every body, Can you explain more about step 1?  I don't know how to set custumer lastname in database to  NULL. Please help me.

Link to comment
Share on other sites

  • 3 months later...

Hi, I done same process and it is working. But, when customer accessing MY PERSONAL INFORMATION tab in account section, that still displaying Last Name as required field. So, Hide/Delete that input field from " /your-path-to-prestashop/themes/your-current-theme/identity.tpl ".

By making this, customer will not feel uncomfortable.

Hope you guys like this slight modification.

Link to comment
Share on other sites

  • 3 years later...

Does anyone know how to do this in version 1.7.6.3?
I'm looking for where I can change the possibility of input or even remove it in the registration forms, and on the identity page. Because this version seems to be very different from the others, it sends me to form_field, but it does not have defined fields.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...