mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2025-04-01 11:00:23 +02:00
mirakl angebotskonfiguration multiple categories
This commit is contained in:
parent
35e2feee2e
commit
e71da793a3
@ -2,10 +2,39 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
* SPDX-FileCopyrightText: 2024 OpenXE project
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: LicenseRef-EGPL-3.1
|
* SPDX-License-Identifier: LicenseRef-EGPL-3.1
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
JSON example for field_map
|
||||||
|
|
||||||
|
{
|
||||||
|
"katalogkonfiguration": {
|
||||||
|
"kategorie": {"feld": "freifeld_Kategorie"}
|
||||||
|
},
|
||||||
|
"angebotskonfiguration":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"kategorien": ["Schrauben"],
|
||||||
|
"felder": {
|
||||||
|
"product_id_type": {"wert": "SHOP_SKU"},
|
||||||
|
"product_id": {"feld": "nummer"},
|
||||||
|
"shop_sku": {"feld": "nummer"},
|
||||||
|
"price": {"feld": "preis"},
|
||||||
|
"description": "freifeld_Kategorie",
|
||||||
|
"internal_description": {"eigenschaft": "Mirakl Steuertext"},
|
||||||
|
"reversecharge": {"wert": "false","zusatzfeld": true},
|
||||||
|
"warehouse": {"wert": "1","zusatzfeld": true}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
class Shopimporter_Mirakl extends ShopimporterBase {
|
class Shopimporter_Mirakl extends ShopimporterBase {
|
||||||
|
|
||||||
private $app;
|
private $app;
|
||||||
@ -320,9 +349,11 @@ class Shopimporter_Mirakl extends ShopimporterBase {
|
|||||||
foreach ($this->field_map['angebotskonfiguration'] as $offer_field_entry) {
|
foreach ($this->field_map['angebotskonfiguration'] as $offer_field_entry) {
|
||||||
|
|
||||||
$kategorie = $this->GetFieldValue($article, $this->field_map['katalogkonfiguration']['kategorie']);
|
$kategorie = $this->GetFieldValue($article, $this->field_map['katalogkonfiguration']['kategorie']);
|
||||||
if ($offer_field_entry['kategorie'] != $kategorie && $offer_field_entry['kategorie'] != null) {
|
if ($offer_field_entry['kategorien'] != null) {
|
||||||
|
if (!in_array($kategorie,$offer_field_entry['kategorien'])) {
|
||||||
continue;
|
continue;
|
||||||
};
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Check Required attributes
|
// Check Required attributes
|
||||||
$required = [
|
$required = [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user