Reputation: 207
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.
Upvotes: 3
Views: 13362
Reputation: 1
I had a similar problem because I needed to include mobile phone for user registration and for admin use.
I solved it in PS 1.7 by adding in "ps_address_format" table the string " phone_mobile" in the "format" column. I suppose to add other field, this field have to be a field in the table "ps_address".
Upvotes: 0
Reputation: 111
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.
Upvotes: 2
Reputation: 2987
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:
You can also set some fields in the customers menu, at the bottom (if you have b2b enable it will show other fields)
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.
Upvotes: -1