apply customer language

This commit is contained in:
Andreas Palm 2023-02-21 17:14:56 +01:00
parent f495964d2b
commit d23c0f09dd

View File

@ -211,6 +211,11 @@ class Shopimporter_Presta extends ShopimporterBase
$customer = $this->prestaRequest('GET', "customers/$order->id_customer"); $customer = $this->prestaRequest('GET', "customers/$order->id_customer");
$cart['email'] = strval($customer->customer->email); $cart['email'] = strval($customer->customer->email);
$language = $this->prestaRequest('GET', "languages/{$customer->customer->id_lang}");
if ($language->language->iso_code == "en") {
$cart['kunde_sprache'] = 'englisch';
}
$invoiceAddress = $this->prestaRequest('GET', "addresses/$order->id_address_invoice"); $invoiceAddress = $this->prestaRequest('GET', "addresses/$order->id_address_invoice");
$invoiceAddress = $invoiceAddress->address; $invoiceAddress = $invoiceAddress->address;
$invoiceCountry = $this->prestaRequest('GET', "countries/$invoiceAddress->id_country"); $invoiceCountry = $this->prestaRequest('GET', "countries/$invoiceAddress->id_country");