From 5323b2498e0cdb0c87bc9bf4b1c943a50d083ed0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Thu, 22 Jun 2023 08:51:21 +0200 Subject: [PATCH] Fix: Correctly determine conditions to show booking button in table --- .../ep_products/Classes/Service/DateService.php | 4 ++-- .../Private/Templates/AjaxTable/Pricetable.html | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/public/typo3conf/ext/ep_products/Classes/Service/DateService.php b/public/typo3conf/ext/ep_products/Classes/Service/DateService.php index 470726cc..db9223c3 100644 --- a/public/typo3conf/ext/ep_products/Classes/Service/DateService.php +++ b/public/typo3conf/ext/ep_products/Classes/Service/DateService.php @@ -198,7 +198,7 @@ class DateService implements SingletonInterface $nonBookableDateUids = $resolvedOptions['nonBookableDateUids']; foreach ($priceTableData as $row) { - $showBookingButton = $resolvedOptions['showBookingButton'] || !in_array($row['dateBusProId'], $nonBookableDateUids, false); + $showBookingButton = $resolvedOptions['showBookingButton'] && !in_array($row['dateBusProId'], $nonBookableDateUids); $dateStart = new \DateTime($row['dateStart']); $dateEnd = new \DateTime($row['dateEnd']); @@ -277,7 +277,7 @@ class DateService implements SingletonInterface // Default booking button status is determined by the product $showBookingButton = $resolvedOptions['showBookingButton']; // Check if booking button is disabled for this date - if (true === in_array($row['dateBusProId'], $nonBookableDateUids, false)) { + if (true === in_array($row['dateBusProId'], $nonBookableDateUids)) { $showBookingButton = false; } diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Templates/AjaxTable/Pricetable.html b/public/typo3conf/ext/ep_theme/Resources/Private/Templates/AjaxTable/Pricetable.html index 8325bfec..49a12a38 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Templates/AjaxTable/Pricetable.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Templates/AjaxTable/Pricetable.html @@ -111,14 +111,8 @@ - + - - Reisen-Alert - - - + + + + Reisen-Alert +