diff --git a/web/typo3conf/ext/ep_products/Classes/Domain/Model/Hotel.php b/web/typo3conf/ext/ep_products/Classes/Domain/Model/Hotel.php
index 09efef9c..77746dcf 100644
--- a/web/typo3conf/ext/ep_products/Classes/Domain/Model/Hotel.php
+++ b/web/typo3conf/ext/ep_products/Classes/Domain/Model/Hotel.php
@@ -75,6 +75,11 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
*/
protected $earlybird = false;
+ /**
+ * @var bool
+ */
+ protected $new = false;
+
/**
* @var bool
*/
@@ -282,6 +287,22 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
$this->earlybird = $earlybird;
}
+ /**
+ * @return bool
+ */
+ public function isNew()
+ {
+ return $this->new;
+ }
+
+ /**
+ * @param bool $new
+ */
+ public function setNew($new)
+ {
+ $this->new = $new;
+ }
+
/**
* @return bool
*/
diff --git a/web/typo3conf/ext/ep_products/Classes/Domain/Repository/HotelRepository.php b/web/typo3conf/ext/ep_products/Classes/Domain/Repository/HotelRepository.php
index a95038a1..9ef37627 100644
--- a/web/typo3conf/ext/ep_products/Classes/Domain/Repository/HotelRepository.php
+++ b/web/typo3conf/ext/ep_products/Classes/Domain/Repository/HotelRepository.php
@@ -231,11 +231,11 @@ class HotelRepository extends AbstractRepository
'date.hotel as hotelUid', 'date.hotel_name as hotelName', 'date.hotel_teaser as hotelTeaser',
'date.hotel_category as hotelCategory', 'date.hotel_detail_page as hotelDetailPage',
'date.date_start as dateStart', 'date.date_end as dateEnd', 'date.earlybird as earlybird',
- 'date.low_contingent as lowContingent', 'date.board as board', 'date.product_fact as productFact',
- 'date.hotel_fact as hotelFact', 'date.region_fact as regionFact', 'date.services_included as servicesIncluded',
- 'date.min_price as minPrice', 'date.pseudo_price as pseudoPrice', 'date.nights as nights',
- 'date.available as available', 'date.country as country', 'date.country_code as countryCode',
- 'date.region as region'
+ 'date.new as new', 'date.low_contingent as lowContingent', 'date.board as board',
+ 'date.product_fact as productFact', 'date.hotel_fact as hotelFact', 'date.region_fact as regionFact',
+ 'date.services_included as servicesIncluded', 'date.min_price as minPrice',
+ 'date.pseudo_price as pseudoPrice', 'date.nights as nights', 'date.available as available',
+ 'date.country as country', 'date.country_code as countryCode', 'date.region as region'
)
->from('tx_epproducts_domain_model_date', 'date')
->leftJoin('date', 'tx_epproducts_product_region_mm', 'mm', 'mm.uid_local = date.product')
diff --git a/web/typo3conf/ext/ep_products/Classes/Domain/Repository/ProductRepository.php b/web/typo3conf/ext/ep_products/Classes/Domain/Repository/ProductRepository.php
index 722604e7..05b4a34e 100644
--- a/web/typo3conf/ext/ep_products/Classes/Domain/Repository/ProductRepository.php
+++ b/web/typo3conf/ext/ep_products/Classes/Domain/Repository/ProductRepository.php
@@ -49,16 +49,17 @@ class ProductRepository extends AbstractRepository
$query = $qb
->select(
'date.concept as conceptUid', 'date.concept_name as conceptName', 'date.concept_code as conceptCode',
- 'date.product as productUid', 'date.product_name as productName', 'date.product_detail_page as productDetailPage',
- 'date.product_feature as productFeature',
+ 'date.product as productUid', 'date.product_name as productName',
+ 'date.product_detail_page as productDetailPage', 'date.product_feature as productFeature',
'date.country as countryUid','date.country_name as countryName', 'date.country_code as countryCode',
'date.region as regionUid', 'date.region_name as regionName', 'date.region_feature as regionFeature',
'date.date_start as dateStart', 'date.date_end as dateEnd',
'date.hotel as hotelUid', 'date.hotel_name as hotelName', 'date.hotel_category as hotelCategory',
- 'date.earlybird as earlybird', 'date.low_contingent as lowContingent', 'date.board as board',
- 'date.product_fact as productFact', 'date.hotel_fact as hotelFact', 'date.region_fact as regionFact',
- 'date.services_included as servicesIncluded', 'date.min_price as minPrice', 'date.nights as nights',
- 'date.available as available', 'date.pseudo_price as pseudoPrice'
+ 'date.earlybird as earlybird', 'date.new as new', 'date.low_contingent as lowContingent',
+ 'date.board as board', 'date.product_fact as productFact', 'date.hotel_fact as hotelFact',
+ 'date.region_fact as regionFact', 'date.services_included as servicesIncluded',
+ 'date.min_price as minPrice', 'date.nights as nights', 'date.available as available',
+ 'date.pseudo_price as pseudoPrice'
)
->from('tx_epproducts_domain_model_date', 'date')
->where('date.product IN (:productUids)')
@@ -89,16 +90,17 @@ class ProductRepository extends AbstractRepository
$query = $qb
->select(
'date.concept as conceptUid', 'date.concept_name as conceptName', 'date.concept_code as conceptCode',
- 'date.product as productUid', 'date.product_name as productName', 'date.product_detail_page as productDetailPage',
- 'date.product_feature as productFeature', 'date.daytrip as daytrip',
- 'date.country as countryUid','date.country_name as countryName', 'date.country_code as countryCode',
- 'date.region as regionUid', 'date.region_name as regionName', 'date.region_feature as regionFeature',
- 'date.date_start as dateStart', 'date.date_end as dateEnd',
+ 'date.product as productUid', 'date.product_name as productName',
+ 'date.product_detail_page as productDetailPage', 'date.product_feature as productFeature',
+ 'date.daytrip as daytrip', 'date.country as countryUid','date.country_name as countryName',
+ 'date.country_code as countryCode', 'date.region as regionUid', 'date.region_name as regionName',
+ 'date.region_feature as regionFeature', 'date.date_start as dateStart', 'date.date_end as dateEnd',
'date.hotel as hotelUid', 'date.hotel_name as hotelName', 'date.hotel_category as hotelCategory',
- 'date.earlybird as earlybird', 'date.low_contingent as lowContingent', 'date.board as board',
- 'date.product_fact as productFact', 'date.hotel_fact as hotelFact', 'date.region_fact as regionFact',
- 'date.services_included as servicesIncluded', 'date.min_price as minPrice', 'date.nights as nights',
- 'date.available as available', 'date.pseudo_price as pseudoPrice'
+ 'date.earlybird as earlybird', 'date.new as new', 'date.low_contingent as lowContingent',
+ 'date.board as board', 'date.product_fact as productFact', 'date.hotel_fact as hotelFact',
+ 'date.region_fact as regionFact', 'date.services_included as servicesIncluded',
+ 'date.min_price as minPrice', 'date.nights as nights', 'date.available as available',
+ 'date.pseudo_price as pseudoPrice'
)
->from('tx_epproducts_domain_model_date', 'date')
->leftJoin('date', 'tx_epproducts_domain_model_room', 'room', 'room.date = date.uid')
@@ -144,13 +146,14 @@ class ProductRepository extends AbstractRepository
->select(
'product as productUid', 'product_name as productName', 'product_detail_page as productDetailPage',
'product_feature as productFeature', 'product_teaser as productTeaser', 'product_fact as productFact',
- 'hotel as hotelUid', 'hotel_fact as hotelFact', 'hotel_name as hotelName', 'hotel_category as hotelCategory',
- 'region_fact as regionFact', 'region_name as regionName', 'region_feature as regionFeature',
+ 'hotel as hotelUid', 'hotel_fact as hotelFact', 'hotel_name as hotelName',
+ 'hotel_category as hotelCategory', 'region_fact as regionFact', 'region_name as regionName',
+ 'region_feature as regionFeature',
'country_name as countryName', 'country_code as countryCode',
'date_start as dateStart', 'date_end as dateEnd', 'uid as dateUid', 'min_price as minPrice',
'pseudo_price as pseudoPrice', 'nights as nights', 'available as available',
'skipass_included as skipassIncluded', 'bus_included as busIncluded',
- 'earlybird', 'daytrip', 'low_contingent as lowContingent',
+ 'earlybird', 'new', 'daytrip', 'low_contingent as lowContingent',
'concept_code as conceptCode', 'concept_name as conceptName',
'board'
)
diff --git a/web/typo3conf/ext/ep_products/Classes/Service/DateImportService.php b/web/typo3conf/ext/ep_products/Classes/Service/DateImportService.php
index 52f78f16..4c27c6e0 100644
--- a/web/typo3conf/ext/ep_products/Classes/Service/DateImportService.php
+++ b/web/typo3conf/ext/ep_products/Classes/Service/DateImportService.php
@@ -510,6 +510,8 @@ class DateImportService implements SingletonInterface
$date['hotel_category'] = $hotel['category'];
$date['hotel_teaser'] = $hotel['teaser'];
$date['hotel_detail_page'] = $hotel['detail_page'];
+ $date['earlybird'] = $hotel['earlybird'];
+ $date['new'] = $hotel['new'];
return true;
}
@@ -732,7 +734,7 @@ class DateImportService implements SingletonInterface
{
$sql = '
SELECT u.code code, u.uid uid, h.name name, h.type type,
- h.earlybird earlybird, h.low_contingent low_contingent,
+ h.earlybird earlybird, h.new new, h.low_contingent low_contingent,
h.keywords keywords, h.header_title header_title,
h.category category, h.teaser teaser, h.detail_page detail_page
FROM (
@@ -755,6 +757,7 @@ class DateImportService implements SingletonInterface
'type' => $row['type'],
'name' => $row['name'],
'earlybird' => $row['earlybird'],
+ 'new' => $row['new'],
'low_contingent' => $row['low_contingent'],
'keywords' => $row['keywords'],
'header_title' => $row['header_title'],
diff --git a/web/typo3conf/ext/ep_products/Classes/Service/HotelDataService.php b/web/typo3conf/ext/ep_products/Classes/Service/HotelDataService.php
index f774783e..73412bb5 100644
--- a/web/typo3conf/ext/ep_products/Classes/Service/HotelDataService.php
+++ b/web/typo3conf/ext/ep_products/Classes/Service/HotelDataService.php
@@ -233,6 +233,7 @@ class HotelDataService implements SingletonInterface
'available' => 0,
'board' => $row['board'],
'earlybird' => $row['earlybird'],
+ 'new' => $row['new'],
'lowContingent' => $row['lowContingent'],
'servicesIncluded' => unserialize($row['servicesIncluded']),
'minDateStart' => null,
diff --git a/web/typo3conf/ext/ep_products/Classes/Service/ProductDataService.php b/web/typo3conf/ext/ep_products/Classes/Service/ProductDataService.php
index c5c37414..b933f7dc 100644
--- a/web/typo3conf/ext/ep_products/Classes/Service/ProductDataService.php
+++ b/web/typo3conf/ext/ep_products/Classes/Service/ProductDataService.php
@@ -195,6 +195,7 @@ class ProductDataService implements SingletonInterface
'pseudoPrice' => $teaserData['pseudoPrice'],
'board' => $teaserData['board'],
'earlybird' => $teaserData['earlybird'],
+ 'new' => $teaserData['new'],
'daytrip' => $teaserData['daytrip'],
'lowContingent' => $teaserData['lowContingent'],
'servicesIncluded' => unserialize($teaserData['servicesIncluded']),
diff --git a/web/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_hotel.php b/web/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_hotel.php
index c570dd79..b87fdd5d 100644
--- a/web/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_hotel.php
+++ b/web/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_hotel.php
@@ -27,7 +27,8 @@ return [
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, name, detail_page, keywords,
address, longitude, latitude, headline, teaser, description, features, room_types, additional_information,
teaser_images, header_images, images, reseller_images, code, type, category, country, region, city, facts,
- teamer, products, header_title,header_subtitle, earlybird, low_contingent, show_as_teaser, external_link',
+ teamer, products, header_title,header_subtitle, earlybird, new, low_contingent, show_as_teaser,
+ external_link',
],
'types' => [
'1' => [
@@ -39,7 +40,8 @@ return [
],
],
'palettes' => [
- 'top' => ['showitem' => 'hidden,earlybird,low_contingent,show_as_teaser,--linebreak--,groupsch_id,detail_page,--linebreak--,external_link'],
+ 'top' => ['showitem' => 'hidden,earlybird,new,low_contingent,show_as_teaser,
+ --linebreak--,groupsch_id,detail_page,--linebreak--,external_link'],
'geolocation' => ['showitem' => 'address, longitude, latitude'],
'destinations' => ['showitem' => 'country,region,city'],
'name' => ['showitem' => 'name,code,--linebreak--,header_title,header_subtitle'],
@@ -134,6 +136,13 @@ return [
],
],
+ 'new' => [
+ 'exclude' => 0,
+ 'label' => 'Neu',
+ 'config' => [
+ 'type' => 'check',
+ ],
+ ],
'earlybird' => [
'exclude' => 0,
'label' => 'Frühbucher',
diff --git a/web/typo3conf/ext/ep_products/ext_tables.sql b/web/typo3conf/ext/ep_products/ext_tables.sql
index 3dcb171f..eba2e568 100644
--- a/web/typo3conf/ext/ep_products/ext_tables.sql
+++ b/web/typo3conf/ext/ep_products/ext_tables.sql
@@ -151,6 +151,7 @@ CREATE TABLE tx_epproducts_domain_model_date (
hotel_teaser text NOT NULL,
hotel_detail_page varchar(255) DEFAULT '' NOT NULL,
earlybird tinyint(4) unsigned DEFAULT '0' NOT NULL,
+ new tinyint(4) unsigned DEFAULT '0' NOT NULL,
low_contingent tinyint(4) unsigned DEFAULT '0' NOT NULL,
rooms int(11) unsigned DEFAULT '0',
@@ -195,6 +196,7 @@ CREATE TABLE tx_epproducts_domain_model_hotel (
pid int(11) DEFAULT '0' NOT NULL,
earlybird tinyint(4) unsigned DEFAULT '0' NOT NULL,
+ new tinyint(4) unsigned DEFAULT '0' NOT NULL,
low_contingent tinyint(4) unsigned DEFAULT '0' NOT NULL,
show_as_teaser tinyint(4) unsigned DEFAULT '0' NOT NULL,
detail_page varchar(255) DEFAULT '' NOT NULL,
diff --git a/web/typo3conf/ext/ep_theme/Resources/Private/Assets/scss/remix/_product.scss b/web/typo3conf/ext/ep_theme/Resources/Private/Assets/scss/remix/_product.scss
index bd104260..686cf0bd 100644
--- a/web/typo3conf/ext/ep_theme/Resources/Private/Assets/scss/remix/_product.scss
+++ b/web/typo3conf/ext/ep_theme/Resources/Private/Assets/scss/remix/_product.scss
@@ -120,6 +120,10 @@
text-transform: uppercase;
white-space: nowrap;
+ &--new {
+ color: $color-label-earlybird;
+ }
+
&--earlybird {
color: $color-label-earlybird;
}
diff --git a/web/typo3conf/ext/ep_theme/Resources/Private/Partials/Product/Teaser.html b/web/typo3conf/ext/ep_theme/Resources/Private/Partials/Product/Teaser.html
index 5a67d6d4..7e310573 100644
--- a/web/typo3conf/ext/ep_theme/Resources/Private/Partials/Product/Teaser.html
+++ b/web/typo3conf/ext/ep_theme/Resources/Private/Partials/Product/Teaser.html
@@ -67,9 +67,9 @@
ab {teaser.minPrice} €{f:if(condition: teaser.pseudoPrice, then: ' {teaser.pseudoPrice} €')}
-
-
- Frühbucher
+
+
+ Neu
Wenige Betten