Jump to content

How to customize registration form? Need account type and address.


revv83

Recommended Posts

Hello. Because of my business strategy I need to insert the account type selection (company or private customer) and immediately require to fill Company name and Vat number fields when company account type selected. Address will be required too on the same step. After registration I need still possibility to change address so far. Is there any module that allows these functions? And how can I do this manually in code? If this is not very difficult I can try to do it. Earlier I added custom address fields using great tutorial on nemops.com. Thanks in advance.

Edited by revv83 (see edit history)
Link to comment
Share on other sites

I'll explain again... I've registration in one page with address. First of all I need to choose type of account via radiobuttons: private or business. When I select business type then I want to see two required fields: Company field and VAT number in the address section and the rest of address form of course. But when I select private account type I don't want to see Company and VAT number. If I select business account I need to automatic set this customer to group Company when submiting registration form (I think about Customers --> Groups in Back office).

This would be the best, but if this is to difficult to implement I can stay without account type selection but then I need to require Vat number if Company field is filled (not empty). So Company field is not mandatory but if I want to create account as company I must type something in Company field and then vat number must be mandatory field.

Please help. Thanks in advance.

Edited by revv83 (see edit history)
Link to comment
Share on other sites

You will need to do some custom coding here.

First, I'd enable vat and company so that everyone can see them. Then, amend the address.tpl template so that you can add the radio with personal/business.
Within it, have some javascript hide the fields if customer is selected.

Next, you need to extend the address object so that it accepts the extra field, as I describe here: http://nemops.com/extending-prestashop-objects/#.VjSEdLfnvmg
Lastly, the authcontroller. You need to make the company and vat required only if business was selected in the radio

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