Jump to content

Registration error. Country


Recommended Posts

I have run into a problem that seems to be Prestashop core.

When you register as a new customer the system doesn't ask for the country. But if you need to change or add an address country is obligatory but the country dropdown in empty. This seems to be a well-known problem but I have not found a solution.

 

because we are a one-country shop, the easiest solution would be to make the country not obligatory. Where can I do that?

 

Please  help

 

Anders

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

Hi!

 

In which file can this line be found?

jv74.se/index.php?controller=address&id_address=5

 

<div class="required form-group">   <label for="id_country">Land <sup>*</sup></label>   <select id="id_country" class="form-control" name="id_country"></select>   </div>

If I comment it out and set the country id as default in the database it should solve the problem

Link to comment
Share on other sites

back office-->localization-->countries-->edit country-->here you can state if country has states or not.

 

note: any country can have states but few countries in native PS actually have them defined by default.

 

You can easily add states to a country back office-->localization-->states-->add state (and associate to your country

Link to comment
Share on other sites

Also if you import the localization file it will update the states automatically, example to this is Brazil by default there are no states, importing the localization pack adds all the states and associates them with Brazil and South America.

 

Try importing the localization pack, this should update all the states.

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

Some country does not have the states as per default included in localization pack. Germany is one of them, if you are talking about Germany. For these countries you should follow the tip of ElPatron: add the states manually by yourself. If you enabled to use states in County settings, than of course on registration form this field will appear. In this case or disable the states, or add them manually on you back-office. On older versions of Prestashop, this means the forks of German Community the states were included as per default, but as said, it never was a part of Prestashop native core.

 

Its not a bug, but a feature of Prestashop. States are available only for USA, Argentina, Brazil, Mexico, Indonesia, Italy Japan, Canada.

Link to comment
Share on other sites

I don't know, if there is a Swedish installation pack available, but if not you need to add this afterwards: 

 

Two options:

1) as tder170 told. You install it afterwards. Go to Tab "Localization -> Localization -> import localization pack ->  choose there "Sweden" and save.

 

OR

 

2) as ElPatron told. You should add Sweden like he added Colombia. Go to Tab Localization -> Country -> use "add new country" on top of right navigation buttons.

 

s. screen attached.Fill in all needed fields, choose Europe as Zone and save.

 

PS: if you want to activate Postal code check on registration, than you should also activate there the postal code "Does it need ZIP/postal code" = YES and set in the next field the format of Swedish Postal Code: NNNNN (for 5 characters).

 

post-741527-0-77582800-1473151148_thumb.png

  • Like 1
Link to comment
Share on other sites

Country dropdown is empty, cause the country is missing, i.e. Sweden is not a part of specific localization installation pack and you need to add the localization afterwards !

It's not a bug. For some countries there are no installation packs available and you need to take English, for than afterwards add your country.

 

Please follow the suggestions we gave you, although you are the opinion, that we didn't understand what you mean. Of course we do, and the solutions we already summarized in post #8. Furthermore read carefully the configuration possibilities you are having on tab localization -> countries. All correct configured there, will eliminate your problem.

 

Best thing is you simply use the first option I've named to you: Go to Tab "Localization -> Localization -> import localization pack ->  choose there "Sweden" and save.

  • Like 1
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...