Skip to content

Commit

Permalink
Do not set language directly
Browse files Browse the repository at this point in the history
- leave it to auth client to forward browser language header
  • Loading branch information
marekgach committed Nov 12, 2019
1 parent 63df154 commit 90dcf87
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions smartsupp/controllers/admin/AdminSmartsuppAjax.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand All @@ -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_,
));
Expand Down

0 comments on commit 90dcf87

Please sign in to comment.