OC2.3, main page won't use the cookie currency value
Posted: Thu Sep 03, 2020 11:56 am
Hi,
If I change the cookie currency value from USD to JPY, for example, from an external myOCsite.com/currencyswitch.php page like this:
I can verify the currency value is set to JPY in the cookie via the cookie viewer in Chrome.
**BUT**
When I ctrl-r my opencart browser window, USD still loads. And when I check the cookie value in Chrome, it has changed back to USD.
Can anyone shed some light on this? What am I missing? I'm trying to create a separate page on my OC site that loads fast and has a currency switcher, all my code, just accessing the OC db.
thanks,
takayuki
If I change the cookie currency value from USD to JPY, for example, from an external myOCsite.com/currencyswitch.php page like this:
Code: Select all
$ccode='JPY';
setcookie('currency', $ccode, time() + 60 * 60 * 24 * 30, '/', ".myOCsite.com");
**BUT**
When I ctrl-r my opencart browser window, USD still loads. And when I check the cookie value in Chrome, it has changed back to USD.
Can anyone shed some light on this? What am I missing? I'm trying to create a separate page on my OC site that loads fast and has a currency switcher, all my code, just accessing the OC db.
thanks,
takayuki