Add flag to sort product teasers by
This commit is contained in:
@@ -45,6 +45,11 @@ class Product extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements
|
|||||||
*/
|
*/
|
||||||
protected $daytrip = false;
|
protected $daytrip = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
|
protected $important;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var bool
|
* @var bool
|
||||||
*/
|
*/
|
||||||
@@ -316,6 +321,22 @@ class Product extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements
|
|||||||
$this->daytrip = (bool) $daytrip;
|
$this->daytrip = (bool) $daytrip;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function isImportant()
|
||||||
|
{
|
||||||
|
return $this->important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param bool $important
|
||||||
|
*/
|
||||||
|
public function setImportant($important)
|
||||||
|
{
|
||||||
|
$this->important = $important;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -110,6 +110,7 @@ class ProductRepository extends AbstractRepository
|
|||||||
->addGroupBy('date.date_start')
|
->addGroupBy('date.date_start')
|
||||||
->addGroupBy('date.nights')
|
->addGroupBy('date.nights')
|
||||||
->orderBy('date.concept_sorting')
|
->orderBy('date.concept_sorting')
|
||||||
|
->addOrderBy('important', 'DESC')
|
||||||
->addOrderBy('date.product_name')
|
->addOrderBy('date.product_name')
|
||||||
->addOrderBy('date.min_price')
|
->addOrderBy('date.min_price')
|
||||||
->addOrderBy('date.date_start')
|
->addOrderBy('date.date_start')
|
||||||
@@ -160,7 +161,8 @@ class ProductRepository extends AbstractRepository
|
|||||||
->addGroupBy('date.hotel')
|
->addGroupBy('date.hotel')
|
||||||
->addGroupBy('date.date_start')
|
->addGroupBy('date.date_start')
|
||||||
->addGroupBy('date.nights')
|
->addGroupBy('date.nights')
|
||||||
->orderBy('concept_sorting')
|
->orderBy('important', 'DESC')
|
||||||
|
->addOrderBy('concept_sorting')
|
||||||
->addOrderBy('date_start')
|
->addOrderBy('date_start')
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|||||||
@@ -228,9 +228,10 @@ class DateImportService implements SingletonInterface
|
|||||||
$dateCount = 0;
|
$dateCount = 0;
|
||||||
|
|
||||||
$sql = '
|
$sql = '
|
||||||
SELECT p.uid uid, p.daytrip daytrip, p.name product_name, p.bus_pro_id bus_pro_id, p.searchable product_searchable,
|
SELECT p.uid uid, p.daytrip daytrip, p.important important, p.name product_name, p.bus_pro_id bus_pro_id,
|
||||||
p.detail_page product_detail_page, p.keywords product_keywords, p.teaser product_teaser,
|
p.searchable product_searchable, p.detail_page product_detail_page, p.keywords product_keywords,
|
||||||
p.feature product_feature, p.subline product_subline, p.country country, p.region region, p.city city,
|
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,
|
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,
|
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
|
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,
|
'bus_pro_id' => $busProId,
|
||||||
'code' => $code,
|
'code' => $code,
|
||||||
'daytrip' => $product['daytrip'],
|
'daytrip' => $product['daytrip'],
|
||||||
|
'important' => $product['important'],
|
||||||
];
|
];
|
||||||
|
|
||||||
$skiPass = $this->parseSelectionGroup($xmlDate, 'Leistungen Skipass');
|
$skiPass = $this->parseSelectionGroup($xmlDate, 'Leistungen Skipass');
|
||||||
|
|||||||
+8
-1
@@ -44,7 +44,7 @@ return [
|
|||||||
],
|
],
|
||||||
'palettes' => [
|
'palettes' => [
|
||||||
'destinations' => ['showitem' => 'country,region,city'],
|
'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'],
|
'name' => ['showitem' => 'name,code'],
|
||||||
'alternative' => ['showitem' => 'alt_product, alt_label'],
|
'alternative' => ['showitem' => 'alt_product, alt_label'],
|
||||||
'header' => ['showitem' => 'headline,subline,--linebreak--,header_title,header_subtitle'],
|
'header' => ['showitem' => 'headline,subline,--linebreak--,header_title,header_subtitle'],
|
||||||
@@ -161,6 +161,13 @@ return [
|
|||||||
'type' => 'check',
|
'type' => 'check',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
'important' => [
|
||||||
|
'exclude' => 0,
|
||||||
|
'label' => 'in Teasergruppen immer vorne',
|
||||||
|
'config' => [
|
||||||
|
'type' => 'check',
|
||||||
|
],
|
||||||
|
],
|
||||||
'skipass_included' => [
|
'skipass_included' => [
|
||||||
'exclude' => 0,
|
'exclude' => 0,
|
||||||
'label' => 'Skipass inklusive',
|
'label' => 'Skipass inklusive',
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ CREATE TABLE tx_epproducts_domain_model_product (
|
|||||||
searchable tinyint(4) unsigned DEFAULT '1' NOT NULL,
|
searchable tinyint(4) unsigned DEFAULT '1' NOT NULL,
|
||||||
bookable tinyint(4) unsigned DEFAULT '1' NOT NULL,
|
bookable tinyint(4) unsigned DEFAULT '1' NOT NULL,
|
||||||
daytrip tinyint(4) unsigned DEFAULT '0' 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,
|
skipass_included tinyint(4) unsigned DEFAULT '1' NOT NULL,
|
||||||
name varchar(255) DEFAULT '' NOT NULL,
|
name varchar(255) DEFAULT '' NOT NULL,
|
||||||
name_internal 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,
|
available int(11) DEFAULT '0' NOT NULL,
|
||||||
product int(11) unsigned DEFAULT '0',
|
product int(11) unsigned DEFAULT '0',
|
||||||
daytrip tinyint(1) unsigned DEFAULT '0' NOT NULL,
|
daytrip tinyint(1) unsigned DEFAULT '0' NOT NULL,
|
||||||
|
important tinyint(1) unsigned DEFAULT '0' NOT NULL,
|
||||||
product_name varchar(255) DEFAULT '' NOT NULL,
|
product_name varchar(255) DEFAULT '' NOT NULL,
|
||||||
product_subline varchar(255) DEFAULT '' NOT NULL,
|
product_subline varchar(255) DEFAULT '' NOT NULL,
|
||||||
product_fact varchar(255) DEFAULT '' NOT NULL,
|
product_fact varchar(255) DEFAULT '' NOT NULL,
|
||||||
|
|||||||
Reference in New Issue
Block a user