Zeryk Posted May 26, 2017 Share Posted May 26, 2017 In BO I have default currency CNY , but I was wondering if its possible to make a default currency on website $. I mean I don't want to change my default currency but I need when customers abroad open my shop , it would give prices in $ without taping on currency button. Problem is , that it seem like they don't notice there is any. Ive got few feedbacks saying" would be nice to have prices in $ or Eur. " Im tired to txt everyone " check top right corner " :-( and I need to keep my default CNY currency in my BO. Link to comment Share on other sites More sharing options...
DataKick Posted May 26, 2017 Share Posted May 26, 2017 Hi, unfortunately there's no such configuration option. You have to make changes to php code. But it's quite easy. Edit file classes/Tools.php, find function setCurrency (line ~613) and replace if (!Validate::isLoadedObject($currency) || (bool)$currency->deleted || !(bool)$currency->active) { $currency = Currency::getCurrencyInstance(Configuration::get('PS_CURRENCY_DEFAULT')); } with if (!Validate::isLoadedObject($currency) || (bool)$currency->deleted || !(bool)$currency->active) { $currency = Currency::getCurrencyInstance(Currency::getIdByIsoCode('EUR')); } Don't forget to change 'EUR' to iso code of currency you want as default on frontend 1 Link to comment Share on other sites More sharing options...
Zeryk Posted May 26, 2017 Author Share Posted May 26, 2017 Hi, unfortunately there's no such configuration option. You have to make changes to php code. But it's quite easy. Edit file classes/Tools.php, find function setCurrency (line ~613) and replace if (!Validate::isLoadedObject($currency) || (bool)$currency->deleted || !(bool)$currency->active) { $currency = Currency::getCurrencyInstance(Configuration::get('PS_CURRENCY_DEFAULT')); } with if (!Validate::isLoadedObject($currency) || (bool)$currency->deleted || !(bool)$currency->active) { $currency = Currency::getCurrencyInstance(Currency::getIdByIsoCode('EUR')); } Don't forget to change 'EUR' to iso code of currency you want as default on frontend Thanks a lot! it works like I need:-) Link to comment Share on other sites More sharing options...
El Patron Posted May 26, 2017 Share Posted May 26, 2017 (edited) https://www.prestaheroes.com/en-us/modules/front-office-default-currency this module support configured currency as default front office currency Edited October 25, 2018 by El Patron (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