How to add field in registration form in prestashop 1.7?

In my Prestashop I need not add some field in registration form. I tried in authentication.tpl and registration.tpl but not find any hint to add new field.Thanks in advance.

enter image description here


ANSWERS:


You may start digging in classes/form/CustomerFormatter.php under getFormat() method. There is an array of fields for the registration form. I would guess you can override that method from your theme folder instead of editing it directly.


You can only change the address fields (they appear on registration if you choose the standard registration in Preferences->Customers). To do this, you need to edit the countries required field:Fields

You can also set some fields in the customers menu, at the bottom (if you have b2b enable it will show other fields) enter image description here

To add different fields, you need a module or to edit a lot of files to display and save the fields.

NOTE: these screenshots are from 1.6 but 1.7 country address are identical.

EDIT: Based on your screenshot, you don't have the standard registration option. Not sure it's available in 1.7. Anyway, the phone number field, in Prestashop is related to the addres, and not the customer. It would be easy to remove the other fields, but to add the phone number for the customer and not the address would be a little more tricky and would involve either create an address for that customer, or alter the customer table, class and forms.

One suggestion I can make is to translate the Company field to Phone number, and make it not optional. That would solve one problem.



 MORE:


 ? Prestashop 1.6 Paypal Module: Customer getting payment error even that payment success
 ? Prestashop: Out of Memory (allocated ...) in ../../../classes/Configuration.php
 ? PrestaShop backend, Fatal error in ajax call
 ? Cron script Prestashop (php)
 ? How to find .tpl file of navbar
 ? Prestashop Geoip module - missing country
 ? Using PHP code in Smarty tpl FIle
 ? Create custom page in Prestashop 1.5.3
 ? How to create a new page in prestashop admin panel?
 ? Confused about prestashop PDF generated process. Where is the code to handle the logic?