From 107284531fb0d29360491e0bee49d7016aad8a8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Wed, 21 Feb 2024 18:57:27 +0100 Subject: [PATCH] feat: alternative headline for ski pass text on product detail page --- .../Classes/Domain/Model/Product.php | 21 +++++++++++++++++++ .../tx_epproducts_domain_model_product.php | 12 ++++++++++- .../typo3conf/ext/ep_products/ext_tables.sql | 1 + .../Private/Partials/Product/Details.html | 15 ++++++++++--- 4 files changed, 45 insertions(+), 4 deletions(-) diff --git a/public/typo3conf/ext/ep_products/Classes/Domain/Model/Product.php b/public/typo3conf/ext/ep_products/Classes/Domain/Model/Product.php index 97b78f63..5a2d9deb 100644 --- a/public/typo3conf/ext/ep_products/Classes/Domain/Model/Product.php +++ b/public/typo3conf/ext/ep_products/Classes/Domain/Model/Product.php @@ -155,6 +155,11 @@ class Product extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements */ protected $programmeDescription = ''; + /** + * @var string + */ + protected $skiPassAltTitle = ''; + /** * @var string */ @@ -686,6 +691,22 @@ class Product extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements $this->programmeDescription = $programmeDescription; } + /** + * @return string + */ + public function getSkiPassAltTitle() + { + return $this->skiPassAltTitle; + } + + /** + * @param string $skiPassAltTitle + */ + public function setSkiPassAltTitle($skiPassAltTitle) + { + $this->skiPassAltTitle = $skiPassAltTitle; + } + /** * @return string */ diff --git a/public/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_product.php b/public/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_product.php index a45b9b94..4211ae1a 100644 --- a/public/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_product.php +++ b/public/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_product.php @@ -27,7 +27,8 @@ return [ 'showitem' => '--palette--;;top, name_internal, --palette--;;name, --palette--;;header, --palette--;;destinations, --palette--;;misc, --palette--;Alternative;alternative, --div--;Texte, teaser, teaser_long, concept_description, board_description, additional_services, - included_services, programme_description, ski_pass_description, non_bookable_info, + included_services, programme_description, ski_pass_alt_title, ski_pass_description, + non_bookable_info, --div--;Verknüpfungen, --palette--;;records, hotels, facts, faqs, additional_regions, --div--;Bilder/Dateien, teaser_images, header_images, images, reseller_images, banner, video, --div--;Bewertung, --palette--;;rating, testimonials, @@ -362,6 +363,15 @@ return [ 'enableRichtext' => true, ], ], + 'ski_pass_alt_title' => [ + 'exclude' => 0, + 'label' => 'Skipass alternative überschrift', + 'config' => [ + 'type' => 'input', + 'size' => 30, + 'eval' => 'trim', + ], + ], 'ski_pass_description' => [ 'exclude' => 0, 'label' => 'Skipass', diff --git a/public/typo3conf/ext/ep_products/ext_tables.sql b/public/typo3conf/ext/ep_products/ext_tables.sql index 121c16f4..cd562698 100644 --- a/public/typo3conf/ext/ep_products/ext_tables.sql +++ b/public/typo3conf/ext/ep_products/ext_tables.sql @@ -36,6 +36,7 @@ CREATE TABLE tx_epproducts_domain_model_product additional_services text NOT NULL, included_services text NOT NULL, programme_description text NOT NULL, + ski_pass_alt_title varchar(255) DEFAULT '' NOT NULL, ski_pass_description text NOT NULL, rating_average varchar(255) DEFAULT '' NOT NULL, rating_votes_count int(11) unsigned NOT NULL default '0', diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Product/Details.html b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Product/Details.html index 0eda05d1..07cae77e 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Product/Details.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Product/Details.html @@ -76,9 +76,18 @@
-

- Skipass, Kurse, Leihmaterial -

+ + +

+ {product.skiPassAltTitle} +

+
+ +

+ Skipass, Kurse, Leihmaterial +

+
+
{product.skiPassDescription -> f:format.html()}