Update availability attribute for offers containing "Janpol Fini"
This commit is contained in:
@@ -115,6 +115,15 @@ foreach ($offers as $offer) {
|
||||
$attrsElement->appendChild($a);
|
||||
}
|
||||
}
|
||||
|
||||
// 🔹 DODANE: Zmiana avail na 14 dla nazw zawierających "Janpol Fini"
|
||||
$nameNodes = $offer->getElementsByTagName('name');
|
||||
if ($nameNodes->length > 0) {
|
||||
$nameText = $nameNodes->item(0)->textContent;
|
||||
if (stripos($nameText, 'Janpol Fini') !== false or stripos( $nameText, 'Fini Janpol') !== false) {
|
||||
$offer->setAttribute('avail', '14');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Zapisanie zmodyfikowanego pliku XML
|
||||
|
||||
Reference in New Issue
Block a user