diff --git a/public/typo3conf/ext/ep_products/Classes/Controller/AjaxTableController.php b/public/typo3conf/ext/ep_products/Classes/Controller/AjaxTableController.php
index b650aef6..1627f942 100644
--- a/public/typo3conf/ext/ep_products/Classes/Controller/AjaxTableController.php
+++ b/public/typo3conf/ext/ep_products/Classes/Controller/AjaxTableController.php
@@ -126,7 +126,8 @@ class AjaxTableController extends ActionController
Product $product,
Hotel $hotel,
string $dateFrom = null,
- string $dateTo = null
+ string $dateTo = null,
+ string $bpnBookingUrlTemplateCode = null
): void {
$forcedConceptUids = GeneralUtility::trimExplode(',', $this->settings['forcedConceptUids'], true);
$filterSettings = $this->filterService->getNormalizedFilterSettings([], $forcedConceptUids);
@@ -156,6 +157,7 @@ class AjaxTableController extends ActionController
'date' => $date['dateUid'],
'paCode' => $paCode,
'singleDate' => true,
+ 'bpnBookingUrlTemplateCode' => $bpnBookingUrlTemplateCode ?? $this->settings['bpnBookingUrlTemplateCode'],
]
);
}
@@ -211,6 +213,7 @@ class AjaxTableController extends ActionController
'hasDiscount' => $hasSurchargeOrDiscount['discount'],
'isProductWithNoInfoConcept' => $isProductWithNoInfoConcept,
'nonBookableInfo' => $nonBookableInfo,
+ 'bpnBookingUrlTemplateCode' => $bpnBookingUrlTemplateCode,
]);
}
@@ -227,7 +230,7 @@ class AjaxTableController extends ActionController
Hotel $hotel,
Date $date,
bool $singleDate = false,
- string $bookingUrlTemplateCode = 'base'
+ string $bpnBookingUrlTemplateCode = null
): void {
$forcedConceptUids = GeneralUtility::trimExplode(',', $this->settings['forcedConceptUids'], true);
$filterSettings = $this->filterService->getNormalizedFilterSettings([], $forcedConceptUids);
@@ -237,7 +240,7 @@ class AjaxTableController extends ActionController
'hotel' => $hotel,
'filterSettings' => $filterSettings,
'date' => $date,
- 'template' => $bookingUrlTemplateCode,
+ 'template' => $bpnBookingUrlTemplateCode ?? $this->settings['bpnBookingUrlTemplateCode'],
'paCode' => GeneralUtility::_GET('pa'),
]);
$hasSurchargeOrDiscount = $this->dateService->checkSurcharcheOrDiscount($priceTable);
@@ -264,14 +267,16 @@ class AjaxTableController extends ActionController
'isProductWithNoInfoConcept' => $isProductWithNoInfoConcept,
'isSingleDate' => $singleDate,
'nonBookableInfo' => $nonBookableInfo,
+ 'bpnBookingUrlTemplateCode' => $bpnBookingUrlTemplateCode ?? $this->settings['bpnBookingUrlTemplateCode'],
]);
}
/**
* @param Product $product
* @param Hotel $hotel
+ * @param string $bpnBookingUrlTemplateCode
*/
- public function pricetableHtmlAction(Product $product, Hotel $hotel): void
+ public function pricetableHtmlAction(Product $product, Hotel $hotel, string $bpnBookingUrlTemplateCode = null): void
{
if ($reseller = $this->resellerDataService->getResellerForCurrentDomain()) {
$paCode = $reseller['paCode'];
@@ -291,12 +296,14 @@ class AjaxTableController extends ActionController
$this->view->assign('pricetable', $pricetable);
$this->view->assign('nonBookableInfo', $nonBookableInfo);
+ $this->view->assign('bpnBookingUrlTemplateCode', $bpnBookingUrlTemplateCode ?? $this->settings['bpnBookingUrlTemplateCode']);
}
/**
* @param Product $product
+ * @param string $bpnBookingUrlTemplateCode
*/
- public function eventPricetableAction(Product $product): void
+ public function eventPricetableAction(Product $product, string $bpnBookingUrlTemplateCode = null): void
{
$roomTypes = GeneralUtility::trimExplode(',', $this->settings['priceTableRoomTypes']);
$roomTypesPax = array_map(function ($type) {
@@ -326,6 +333,7 @@ class AjaxTableController extends ActionController
'categories' => $categories,
'themekey' => $this->settings['themekey'],
'nonBookableInfo' => $nonBookableInfo,
+ 'bpnBookingUrlTemplateCode' => $bpnBookingUrlTemplateCode ?? $this->settings['bpnBookingUrlTemplateCode'],
]);
}
@@ -334,9 +342,15 @@ class AjaxTableController extends ActionController
* @param Product $product
* @param string $dateFrom
* @param string $dateTo
+ * @param string $bpnBookingUrlTemplateCode
*/
- public function daytripRoomsAction(Hotel $hotel, Product $product, string $dateFrom, string $dateTo): void
- {
+ public function daytripRoomsAction(
+ Hotel $hotel,
+ Product $product,
+ string $dateFrom,
+ string $dateTo,
+ string $bpnBookingUrlTemplateCode = null
+ ): void {
$period = new Period($dateFrom, $dateTo);
$nights = (int)$period->dateInterval()->format('%a') + 1;
@@ -351,6 +365,7 @@ class AjaxTableController extends ActionController
$this->view->assign('nights', $nights);
$this->view->assign('rooms', $rooms);
+ $this->view->assign('bpnBookingUrlTemplateCode', $bpnBookingUrlTemplateCode ?? $this->settings['bpnBookingUrlTemplateCode']);
}
/**
diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Templates/AjaxTable/Datestable.html b/public/typo3conf/ext/ep_theme/Resources/Private/Templates/AjaxTable/Datestable.html
index 694b4b0a..b352b85d 100644
--- a/public/typo3conf/ext/ep_theme/Resources/Private/Templates/AjaxTable/Datestable.html
+++ b/public/typo3conf/ext/ep_theme/Resources/Private/Templates/AjaxTable/Datestable.html
@@ -54,7 +54,13 @@
diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Templates/Product/Detail.html b/public/typo3conf/ext/ep_theme/Resources/Private/Templates/Product/Detail.html
index 8931472f..ae77f06a 100644
--- a/public/typo3conf/ext/ep_theme/Resources/Private/Templates/Product/Detail.html
+++ b/public/typo3conf/ext/ep_theme/Resources/Private/Templates/Product/Detail.html
@@ -14,7 +14,7 @@
data-controller="product-details"
data-action="tabs:selected->product-details#switchView"
- data-product-details-datestable-uri-value="{ep:uri.ajax(action: 'datestable', controller: 'AjaxTable', arguments: '{product: product, hotel: hotel}', format: 'html', pageUid: settings.defaultAjaxUid)}"
+ data-product-details-datestable-uri-value="{ep:uri.ajax(action: 'datestable', controller: 'AjaxTable', arguments: '{product: product, hotel: hotel, bpnBookingUrlTemplateCode: settings.bpnBookingUrlTemplateCode}', format: 'html', pageUid: settings.defaultAjaxUid)}"
data-product-details-disable-tables-value="{f:if(condition: hotel.groupsPriceConfigs, then: 'true', else: 'false')}"