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 b508cf28..0f555c80 100644 --- a/public/typo3conf/ext/ep_products/Classes/Domain/Model/Date.php +++ b/public/typo3conf/ext/ep_products/Classes/Domain/Model/Date.php @@ -135,6 +135,11 @@ class Date extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity */ protected $available = 0; + /** + * @var bool + */ + protected $new = false; + /** * @return int $bookingId */ @@ -469,4 +474,13 @@ class Date extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity $this->available = $available; } + public function isNew() + { + return $this->new; + } + + public function setNew(bool $new) + { + $this->new = $new; + } } diff --git a/public/typo3conf/ext/ep_products/Classes/Domain/Repository/ProductRepository.php b/public/typo3conf/ext/ep_products/Classes/Domain/Repository/ProductRepository.php index ac8e33cd..c1a2d897 100644 --- a/public/typo3conf/ext/ep_products/Classes/Domain/Repository/ProductRepository.php +++ b/public/typo3conf/ext/ep_products/Classes/Domain/Repository/ProductRepository.php @@ -70,7 +70,7 @@ class ProductRepository extends AbstractRepository 'date.board as board', 'date.board_bus_pro_id as boardUid', 'date.product_fact as productFact', 'date.hotel_fact as hotelFact', 'date.region_fact as regionFact', 'date.services_included as servicesIncluded', - 'date.bus_available as busAvailable', + 'date.bus_available as busAvailable', 'date.new as new', 'date.min_price as minPrice', 'date.nights as nights', 'date.available as available', 'date.pseudo_price as pseudoPrice', 'date.hide_booking_button as hideBookingButton', 'room.type as roomType' @@ -132,7 +132,7 @@ class ProductRepository extends AbstractRepository 'skipass_included as skipassIncluded', 'bus_included as busIncluded', 'earlybird', 'new', 'daytrip', 'hide_booking_button as hideBookingButton', 'low_contingent as lowContingent', 'concept_code as conceptCode', 'concept_name as conceptName', - 'board' + 'board', 'new' ) ->from('tx_epproducts_domain_model_date', 'date') ->where('date_start >= NOW()') diff --git a/public/typo3conf/ext/ep_products/Classes/Service/SearchResultService.php b/public/typo3conf/ext/ep_products/Classes/Service/SearchResultService.php index 4922aac1..6ddfa908 100644 --- a/public/typo3conf/ext/ep_products/Classes/Service/SearchResultService.php +++ b/public/typo3conf/ext/ep_products/Classes/Service/SearchResultService.php @@ -155,6 +155,7 @@ class SearchResultService implements SingletonInterface 'dates' => [], 'nights' => [], 'rooms' => [], + 'new' => $row['new'], ]; $total++; } diff --git a/public/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_date.php b/public/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_date.php index 30b466ca..7f6980bf 100644 --- a/public/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_date.php +++ b/public/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_date.php @@ -25,7 +25,7 @@ return [ 'types' => [ '1' => ['showitem' => 'hidden, bus_pro_id, hotel_bus_pro_id, code, daytrip, date_start, date_end, nights, board, board_code, board_bus_pro_id, bus_included, bus_available, skipass_included, services_included, - services_general, pickups, discount, min_price, pseudo_price, available'], + services_general, pickups, discount, min_price, pseudo_price, available, new'], ], 'palettes' => [ '1' => ['showitem' => ''], @@ -314,5 +314,13 @@ return [ 'eval' => 'trim', ], ], + 'new' => [ + 'exclude' => 0, + 'label' => 'neu', + 'config' => [ + 'type' => 'check', + 'default' => 0, + ], + ], ] ]; diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Product/HeaderDetail.html b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Product/HeaderDetail.html index 014affb6..6f75763a 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Product/HeaderDetail.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Product/HeaderDetail.html @@ -49,6 +49,11 @@ {product.concept.name} + +
+ NEU! +
+
diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Product/Teaser.html b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Product/Teaser.html index 8a5454b9..52280a62 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Product/Teaser.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Product/Teaser.html @@ -55,6 +55,11 @@ + +
+ NEU! +
+
{hotel.name} diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Search/Result.html b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Search/Result.html index 665a93b2..0f03882d 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Search/Result.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Search/Result.html @@ -83,6 +83,7 @@ dateTo: item.maxDateEnd, forceHotelUid: 1, showHotelDetails: 1, + new: item.new, referringPageUri: referringPageUri }"/> diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Templates/FluidStyledContent/TeaserProduct.html b/public/typo3conf/ext/ep_theme/Resources/Private/Templates/FluidStyledContent/TeaserProduct.html index bb00f356..e775573f 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Templates/FluidStyledContent/TeaserProduct.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Templates/FluidStyledContent/TeaserProduct.html @@ -23,6 +23,7 @@ forceHotelUid: teaser.forceHotelUid, dateFrom: dateFrom, dateTo: dateTo, + new: teaser.new, landscape: '{f:if(condition: \'{data.layout} == 2 || {data.layout} == 3\', then: 1, else: 0)}' }"/> diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Templates/Product/Teasergroup.html b/public/typo3conf/ext/ep_theme/Resources/Private/Templates/Product/Teasergroup.html index c52fd6c8..b6e958f4 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Templates/Product/Teasergroup.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Templates/Product/Teasergroup.html @@ -51,6 +51,7 @@ forceHotelUid: teaser.forceHotelUid, dateFrom: dateFrom, dateTo: dateTo, + new: teaser.new, index: iteration.index }"/>