Jump to content

address creation form and state field


Recommended Posts

open localization > countries tab in your back office

can you check this option:

JAOlQT8.png

 

if you disable it, problem still occur?

Yes, got the same problem.

 

The javascript,  on country change, checks if there are states of that country. If there aren't, it hides the relevant select. Formerly, that's just right. What's not right are 2 things:

 

1. IF for that country, for prestashop and curriers in general, state selection IS required, than javascript should always find the relevant states.

 

2. IF there's a possibility that states are not found, despite the fact that for curriers they are required, than at least state selection should not be required.

 

I also tried to 'Import Localization Pack' for france. The system says it's imported. Though, javascript doesn't find any france state.

 

 

 

 

 

 

 

 

 

 

 

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

I posted an issue on the tracker. But I also found a quite simple thing: there are no states in the france pack:

https://github.com/PrestaShop/PrestaShop/blob/development/localization/fr.xml

so simply they cannot be imported. But, why the hell?

Is maybe that states aren't usually required in french addresses? If so, why javascript still require them?

Link to comment
Share on other sites

  • 3 months later...

Hi, in the address page, I activated 2 countries: italy and france. If I select france, the state field will disappear. But then if I send the form, I'll get an error stating that the state field is required.

 

How can I fix the problem?

Hi

 

Go countries/France and tick no to "that counrty has states"

 

Il faut aller à Pays/France et cocher non à "ce pays contient des états/régions".

 

Hope this help

 

 

Oops,

Sorry didn't realize the solution was already proposed. It did work for me actually.

Edited by Yanoura (see edit history)
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...