update
This commit is contained in:
@@ -113,7 +113,6 @@ foreach ($existingXml->xpath('//o') as $offer) {
|
||||
}
|
||||
}
|
||||
|
||||
// Dodanie elementu <a> z nazwą producenta odpowiedzialnego
|
||||
if ($responsibleManufacturerId) {
|
||||
$manufacturerName = $mdb->get(
|
||||
'materac_x13gpsr_responsible_manufacturer',
|
||||
@@ -121,13 +120,12 @@ foreach ($existingXml->xpath('//o') as $offer) {
|
||||
['id_x13gpsr_responsible_manufacturer' => $responsibleManufacturerId]
|
||||
);
|
||||
|
||||
$attrs = $offer->xpath('attrs');
|
||||
if ($attrs && isset($attrs[0]))
|
||||
{
|
||||
$attrsElement = $attrs[0];
|
||||
$attrElement = $attrsElement->addChild('a');
|
||||
$attrElement->addAttribute('name', 'Producent odpowiedzialny');
|
||||
$attrElement[0] = $manufacturerName;
|
||||
if ($manufacturerName) {
|
||||
$a = $dom->createElement('a');
|
||||
$a->setAttribute('name', 'Producent odpowiedzialny');
|
||||
$cdata = $dom->createCDATASection($manufacturerName);
|
||||
$a->appendChild($cdata);
|
||||
$offer->appendChild($a);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user