Not for official support
We do not provide technical support in this forum.
If you want to contact our customer support, please use our support form.

Take the chance to buy
Shop-Script 5 at the low price
Save $30 only until May 31!
Your last chance!
8 days left

You are not logged in.

#1 2012-02-23 08:29

dariukui
Member

Currency and customer language

Hello,

It is possible to make that if customer change language currency must be changed automaticaly. Example if default currency is USD but if  customer choose German language (or customer was directly redirected to German version of store front) currency must be automaticaly swiched to EUR.

Thanks for help in advance.

Bes regards,
D

Offline

 

#2 2012-02-24 01:49

rat
Administrator

Re: Currency and customer language

Modify file published/SC/html/scripts/modules/test/class.test.php by changing

Code:

if(isset($_POST["current_currency"])){
  currSetCurrentCurrency( $_POST["current_currency"] );
  RedirectSQ();
}

to

Code:

if(isset($_POST["current_currency"])){
  currSetCurrentCurrency( $_POST["current_currency"] );
  RedirectSQ();
}else{
  $new_currency_iso3 = '';
  switch (LanguagesManager::getCurrentLanguage()->iso2){
    case 'de':{
      $new_currency_iso3 = 'EUR';
      break;
    }
    case 'en':{
      $new_currency_iso3 = 'USD';
      break;
    }
  }
  if ($new_currency_iso3){
    $new_currency = currGetCurrencyByISO3 ($new_currency_iso3);
    currSetCurrentCurrency ($new_currency['CID']);
  }
}

Be careful what you wish for — you might get it.

Offline

 

#3 2012-02-24 04:47

dariukui
Member

Re: Currency and customer language

It works!! Many thanks Rat for your help.

Offline

 

Board footer

Powered by PunBB