diff --git a/config/sites/ep-reisen/config.yaml b/config/sites/ep-reisen/config.yaml index 6cb4a6c3..3fa23530 100644 --- a/config/sites/ep-reisen/config.yaml +++ b/config/sites/ep-reisen/config.yaml @@ -170,7 +170,7 @@ routeEnhancers: extension: EpProducts plugin: travelinfo limitToPages: - - 2712 + - 2736 routes: - routePath: '/{travelinfo}/{traveldate}' diff --git a/public/typo3conf/ext/ep_products/Classes/Controller/TravelinfoController.php b/public/typo3conf/ext/ep_products/Classes/Controller/TravelinfoController.php index e719e6ee..4defbe08 100644 --- a/public/typo3conf/ext/ep_products/Classes/Controller/TravelinfoController.php +++ b/public/typo3conf/ext/ep_products/Classes/Controller/TravelinfoController.php @@ -60,8 +60,10 @@ class TravelinfoController extends ActionController /** @var Date $date */ $date = $this->dateRepository->findForProductAndDate($product, $travelDate)->getFirst(); + $hasCourses = 0 < count($date->getServicesGeneral('KUR')); $this->view->assign('travelinfo', $travelinfo); $this->view->assign('date', $date); + $this->view->assign('hasCourses', $hasCourses); } } diff --git a/public/typo3conf/ext/ep_products/Classes/Domain/Model/Date.php b/public/typo3conf/ext/ep_products/Classes/Domain/Model/Date.php index 03bb23d1..f112a886 100644 --- a/public/typo3conf/ext/ep_products/Classes/Domain/Model/Date.php +++ b/public/typo3conf/ext/ep_products/Classes/Domain/Model/Date.php @@ -462,9 +462,15 @@ class Date extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity /** * @return array $servicesGeneral */ - public function getServicesGeneral() + public function getServicesGeneral($token = null) { - return unserialize($this->servicesGeneral); + $services = unserialize($this->servicesGeneral); + + if (null !== $token) { + return $services[$token] ?? []; + } + + return $services; } /** diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Templates/Travelinfo/Index.html b/public/typo3conf/ext/ep_theme/Resources/Private/Templates/Travelinfo/Index.html index 9e0c25f2..39011450 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Templates/Travelinfo/Index.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Templates/Travelinfo/Index.html @@ -113,7 +113,16 @@