diff --git a/api.http b/api.http index a0dbfee8..1faccc59 100644 --- a/api.http +++ b/api.http @@ -1,7 +1,7 @@ ### GET product data for myep GET https://ep-reisen.ddev.site/api/product - ?product=SBW - &hotel=SBWOU2 + ?product=SSTMR + &hotel=SSTGR &key=abcabc123 ### diff --git a/public/typo3conf/ext/ep_products/Classes/Middleware/ProductApiMiddleware.php b/public/typo3conf/ext/ep_products/Classes/Middleware/ProductApiMiddleware.php index be1d9734..c1f58c6f 100644 --- a/public/typo3conf/ext/ep_products/Classes/Middleware/ProductApiMiddleware.php +++ b/public/typo3conf/ext/ep_products/Classes/Middleware/ProductApiMiddleware.php @@ -119,9 +119,10 @@ class ProductApiMiddleware implements MiddlewareInterface 'hotel.features', 'hotel.room_types', 'hotel.additional_information', + 'hotel.address', ) ->from('tx_epproducts_domain_model_hotel', 'hotel') - ->leftJoin('hotel', 'tx_epproducts_domain_model_matchcode', 'alias', 'hotel.uid = alias.uid AND alias.entity_type="hotel"') + ->leftJoin('hotel', 'tx_epproducts_domain_model_matchcode', 'alias', 'hotel.uid = alias.entity AND alias.entity_type="hotel"') ->where( $queryBuilder->expr()->orX( $queryBuilder->expr()->eq('hotel.code', $queryBuilder->createNamedParameter($hotelCode)), @@ -147,6 +148,7 @@ class ProductApiMiddleware implements MiddlewareInterface 'features' => $hotel['features'], 'roomTypes' => $hotel['room_types'], 'additionalInformation' => $hotel['additional_information'], + 'address' => $hotel['address'], 'images' => $images, ]; }