This commit is contained in:
2025-05-26 10:13:58 +02:00
parent 6bc8b4d7d4
commit 88f4b3423e

View File

@@ -121,8 +121,14 @@ foreach ($existingXml->xpath('//o') as $offer) {
['id_x13gpsr_responsible_manufacturer' => $responsibleManufacturerId]
);
$responsibleElement = $offer->addChild('a', "<![CDATA[$manufacturerName]]>");
$responsibleElement->addAttribute('name', 'Producent odpowiedzialny');
$attrs = $offer->xpath('attrs');
if ($attrs && isset($attrs[0]))
{
$attrsElement = $attrs[0];
$attrElement = $attrsElement->addChild('a');
$attrElement->addAttribute('name', 'Producent odpowiedzialny');
$attrElement[0] = $manufacturerName;
}
}
}