Jump to content

Showing wrong default country on all address forms


Recommended Posts

Hi Guys. I hope you all are ok.

 

 I need your help :)  All address forms are showing the wrong default country  :(

 

I checked Localization > configuration  and everything looks ok. I cleared the cache too and I still see the wrong default country.

 

Can anyone tell me how I can fix it ? 

 

 

Thank you very much for your time. 

 

PrestaShop 1.6.0.9 

 

Liliana

 

 

 

 

Link to comment
Share on other sites

What is the id of the wrong one, and what the right one? Are they matching in the front office and back?

To check in the front, inspect the dropdown box with any debug console, and check the "value" attribute of the option reading the corresponding country

Link to comment
Share on other sites

Hi, thank you very much for your response.

 

 

The wrong ID is 21 (USA) (this is the one that is showing as default country for all address forms )   :(

The right ID should be 69 (Colombia) 

 

Please see image http://postimg.org/image/xsngdvrcx/

 

Yes, Colombia is the default country in the back office (Localization > configuration). 

 

 

 

What shall I do to make Colombia as the default country for all address forms ? 

 

Thank you very much in advanced.

 

 

Liliana M.

Using PrestaShop 1.6.0.9 

Link to comment
Share on other sites

Hi, 

 

The rs_id is because I'm using a SEO extension from Google Chrome, nothing to worry about.

 

I'm not using a custom OPC.

 

I'm very worried about that, I'm launching my new site next week, and the default country still says US :( It should say Colombia.
 
Liliana
Link to comment
Share on other sites

That's very odd, I am out of ideas honestly. It probably needs further and direct inspection, I suggest you hire a developer to find out what's wrong. He needs to print out the default country's value from the controller, and eventually inspect the database configuration table, which might be the culprit

Link to comment
Share on other sites

Hi,

 

I investigated further. Prestashop takes people's computer configuration to show the country on the address forms Drop Down list when I have more than one on the list (I sell to different countries). I tested with some friends in Colombia and it was the conclusion. All them got different default countries :( 
 
I think it is wrong, it should take IPs instead or use the configuration on Localization > configuration .
 
I will contact a programer.
 
Anyway, thank you very much for your time. 
 
Liliana
Link to comment
Share on other sites

That's odd, I always thought it took the ip really, did you find out where the code is spawning that? Try enabling geolocation by ip address in the preferences section -> geolocation. At any rate, is the database entry reflecting colombia?

Link to comment
Share on other sites

  • 1 month later...

Found out how to do it! With a little improvisation. If you need to change the selected country to your default country, you need to go into the authentication.tpl file and locate the line 

<option value="{$v.id_country}" {if ($sl_country == $v.id_country)} selected="selected"{/if}>{$v.name}</option>
 
And change it to:
<option value="{$v.id_country}" {if (17 == $v.id_country)} selected="selected"{/if}>{$v.name}</option>
 
Where 17 is the country code for me (UK). Simply change $sl_country to the country cod of your choice.
  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...