From 88f4b3423e0ca170c05293d27282e7d157a00e20 Mon Sep 17 00:00:00 2001 From: Jacek Pyziak Date: Mon, 26 May 2025 10:13:58 +0200 Subject: [PATCH] update --- drmaterac.pl/ceneo_lulandia_feed.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drmaterac.pl/ceneo_lulandia_feed.php b/drmaterac.pl/ceneo_lulandia_feed.php index dbd3fdb..b6f3bcd 100644 --- a/drmaterac.pl/ceneo_lulandia_feed.php +++ b/drmaterac.pl/ceneo_lulandia_feed.php @@ -121,8 +121,14 @@ foreach ($existingXml->xpath('//o') as $offer) { ['id_x13gpsr_responsible_manufacturer' => $responsibleManufacturerId] ); - $responsibleElement = $offer->addChild('a', ""); - $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; + } } }