Jump to content

Vat_number show always not mandatory version 1.6.


Recommended Posts

I want that, on inscription form, vat_number show always with company filled or not. That field should not be required.

 

I have achieved this changing authentication.tpl on version 1.5.6, but now on 1.6.1, at least with the theme i use, the file seems to be very different and i don't know what to do.

 

In Portugal, both individuals and companies have a vat_number, but it's possible to sell without it.

 

What should I do?

 

Thank's

 

Arménio Boavida

Link to comment
Share on other sites

Search for vat_number in all /themes/your_theme/*.tpl files and edit related templates (probably not all found).

Thank's.

I think i've found the solution changing the file js/tools/vatManagement.js on my theme directory and replacing $('#vat_number, #vat_number_block').hide() with $('#vat_number, #vat_number_block').show(); even if there is no company name.

 

I'm investigating if it is specific for the theme i use or also valid for the default theme.

 

After that i will mark this post as solved. If not i will ask for further help.

  • Like 1
Link to comment
Share on other sites

Thank's.

I think i've found the solution changing the file js/tools/vatManagement.js on my theme directory and replacing $('#vat_number, #vat_number_block').hide() with $('#vat_number, #vat_number_block').show(); even if there is no company name.

 

I'm investigating if it is specific for the theme i use or also valid for the default theme.

 

After that i will mark this post as solved. If not i will ask for further help.

it's not enough.

 

Some experiments i has done before, changed authentication.tpl the following way

 

line 191 authentication.tpl {if $field_name eq "company" && $b2b_enable} replaced with {if $field_name eq "company"}

line 197 authentication.tpl <div id="vat_number" style="display:none;"> replaced with <div id="xxx">

line 541 authentication.tpl <div id="vat_number" style="display:none;"> replaced with <div id="vat_number">

Link to comment
Share on other sites

it's not enough.

 

Some experiments i has done before, changed authentication.tpl the following way

 

line 191 authentication.tpl {if $field_name eq "company" && $b2b_enable} replaced with {if $field_name eq "company"}

line 197 authentication.tpl <div id="vat_number" style="display:none;"> replaced with <div id="xxx">

line 541 authentication.tpl <div id="vat_number" style="display:none;"> replaced with <div id="vat_number">

div id =xxx may stay div id =vat_number (it was a solution i've found on a similar topic on this forum to avoid validation of vat_number)

 

i don't know if all thar changes are necessary but it works.

 

you must also put vat_number on correct position on adress_format (for me after company)

 

I will mark this topic as solved

Link to comment
Share on other sites

  • 2 years later...
On 10/09/2015 at 11:33 PM, armboa said:

Thank's.

I think i've found the solution changing the file js/tools/vatManagement.js on my theme directory and replacing $('#vat_number, #vat_number_block').hide() with $('#vat_number, #vat_number_block').show(); even if there is no company name.

 

I'm investigating if it is specific for the theme i use or also valid for the default theme.

 

After that i will mark this post as solved. If not i will ask for further help.

 

 

same here, this JS solution work out for me , using prestashop v 1.6.1.0

thanks

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