diff --git a/public/typo3conf/ext/ep_products/Classes/Controller/AjaxContingentController.php b/public/typo3conf/ext/ep_products/Classes/Controller/AjaxContingentController.php index 3884e824..252aad59 100644 --- a/public/typo3conf/ext/ep_products/Classes/Controller/AjaxContingentController.php +++ b/public/typo3conf/ext/ep_products/Classes/Controller/AjaxContingentController.php @@ -94,7 +94,8 @@ class AjaxContingentController extends ActionController */ public function roomsAction(Hotel $hotel, Product $product, \DateTime $dateFrom, \DateTime $dateTo) { - $rooms = $this->contingentDataService->getAvailableRooms($dateFrom, $dateTo, $hotel, $product); + $template = $this->settings['bpnBookingUrlTemplateCode']; + $rooms = $this->contingentDataService->getAvailableRooms($dateFrom, $dateTo, $hotel, $product, $template); return \json_encode($rooms); } diff --git a/public/typo3conf/ext/ep_products/Classes/Service/ContingentDataService.php b/public/typo3conf/ext/ep_products/Classes/Service/ContingentDataService.php index 94bfb7a6..b4bb26cb 100644 --- a/public/typo3conf/ext/ep_products/Classes/Service/ContingentDataService.php +++ b/public/typo3conf/ext/ep_products/Classes/Service/ContingentDataService.php @@ -76,11 +76,17 @@ class ContingentDataService * @param \DateTime $dateTo * @param Hotel $hotel * @param Product $product + * @param string $template * @return array * @throws \Doctrine\DBAL\DBALException */ - public function getAvailableRooms(\DateTime $dateFrom, \DateTime $dateTo, Hotel $hotel, Product $product) - { + public function getAvailableRooms( + \DateTime $dateFrom, + \DateTime $dateTo, + Hotel $hotel, + Product $product, + $template = 'base' + ) { $data = $this->contingentRepository->getAvailableRooms($dateFrom, $dateTo, $hotel, $product); $rooms = []; @@ -91,6 +97,7 @@ class ContingentDataService 'bookingId' => $row['busProId'], 'hotelId' => $row['hotelBusProId'], 'dateEnd' => $dateTo->format('Y-m-d'), + 'template' => $template, ]); $row['servicesIncluded'] = unserialize($row['servicesIncluded']); diff --git a/public/typo3conf/ext/ep_products/Configuration/TypoScript/setup.typoscript b/public/typo3conf/ext/ep_products/Configuration/TypoScript/setup.typoscript index 372c9356..286ff92e 100644 --- a/public/typo3conf/ext/ep_products/Configuration/TypoScript/setup.typoscript +++ b/public/typo3conf/ext/ep_products/Configuration/TypoScript/setup.typoscript @@ -41,6 +41,7 @@ plugin.tx_epproducts { resellerExportPageUid = {$plugin.tx_epproducts.settings.resellerExportPageUid} ratingPageUid = {$plugin.tx_eptheme.settings.ratingPageUid} searchPageHeaderImage = {$plugin.tx_eptheme.settings.searchPageHeaderImage} + bpnBookingUrlTemplateCode = {$plugin.tx_eptheme.settings.bpnBookingUrlTemplateCode} datePickerPresets { 1 { label = Silvester