Update availability attribute for offers containing "Janpol Fini"

This commit is contained in:
2025-10-17 00:19:56 +02:00
parent 0f936196c9
commit 5140a2c2a9
2 changed files with 20 additions and 3 deletions

View File

@@ -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