mirror of
https://github.com/retailcrm/prestashop-module.git
synced 2025-03-01 19:03:14 +03:00
Added combination attributes to ICML
This commit is contained in:
parent
34ce76b4a6
commit
78316bd4c7
@ -221,7 +221,8 @@ class RetailcrmCatalog
|
||||
foreach ($combinations as $combination) {
|
||||
$arSet = [
|
||||
'group_name' => $combination['group_name'],
|
||||
'attribute' => $combination['attribute_name'],
|
||||
'id_attribute_group' => $combination['id_attribute_group'],
|
||||
'attribute_name' => $combination['attribute_name'],
|
||||
];
|
||||
|
||||
$arComb[] = $arSet;
|
||||
@ -285,10 +286,15 @@ class RetailcrmCatalog
|
||||
|
||||
if (!empty($combinations)) {
|
||||
foreach ($arComb as $itemComb) {
|
||||
$item[mb_strtolower($itemComb['group_name'])] = htmlspecialchars($itemComb['attribute']);
|
||||
$item['combination'][$itemComb['id_attribute_group']] = [
|
||||
'group_name' => mb_strtolower($itemComb['group_name']),
|
||||
'attribute_name' => htmlspecialchars($itemComb['attribute_name']),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
unset($arComb);
|
||||
|
||||
yield RetailcrmTools::filter(
|
||||
'RetailcrmFilterProcessOffer',
|
||||
$item,
|
||||
|
@ -182,6 +182,18 @@ class RetailcrmIcml
|
||||
$e->appendChild($param);
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($offer['combination'])) {
|
||||
foreach ($offer['combination'] as $id => $comb) {
|
||||
$param = $this->dd->createElement('param');
|
||||
$param->setAttribute('code', $id);
|
||||
$param->setAttribute('name', $comb['group_name']);
|
||||
$param->appendChild(
|
||||
$this->dd->createTextNode($comb['attribute_name'])
|
||||
);
|
||||
$e->appendChild($param);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user