Add field 'season' to product
This commit is contained in:
@@ -100,6 +100,11 @@ class Product extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements
|
||||
*/
|
||||
protected $code = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $season = 'w';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
@@ -500,6 +505,22 @@ class Product extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements
|
||||
$this->code = $code;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getSeason()
|
||||
{
|
||||
return $this->season;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $season
|
||||
*/
|
||||
public function setSeason($season)
|
||||
{
|
||||
$this->season = $season;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
|
||||
@@ -151,7 +151,7 @@ class ProductRepository extends AbstractRepository
|
||||
'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',
|
||||
'pseudo_price as pseudoPrice', 'nights as nights', 'available as available', 'season as season',
|
||||
'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',
|
||||
@@ -214,7 +214,7 @@ class ProductRepository extends AbstractRepository
|
||||
->select(
|
||||
'date.uid as dateUid', 'date.date_start as dateStart', 'date.date_end as dateEnd', 'date.bus_pro_id as dateBusProId',
|
||||
'date.hotel as hotelUid', 'date.hotel_bus_pro_id as hotelBusProId', 'date.bus_included as dateBusIncluded',
|
||||
'date.skipass_included as dateSkipassIncluded',
|
||||
'date.skipass_included as dateSkipassIncluded', 'date.season as season',
|
||||
'room.uid as roomUid', 'room.bus_pro_id as roomBusProId', 'room.name as roomName',
|
||||
'room.price as roomPrice', 'date.discount as roomDiscount', 'date.bus_price as busPrice',
|
||||
'room.services as roomOptionalServices', 'room.nights as roomNights', 'room.available as roomAvailable'
|
||||
@@ -259,11 +259,12 @@ class ProductRepository extends AbstractRepository
|
||||
$query = $qb
|
||||
->select(
|
||||
'date.uid as dateUid', 'date.date_start as dateStart', 'date.date_end as dateEnd',
|
||||
'date.min_price as dateMinPrice', 'date.pseudo_price as datePseudoPrice', 'date.discount as dateDiscount',
|
||||
'date.bus_price as busPrice', 'date.nights as dateNights', 'date.bus_included as dateBusIncluded',
|
||||
'date.services_included as dateServicesIncluded', 'date.services_general as dateServicesGeneral',
|
||||
'date.skipass_included as dateSkipassIncluded', 'date.bus_pro_id as dateBusProId',
|
||||
'date.hotel_bus_pro_id as hotelBusProId', 'date.available as available'
|
||||
'date.season as season', 'date.min_price as dateMinPrice', 'date.pseudo_price as datePseudoPrice',
|
||||
'date.discount as dateDiscount', 'date.bus_price as busPrice', 'date.nights as dateNights',
|
||||
'date.bus_included as dateBusIncluded', 'date.services_included as dateServicesIncluded',
|
||||
'date.services_general as dateServicesGeneral', 'date.skipass_included as dateSkipassIncluded',
|
||||
'date.bus_pro_id as dateBusProId', 'date.hotel_bus_pro_id as hotelBusProId',
|
||||
'date.available as available'
|
||||
)
|
||||
->from('tx_epproducts_domain_model_date', 'date')
|
||||
->innerJoin('date', 'tx_epproducts_domain_model_room', 'room', 'room.date = date.uid')
|
||||
|
||||
@@ -231,7 +231,7 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface
|
||||
SELECT p.uid uid, p.daytrip daytrip, p.hide_booking_button, p.important important, p.name product_name,
|
||||
p.searchable product_searchable, p.detail_page product_detail_page, p.keywords product_keywords,
|
||||
p.teaser product_teaser, p.feature product_feature, p.subline product_subline, p.country country,
|
||||
p.region region, p.city city, p.path_segment slug,
|
||||
p.region region, p.city city, p.path_segment slug, p.season season,
|
||||
cnt.name country_name, cnt.code country_code, cnt.keywords country_keywords, r.name region_name,
|
||||
r.keywords region_keywords, r.feature region_feature, c.name city_name, c.keywords city_keywords,
|
||||
p.concept concept, con.name concept_name, con.code concept_code, con.sorting concept_sorting
|
||||
@@ -355,6 +355,7 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface
|
||||
'concept_name' => $product['concept_name'],
|
||||
'concept_code' => $product['concept_code'],
|
||||
'concept_sorting' => $product['concept_sorting'],
|
||||
'season' => empty($product['season']) ? 'w' : $product['season'],
|
||||
'date_start' => $dateStart->format('Y-m-d'),
|
||||
'date_end' => $dateEnd->format('Y-m-d'),
|
||||
'nights' => $nights,
|
||||
|
||||
@@ -306,6 +306,7 @@ class DateService implements SingletonInterface
|
||||
$priceTable[] = [
|
||||
'dateStart' => $dateStart->format('d.m.Y'),
|
||||
'dateEnd' => $dateEnd->format('d.m.Y'),
|
||||
'season' => $row['season'],
|
||||
'dateBusIncluded' => (bool) $row['dateBusIncluded'],
|
||||
'dateSkipassIncluded' => (bool) $row['dateSkipassIncluded'],
|
||||
'roomUid' => $row['roomUid'],
|
||||
@@ -376,6 +377,7 @@ class DateService implements SingletonInterface
|
||||
'dateSkipassIncluded' => (bool) $row['dateSkipassIncluded'],
|
||||
'dateServicesIncluded' => unserialize($row['dateServicesIncluded'], ['allowed_classes' => false]),
|
||||
'dateServicesGeneral' => unserialize($row['dateServicesGeneral'], ['allowed_classes' => false]),
|
||||
'season' => $row['season'],
|
||||
'available' => $row['available'],
|
||||
'bookingUrl' => $bookingUrl,
|
||||
'isHideBookingButton' => $isHideBookingButton,
|
||||
|
||||
@@ -199,6 +199,7 @@ class ProductDataService implements SingletonInterface
|
||||
'hideBookingButton' => $teaserData['hideBookingButton'],
|
||||
'lowContingent' => $teaserData['lowContingent'],
|
||||
'servicesIncluded' => unserialize($teaserData['servicesIncluded']),
|
||||
'season' => $teaserData['season'],
|
||||
'product' => [
|
||||
'uid' => $teaserData['productUid'],
|
||||
'name' => $teaserData['productName'],
|
||||
|
||||
+12
@@ -158,6 +158,18 @@ return [
|
||||
'default' => 0
|
||||
]
|
||||
],
|
||||
'season' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'Saison',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'items' => [
|
||||
[ 'Winter', 'w' ],
|
||||
[ 'Sommer', 's' ],
|
||||
],
|
||||
'default' => 'w',
|
||||
],
|
||||
],
|
||||
'date_start' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'Datum von',
|
||||
|
||||
+19
-7
@@ -24,12 +24,12 @@ return [
|
||||
],
|
||||
'interface' => [
|
||||
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, searchable, bookable,
|
||||
detail_page, name, name_internal, subline, keywords, headline, code, feature, bus_pro_id, teaser, teaser_long,
|
||||
concept_description, board_description, additional_services, programme_description, ski_pass_description,
|
||||
rating_average, rating_votes_count, teaser_images, header_images, images, concept, country, region, city,
|
||||
journey, facts, officetip, hotels, calendar_hotel, faqs,header_title,header_subtitle, alt_product, alt_label,
|
||||
video, banner, additional_regions, badge, daytrip, testimonials, external_link, path_segment,
|
||||
hide_booking_button,non_bookable_dates',
|
||||
season, detail_page, name, name_internal, subline, keywords, headline, code, feature, bus_pro_id, teaser,
|
||||
teaser_long, concept_description, board_description, additional_services, programme_description,
|
||||
ski_pass_description, rating_average, rating_votes_count, teaser_images, header_images, images, concept,
|
||||
country, region, city, journey, facts, officetip, hotels, calendar_hotel, faqs,header_title,header_subtitle,
|
||||
alt_product, alt_label, video, banner, additional_regions, badge, daytrip, testimonials, external_link,
|
||||
path_segment, hide_booking_button,non_bookable_dates',
|
||||
],
|
||||
'types' => [
|
||||
'1' => [
|
||||
@@ -47,7 +47,7 @@ return [
|
||||
'palettes' => [
|
||||
'destinations' => ['showitem' => 'country,region,city'],
|
||||
'top' => ['showitem' => 'searchable, bookable, hide_booking_button, daytrip, important, skipass_included,
|
||||
detail_page, external_link, path_segment'],
|
||||
season, detail_page, external_link, path_segment'],
|
||||
'name' => ['showitem' => 'name,code'],
|
||||
'alternative' => ['showitem' => 'alt_product, alt_label'],
|
||||
'header' => ['showitem' => 'headline,subline,--linebreak--,header_title,header_subtitle'],
|
||||
@@ -186,6 +186,18 @@ return [
|
||||
'default' => true,
|
||||
],
|
||||
],
|
||||
'season' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'Saison',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'items' => [
|
||||
[ 'Winter', 'w' ],
|
||||
[ 'Sommer', 's' ],
|
||||
],
|
||||
'default' => 'w',
|
||||
],
|
||||
],
|
||||
'detail_page' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'Detailseite',
|
||||
|
||||
@@ -10,6 +10,7 @@ CREATE TABLE tx_epproducts_domain_model_product
|
||||
|
||||
searchable tinyint(4) unsigned DEFAULT '1' NOT NULL,
|
||||
bookable tinyint(4) unsigned DEFAULT '1' NOT NULL,
|
||||
season varchar(64) DEFAULT '' NOT NULL,
|
||||
hide_booking_button tinyint(4) unsigned DEFAULT '0' NOT NULL,
|
||||
daytrip tinyint(4) unsigned DEFAULT '0' NOT NULL,
|
||||
important tinyint(4) unsigned DEFAULT '0' NOT NULL,
|
||||
@@ -101,6 +102,7 @@ CREATE TABLE tx_epproducts_domain_model_date
|
||||
bus_pro_id int(11) DEFAULT '0' NOT NULL,
|
||||
hotel_bus_pro_id int(11) DEFAULT '0' NOT NULL,
|
||||
code varchar(255) DEFAULT '' NOT NULL,
|
||||
season varchar(64) DEFAULT '' NOT NULL,
|
||||
date_start date DEFAULT '0000-00-00',
|
||||
date_end date DEFAULT '0000-00-00',
|
||||
nights int(11) DEFAULT '0' NOT NULL,
|
||||
|
||||
Reference in New Issue
Block a user