govindbaker Posted February 18, 2016 Share Posted February 18, 2016 Hi, I have a new site that we are trying to finish off. http://austinracing.shopcreator.com/index.php?id_product=16&controller=product Unfortunately there appears to be an issue with changing currencies. I have set up 2 currencies. USD and GBP. When I change to USD the ajax request is made and appears to pass through what is expected. Then it reloads the product page but when it does it has not changed the currency. I have checked and it appears to change the encrypted cookie value in my browser but the currency is still in pounds. I have changed the setting to get currency/country from browser settings to off as has been suggested elsewhere but this makes no difference. I have gone into the ChangeCurrencyController and checks that it gets there and outputted the $this->context->cookie->id_currency which is showing as changed (14 USD). But when I output the same value in the init of the product controller it is showing as 2 (GBP). Any ideas why the cookie might be being overridden when the page reloads back to the default currency. Any help would be much appreciated. Thanks, Govind Link to comment Share on other sites More sharing options...
El Patron Posted February 18, 2016 Share Posted February 18, 2016 Hi Govind welcome to PrestaShop, great looking shop. I've seen this issue and it seems related often to the back office-->localization-->localization Where it says Set default country from browser language Disable and retest Link to comment Share on other sites More sharing options...
govindbaker Posted February 18, 2016 Author Share Posted February 18, 2016 Hi Govind welcome to PrestaShop, great looking shop. I've seen this issue and it seems related often to the back office-->localization-->localization Where it says Set default country from browser language Disable and retest Thanks for your response but as stated I have already changed this setting and it has made no difference Link to comment Share on other sites More sharing options...
El Patron Posted February 18, 2016 Share Posted February 18, 2016 Thanks for your response but as stated I have already changed this setting and it has made no difference sorry about that, I missed it. You may want to contact the theme developer, this works perfectly fine in native. Link to comment Share on other sites More sharing options...
govindbaker Posted February 18, 2016 Author Share Posted February 18, 2016 Do you have any idea at all where I could start looking? It seems to call the correct things so just wondered where to start looking into where cookies get encrypted and set? Link to comment Share on other sites More sharing options...
hasbender Posted August 15, 2016 Share Posted August 15, 2016 (edited) Similiar problem happened to me without any direct clues, perhaps upgrade to newer jQuery broke it. I had modified Tools.js setCurrency function as: function setCurrency(id_currency) { $.ajax({ method: 'POST', headers: { "cache-control": "no-cache" }, url: baseDir + 'index.php' + '?controller=change-currency&id_currency='+parseInt(id_currency), success: function(msg) { location.reload(true); } }); } and now block currency is again working. Edited August 15, 2016 by hasbender (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now