Adopt daytrip teaser fix

This commit is contained in:
Björn Fromme
2021-10-14 12:25:33 +02:00
parent 7ffd85d501
commit e7b6e02b22
2 changed files with 4 additions and 3 deletions
@@ -48,6 +48,7 @@ class ProductViewHelper extends AbstractViewHelper
$this->registerArgument('dateFrom', 'string', 'Date to limit table on detail page by (Y-m-d)');
$this->registerArgument('dateTo', 'string', 'Date to limit table on detail page by (Y-m-d)');
$this->registerArgument('forceHotelUid', 'bool', 'Whether to force link a hotel');
$this->registerArgument('dayTrip', 'bool', 'Whether product is a daytrip');
$this->registerArgument('slug', 'string', 'Slug to append to resulting uri');
}
@@ -73,7 +74,7 @@ class ProductViewHelper extends AbstractViewHelper
'product' => is_array($product) ? $product['uid'] : $product,
'hotel' => is_array($hotel) ? $hotel['uid'] : $hotel,
];
} elseif ($arguments['dateFrom'] || $arguments['dateTo']) {
} elseif (false === (bool)$arguments['dayTrip'] && ($arguments['dateFrom'] || $arguments['dateTo'])) {
$linkArguments = [
'dateFrom' => $arguments['dateFrom'],
'dateTo' => $arguments['dateTo'],