mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2025-03-30 18:10:23 +02:00
Small bugfix in presta importer, improve steuersaetze.php
This commit is contained in:
parent
5539c9849c
commit
d705d1a3eb
@ -203,10 +203,10 @@ class Shopimporter_Presta extends ShopimporterBase
|
|||||||
$cart['bestelldatum'] = strval($order->date_add);
|
$cart['bestelldatum'] = strval($order->date_add);
|
||||||
|
|
||||||
$carrier = $this->prestaRequest('GET', "carriers/$order->id_carrier");
|
$carrier = $this->prestaRequest('GET', "carriers/$order->id_carrier");
|
||||||
$cart['lieferung'] = strval($carrier->name);
|
$cart['lieferung'] = strval($carrier->carrier->name);
|
||||||
|
|
||||||
$customer = $this->prestaRequest('GET', "customers/$order->id_customer");
|
$customer = $this->prestaRequest('GET', "customers/$order->id_customer");
|
||||||
$cart['email'] = strval($customer->email);
|
$cart['email'] = strval($customer->customer->email);
|
||||||
|
|
||||||
$invoiceAddress = $this->prestaRequest('GET', "addresses/$order->id_address_invoice");
|
$invoiceAddress = $this->prestaRequest('GET', "addresses/$order->id_address_invoice");
|
||||||
$invoiceAddress = $invoiceAddress->address;
|
$invoiceAddress = $invoiceAddress->address;
|
||||||
@ -263,6 +263,14 @@ class Shopimporter_Presta extends ShopimporterBase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$taxes = [];
|
||||||
|
$this->app->erp->RunHook('getTaxRatesFromShopOrder', 2, $taxedCountry, $taxes);
|
||||||
|
|
||||||
|
if (isset($taxes['normal']) && $taxes['normal'] > 0)
|
||||||
|
$cart['steuersatz_normal'] = $taxes['normal'];
|
||||||
|
if (isset($taxes['ermaessigt']) && $taxes['ermaessigt'] > 0)
|
||||||
|
$cart['steuersatz_ermaessigt'] = $taxes['ermaessigt'];
|
||||||
|
|
||||||
$cart['articlelist'] = [];
|
$cart['articlelist'] = [];
|
||||||
foreach ($order->associations->order_rows->order_row as $order_row) {
|
foreach ($order->associations->order_rows->order_row as $order_row) {
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
**** COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
|
**** COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
|
||||||
*
|
*
|
||||||
@ -10,8 +10,8 @@
|
|||||||
* to obtain the text of the corresponding license version.
|
* to obtain the text of the corresponding license version.
|
||||||
*
|
*
|
||||||
**** END OF COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
|
**** END OF COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
|
||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Xentral\Components\Http\JsonResponse;
|
use Xentral\Components\Http\JsonResponse;
|
||||||
@ -154,7 +154,7 @@ class Steuersaetze {
|
|||||||
$ret = [];
|
$ret = [];
|
||||||
$taxes = $this->app->DB->SelectArr(
|
$taxes = $this->app->DB->SelectArr(
|
||||||
sprintf(
|
sprintf(
|
||||||
"SELECT DISTINCT `satz`
|
"SELECT DISTINCT `type`, `satz`
|
||||||
FROM `steuersaetze`
|
FROM `steuersaetze`
|
||||||
WHERE `aktiv` = 1
|
WHERE `aktiv` = 1
|
||||||
AND (`country_code` = '%s' OR (`bezeichnung` = '%s' AND `country_code` = ''))",
|
AND (`country_code` = '%s' OR (`bezeichnung` = '%s' AND `country_code` = ''))",
|
||||||
@ -163,7 +163,7 @@ class Steuersaetze {
|
|||||||
);
|
);
|
||||||
if(!empty($taxes)) {
|
if(!empty($taxes)) {
|
||||||
foreach($taxes as $rates) {
|
foreach($taxes as $rates) {
|
||||||
$ret[] = $rates['satz'];
|
$ret[$rates['type']] = $rates['satz'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user