Jump to content

How to add a new field for Customers in Prestashop 1.6 ?


IBACK

Recommended Posts

Hello everybody,

 

i would like to add a new field for customers in prestashop 1.6

 

1/ i add a new field in Customer table (for example : my_date - Date type of course)

 

2/ i have to override the Customer Class

 

i found this example : 

class Customer extends CustomerCore{

    public function __construct($id = null)
    {
        parent::__construct($id);
    }

    //Overriding method customerExists
    public static function customerExists($email, $return_id = false, $ignore_guest = true)
    {
             $result = FALSE;           
  
            //Write custom your code here 


            return $result;
    }
    
}
?>

what is the custom code for adding my field "my_date" ?

 

3/ i have to modify the back office view too

 

this is the tree of files for /themes/default/template/controllers/customers :

 

required_fields.tpl

index.php

helpers/list/list_header.tpl and index.php

helpers/view/view.tpl and index.php

 

What are the files to modify ?

 

what are the modifications to apply ?

 

4/ i don't want that my new field appears in front office, only on back office

 

 

Any ideas ?

 

Thanks you in advance

 

FM

 

 

 

 

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