Merge branch 'teasersort'

This commit is contained in:
Björn Fromme
2018-10-02 19:12:11 +02:00
5 changed files with 39 additions and 5 deletions
@@ -45,6 +45,11 @@ class Product extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements
*/
protected $daytrip = false;
/**
* @var bool
*/
protected $important;
/**
* @var bool
*/
@@ -316,6 +321,22 @@ class Product extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements
$this->daytrip = (bool) $daytrip;
}
/**
* @return bool
*/
public function isImportant()
{
return $this->important;
}
/**
* @param bool $important
*/
public function setImportant($important)
{
$this->important = $important;
}
/**
* @return bool
*/
@@ -110,6 +110,7 @@ class ProductRepository extends AbstractRepository
->addGroupBy('date.date_start')
->addGroupBy('date.nights')
->orderBy('date.concept_sorting')
->addOrderBy('important', 'DESC')
->addOrderBy('date.product_name')
->addOrderBy('date.min_price')
->addOrderBy('date.date_start')
@@ -160,7 +161,8 @@ class ProductRepository extends AbstractRepository
->addGroupBy('date.hotel')
->addGroupBy('date.date_start')
->addGroupBy('date.nights')
->orderBy('concept_sorting')
->orderBy('important', 'DESC')
->addOrderBy('concept_sorting')
->addOrderBy('date_start')
;
@@ -228,9 +228,10 @@ class DateImportService implements SingletonInterface
$dateCount = 0;
$sql = '
SELECT p.uid uid, p.daytrip daytrip, p.name product_name, p.bus_pro_id bus_pro_id, 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,
SELECT p.uid uid, p.daytrip daytrip, p.important important, p.name product_name, p.bus_pro_id bus_pro_id,
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,
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
@@ -360,6 +361,7 @@ class DateImportService implements SingletonInterface
'bus_pro_id' => $busProId,
'code' => $code,
'daytrip' => $product['daytrip'],
'important' => $product['important'],
];
$skiPass = $this->parseSelectionGroup($xmlDate, 'Leistungen Skipass');
@@ -44,7 +44,7 @@ return [
],
'palettes' => [
'destinations' => ['showitem' => 'country,region,city'],
'top' => ['showitem' => 'searchable, bookable, daytrip, skipass_included, detail_page'],
'top' => ['showitem' => 'searchable, bookable, daytrip, important, skipass_included, detail_page'],
'name' => ['showitem' => 'name,code'],
'alternative' => ['showitem' => 'alt_product, alt_label'],
'header' => ['showitem' => 'headline,subline,--linebreak--,header_title,header_subtitle'],
@@ -161,6 +161,13 @@ return [
'type' => 'check',
],
],
'important' => [
'exclude' => 0,
'label' => 'in Teasergruppen immer vorne',
'config' => [
'type' => 'check',
],
],
'skipass_included' => [
'exclude' => 0,
'label' => 'Skipass inklusive',
@@ -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,
daytrip tinyint(4) unsigned DEFAULT '0' NOT NULL,
important tinyint(4) unsigned DEFAULT '0' NOT NULL,
skipass_included tinyint(4) unsigned DEFAULT '1' NOT NULL,
name varchar(255) DEFAULT '' NOT NULL,
name_internal varchar(255) DEFAULT '' NOT NULL,
@@ -114,6 +115,7 @@ CREATE TABLE tx_epproducts_domain_model_date (
available int(11) DEFAULT '0' NOT NULL,
product int(11) unsigned DEFAULT '0',
daytrip tinyint(1) unsigned DEFAULT '0' NOT NULL,
important tinyint(1) unsigned DEFAULT '0' NOT NULL,
product_name varchar(255) DEFAULT '' NOT NULL,
product_subline varchar(255) DEFAULT '' NOT NULL,
product_fact varchar(255) DEFAULT '' NOT NULL,