Jump to content

Bootstrap Theme - Change Country, Currency Doesn't Change


Recommended Posts

Two languages - French (fr) and English (British - gb).

Two currencies - Euros and Pounds Sterling.

 

Under Localization -> Countries....   French is set to use Euros, and English is set to use Pounds Sterling (or GBP).

 

In front end, when I change the Language in the top Nav item - the currency doesn't change.

 

I have tried it with:

 

 - Localization -> Localization -> Set language from browser = on and off

 - Localization -> Localization -> Set default country from browser language = on and off

 

I have tried flushing cache.

 

I have tried Geolocation on and off.

 

Nothing works.

 

Looked at JS console for any JS errors.

Only message that comes up is...

 

https://www.facebook.com/connect/ping?client_id=334341610034299&domain=www.c6656011.myzen.co.uk&origin=1&redirect_uri=http%3A%2F%2Fstaticxx.facebook.com%2Fconnect%2Fxd_arbiter.php%3Fversion%3D42%23cb%3Df2e95447c%26domain%3Dwww.c6656011.myzen.co.uk%26origin%3Dhttp%253A%252F%252Fwww.c6656011.myzen.co.uk%252Ff12ce3d00%26relation%3Dparent&response_type=token%2Csigned_request%2Ccode&sdk=joey

 

Given URL is not permitted by the Application configuration: One or more of the given URLs is not permitted by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains."

 

But I think this is related to facebook....

 

Please help.

 

Thank you.

Link to comment
Share on other sites

 

Under Localization -> Countries....   French is set to use Euros, and English is set to use Pounds Sterling (or GBP).

France is set to Euros, United Kingdom  is sest to GBP, as one cannot assign currency to a language.

 

In front end, when I change the Language in the top Nav item - the currency doesn't change.

This is normal native behavior,  you would need custom code or some module that would support this.  

 

I have tried it with:

 

 - Localization -> Localization -> Set language from browser = on and off

 - Localization -> Localization -> Set default country from browser language = on and off

    This is only useful when the visitor country has browser lange of en-gb.  If just en the country would not be avail.  I don't find this being enable very useful'

  

 

 

Please see in quote 'red' for some feedback.  I hope this explains native so you better understand that what you are expecting is not supported.  You can consider using preferences-->geolocation native feature, this will help detect the inbound countries  default currency.

Link to comment
Share on other sites

Hi,

 

I have found the solution in this post on the forum:

 

http://www.prestashop.com/forums/topic/52019-change-currency-automatically-when-switching-from-one-language-to-another/page-2?do=findComment&comment=1698248

 

I am currently using Prestashop v.1.6.1.4 and the solution works perfectly

 

Just remember to change the language and currencyids to suit your own languages and ids in switch($id_lang) {

 

In my case I have two languages and two currencys - so my switch($id_lang) { looks like....

 

switch($id_lang) {

case 1:
$cookie->id_currency = 2;
self::switchCurrencyLinked(2);
break;
case 2:
$cookie->id_currency = 1;
self::switchCurrencyLinked(1);
break;
}
 
Hope this is helpful to other people - full respect to those who developed the solution.
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...