diff --git a/public/typo3conf/ext/ep_products/Classes/Service/DateImportService.php b/public/typo3conf/ext/ep_products/Classes/Service/DateImportService.php index 481262e0..c1002e8b 100644 --- a/public/typo3conf/ext/ep_products/Classes/Service/DateImportService.php +++ b/public/typo3conf/ext/ep_products/Classes/Service/DateImportService.php @@ -535,7 +535,7 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface $count = 0; foreach ($xmlHotel->xpath('zimmer/preis') as $roomXml) { - $code = (string) $roomXml->attributes()['zimmercode']; + $code = trim((string) $roomXml->attributes()['zimmercode']); if ($code === static::CODE_PSEUDOPRICE) { $price = (int) $roomXml->attributes()['preis']; @@ -733,10 +733,11 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface protected function getRoomMappings(): void { - $sql = 'SELECT code, type FROM tx_epproducts_domain_model_roommapping'; + $sql = 'SELECT code, type FROM tx_epproducts_domain_model_roommapping WHERE deleted = 0 AND hidden = 0'; $roomMappings = $this->db->fetchAllAssociative($sql); foreach ($roomMappings as $mapping) { - $this->roomMappings[mb_strtolower($mapping['code'])] = $mapping['type']; + $key = trim(mb_strtolower($mapping['code'])); + $this->roomMappings[$key] = $mapping['type']; } }