Jump to content
amiehling

Mandatory company and ID in registration form PS 1.7

Recommended Posts

Hi!

 

I have tried several things to get the fields for Company and Identification (ID) mandatory in the customer registration form. I use PS 1.7.2.0 with B2B enabled.

 

Things I have done:

- Copied Address.php to override/classes using 'required' => true at the corresponding fields.

- Used the "Mandatory Fields"-section in Customers > Addresses.

- VAT number and company are listed under mandatory fields in International > Countries > [My country] > Edit.

 

Nothing helps.

 

Would appreciate any help! :-)

 

// Andreas

Share this post


Link to post
Share on other sites

I will give a partial answer myself :-)

 

I tried again using the correct settings here:

- Used the "Mandatory Fields"-section in Customers > Addresses.

- VAT number and company are listed under mandatory fields in International > Countries > [My country] > Edit.

 

Now I see that the fields are mandatory - but ONLY in step 2 of the checkout process.

Share this post


Link to post
Share on other sites

I will give a partial answer myself :-)

 

I tried again using the correct settings here:

- Used the "Mandatory Fields"-section in Customers > Addresses.

- VAT number and company are listed under mandatory fields in International > Countries > [My country] > Edit.

 

Now I see that the fields are mandatory - but ONLY in step 2 of the checkout process.

 

I advise switching to one page check out.  I recommend using a paid 3rd party OPC module in general.

Share this post


Link to post
Share on other sites

Did anyone succeed at making any fields other than the standard ones required? I am making the same attempts OP is doing in the previous posts but it seems undoable. I remember this being an issue also in version 1.6, time to fix it perhaps? Most people would argue it is a pretty basic functionality in a registration form to select which fields are supposed to be mandatory. No?

Share this post


Link to post
Share on other sites

Put the "->setRequired(true)" expression to the "company" and "siret" in /classes/form/CustomerFormatter.php. I've attached the picture.

customerformatterphp.jpg

Share this post


Link to post
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...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More