From 90dcf87e27670c7192c2f5f600a73119808115c6 Mon Sep 17 00:00:00 2001 From: Marek Gach Date: Tue, 12 Nov 2019 19:38:03 +0100 Subject: [PATCH] Do not set language directly - leave it to auth client to forward browser language header --- smartsupp/controllers/admin/AdminSmartsuppAjax.php | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/smartsupp/controllers/admin/AdminSmartsuppAjax.php b/smartsupp/controllers/admin/AdminSmartsuppAjax.php index ee23b9c..ca5444c 100644 --- a/smartsupp/controllers/admin/AdminSmartsuppAjax.php +++ b/smartsupp/controllers/admin/AdminSmartsuppAjax.php @@ -25,13 +25,6 @@ class AdminSmartsuppAjaxController extends ModuleAdminController { public $ssl = true; private $partnerKey = 'h4w6t8hln9'; - private $languageMap = array( - 'ag' => 'es', - 'mx' => 'es', - 'qc' => 'fr', - 'dh' => 'de', - 'gb' => 'en', - ); public function init() { @@ -53,15 +46,10 @@ public function init() Configuration::updateValue('SMARTSUPP_EMAIL', Tools::getValue('email')); break; case 'create': - $language = strtolower($this->context->language->iso_code); - if (array_key_exists($language, $this->languageMap)) { - $language = $this->languageMap[$language]; - } $response = $api->create(array( 'email' => Tools::getValue('email'), 'password' => Tools::getValue('password'), 'partnerKey' => $this->partnerKey, - 'lang' => $language, 'consentTerms' => 1, 'platform' => 'Prestashop ' . _PS_VERSION_, ));