mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-11-14 20:17:14 +01:00
Shopware6: apply taxId on variants as well and small bug fixes (maybe for PHP8.1)
This commit is contained in:
parent
6feaa03b8e
commit
9eb958a1a6
@ -2725,7 +2725,7 @@ class Shopimporter_Shopware6 extends ShopimporterBase
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach ($internalPropertyGroupValues as $internalPropertyGroupValue => $valueNotNeeded) {
|
foreach ($internalPropertyGroupValues as $internalPropertyGroupValue => $valueNotNeeded) {
|
||||||
if (!array_key_exists($internalPropertyGroupValue, $internalGroupPropertiesToShopwareId[$propertyGroupName])) {
|
if (!array_key_exists($internalPropertyGroupValue, $internalGroupPropertiesToShopwareId[$propertyGroupName] ?? [])) {
|
||||||
$newOptionData = [
|
$newOptionData = [
|
||||||
'name' => (string)$internalPropertyGroupValue
|
'name' => (string)$internalPropertyGroupValue
|
||||||
];
|
];
|
||||||
@ -2798,6 +2798,13 @@ class Shopimporter_Shopware6 extends ShopimporterBase
|
|||||||
$isCloseOut = true;
|
$isCloseOut = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($variant['umsatzsteuer'] == 'normal' && !empty($this->normalTaxId))
|
||||||
|
$taxId = $this->normalTaxId;
|
||||||
|
else if ($variant['umsatzsteuer'] == 'ermäßigt' && !empty($this->reducedTaxId))
|
||||||
|
$taxId = $this->reducedTaxId;
|
||||||
|
else
|
||||||
|
$taxId = $this->getTaxIdByRate($variant['steuersatz']);
|
||||||
|
|
||||||
$variantProductData = [
|
$variantProductData = [
|
||||||
'active' => $active,
|
'active' => $active,
|
||||||
'isCloseout' => $isCloseOut,
|
'isCloseout' => $isCloseOut,
|
||||||
@ -2820,7 +2827,7 @@ class Shopimporter_Shopware6 extends ShopimporterBase
|
|||||||
],
|
],
|
||||||
'stock' => (int)$stock,
|
'stock' => (int)$stock,
|
||||||
'ean' => null,
|
'ean' => null,
|
||||||
'taxId' => $this->getTaxIdByRate($variant['steuersatz']),
|
'taxId' => $taxId,
|
||||||
];
|
];
|
||||||
if(!empty($weight)){
|
if(!empty($weight)){
|
||||||
$variantProductData['weight'] = $weight;
|
$variantProductData['weight'] = $weight;
|
||||||
@ -2837,7 +2844,7 @@ class Shopimporter_Shopware6 extends ShopimporterBase
|
|||||||
foreach ($internalVariantMatrixData as $expression) {
|
foreach ($internalVariantMatrixData as $expression) {
|
||||||
if (!in_array(
|
if (!in_array(
|
||||||
$internalGroupPropertiesToShopwareId[$expression['name']][$expression['values']],
|
$internalGroupPropertiesToShopwareId[$expression['name']][$expression['values']],
|
||||||
$existingCombinationsByNumber[$productNumber]['options'],
|
$existingCombinationsByNumber[$productNumber]['options'] ?? [],
|
||||||
false)) {
|
false)) {
|
||||||
$renewVariant = true;
|
$renewVariant = true;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user