Jump to content
thirty bees forum

ariom

Members
  • Posts

    40
  • Joined

  • Last visited

  • Days Won

    2

Community Answers

  1. ariom's post in Paypal checkout: set LOCALECODE variable to IT was marked as the answer   
    Try to help myself .. 🙂
    Maybe I was looking the wrong place ... i checked through module's classes ansd controllers, but i think the right file is the paypal.php on the module's root ... i find out and add or change the iso code as follow on the functions getLocaleByIso and hoockPayment
     
    public static function getLocaleByIso($iso) { switch (strtolower($iso)) { case 'it': return 'it_IT'; case 'fr': return 'fr_FR'; case 'hk': return 'zh_HK'; case 'cn': return 'zh_CM'; case 'tw': return 'zh_TW'; case 'xc': return 'zh_XC'; case 'dk': return 'da_DK'; case 'nl': return 'nl_NL'; case 'gb': return 'en_GB'; case 'de': return 'de_DE'; case 'il': return 'he_IL'; case 'id': return 'id_ID'; case 'jp': return 'ja_JP'; case 'no': return 'no_NO'; case 'pt': return 'pt_PT'; case 'pl': return 'pl_PL'; case 'ru': return 'ru_RU'; case 'es': return 'es_ES'; case 'se': return 'sv_SE'; case 'th': return 'th_TH'; case 'tr': return 'tr_TR'; default: return 'en_US'; } } and here ....
    public function hookPayment($params) { $isoLang = [ 'en' => 'en_US', 'it' => 'it_IT', 'fr' => 'fr_FR', 'de' => 'de_DE', 'nl' => 'nl_NL', ]; $this->context->smarty->assign( [ 'logos' => PayPalLogos::getLogos($this->getLocale()), static::LIVE => \Configuration::get(static::LIVE), 'use_mobile' => true, 'PayPal_lang_code' => (isset($isoLang[$this->context->language->iso_code])) ? $isoLang[$this->context->language->iso_code] : 'it_IT', 'params' => $params, ] ); Following some more change for express and plus checkout ... this is only for standard
    I don't know if is working now ... i will update the post if solved after tested(and maybe publish an "how to^ with step by step on the italian forum if somebody find my same problem) ....
×
×
  • Create New...