Jump to content

Default currency BO versus FO


Zeryk

Recommended Posts

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

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

  • Like 1
Link to comment
Share on other sites

 

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

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...