Jump to content

Adding new Customer field


kuba_w

Recommended Posts

Hi everyone,

I need to add 2 new fields for my customer (pesel and nrleg). I followed instructions from this topic:

http://www.prestashop.com/forums/topic/13859-solved-adding-new-fields-to-new-account/

but it didnt worked. I changed files:

 

authentication.tpl - i've added fields in registration form

customer.php:

/** @var string pesel */
public   $pesel;

/** @var string nrleg */
public   $nrleg;

as fields in n class and

 $fields['pesel'] = pSQL($this->pesel);
 $fields['nrleg'] = pSQL($this->nrleg);

to pass values of new fields.

 

Of course, i have also added new fields in my database. The thing is - when i'll set these field to required i get "Fatal error (Customer ->pesel is empty)". If this field is not required, the registration process can finish but values are not in database.

 

I'm using prestashop 1.4.4.1...

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...