fix: XML scope for services too broad

This commit is contained in:
Björn Fromme
2026-03-16 20:25:56 +01:00
parent c510cbf590
commit 5619a6f22f
2 changed files with 43 additions and 1 deletions
+2 -1
View File
@@ -71,8 +71,9 @@ class TravelParser extends AbstractParser
$travel->type = $node->attr('reiseart');
$travel->priceFrom = $this->stringToFloat($this->getStringOrNullValue($node->filterXPath('//abpreis')));
$travel->selectionGroups = $this->getSelectionGroups($node->filterXPath('//selektiongruppe'));
// Parse only termin-level additional services; exclude hotel-nested duplicates that can override flags.
$travel->additionalServices = $this
->getAdditionalServices($node->filterXPath('//lei_sonstiges/leistung'));
->getAdditionalServices($node->filterXPath('.//lei_sonstiges[not(ancestor::hotel)]/leistung'));
$travel->transportationServices = $this
->getTransportationServices($node->filterXPath('//lei_befoerderung/leistung'));
$travel->rooms = $this->getRooms($hotelNode);