From b8e109474172df090177b19d111439b40d205d87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Thu, 5 May 2022 13:42:30 +0200 Subject: [PATCH 1/3] Adds minimal RTE preset --- .../ep_theme/Configuration/RTE/Minimal.yaml | 31 +++++++++++++++++++ .../Configuration/TSconfig/Page/RTE.tsconfig | 3 ++ .../typo3conf/ext/ep_theme/ext_localconf.php | 1 + 3 files changed, 35 insertions(+) create mode 100644 public/typo3conf/ext/ep_theme/Configuration/RTE/Minimal.yaml diff --git a/public/typo3conf/ext/ep_theme/Configuration/RTE/Minimal.yaml b/public/typo3conf/ext/ep_theme/Configuration/RTE/Minimal.yaml new file mode 100644 index 00000000..9a8eee38 --- /dev/null +++ b/public/typo3conf/ext/ep_theme/Configuration/RTE/Minimal.yaml @@ -0,0 +1,31 @@ +imports: + - { resource: "EXT:rte_ckeditor/Configuration/RTE/Processing.yaml" } + - { resource: "EXT:rte_ckeditor/Configuration/RTE/Editor/Base.yaml" } + - { resource: "EXT:rte_ckeditor/Configuration/RTE/Editor/Plugins.yaml" } + +editor: + config: + height: 100 + disableNativeSpellChecker: false + contentsCss: + - "EXT:ep_theme/Resources/Public/css/rte.css?v=2020.02-01" + + stylesSet: + - { name: "Button", element: "a", attributes: { 'class': 'button' } } + + toolbarGroups: + - { name: paragraph, groups: [ list] } + - "/" + - { name: links, groups: [ links ] } + - { name: tools, groups: [ specialchar ] } + - { name: document, groups: [ mode ] } + + format_tags: "p;h1;h2;h3;h4" + + removePlugins: + - image + + removeButtons: + - Anchor + - Underline + - Strike diff --git a/public/typo3conf/ext/ep_theme/Configuration/TSconfig/Page/RTE.tsconfig b/public/typo3conf/ext/ep_theme/Configuration/TSconfig/Page/RTE.tsconfig index 61737b9f..13bec134 100644 --- a/public/typo3conf/ext/ep_theme/Configuration/TSconfig/Page/RTE.tsconfig +++ b/public/typo3conf/ext/ep_theme/Configuration/TSconfig/Page/RTE.tsconfig @@ -12,5 +12,8 @@ RTE { } } } + tx_epproducts_domain_model_product { + included_services.preset = ep-minimal + } } } diff --git a/public/typo3conf/ext/ep_theme/ext_localconf.php b/public/typo3conf/ext/ep_theme/ext_localconf.php index 5dd56595..453750a6 100644 --- a/public/typo3conf/ext/ep_theme/ext_localconf.php +++ b/public/typo3conf/ext/ep_theme/ext_localconf.php @@ -44,6 +44,7 @@ $boot = function () { $GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['default'] = 'EXT:ep_theme/Configuration/RTE/Default.yaml'; $GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['ep-reisen'] = 'EXT:ep_theme/Configuration/RTE/Default.yaml'; + $GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['ep-minimal'] = 'EXT:ep_theme/Configuration/RTE/Minimal.yaml'; $GLOBALS['TYPO3_CONF_VARS']['SYS']['fluid']['namespaces']['ep'] = ['EP\\EpTheme\\ViewHelpers']; $GLOBALS['TYPO3_CONF_VARS']['MAIL']['layoutRootPaths'][700] = 'EXT:ep_theme/Resources/Private/Layouts/Email/'; From e90782534f2908b3a1f5227bba35b02a1046070d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Thu, 5 May 2022 13:42:54 +0200 Subject: [PATCH 2/3] Adds textfield for included services --- .../Classes/Domain/Model/Product.php | 21 +++++++++++++++++++ .../tx_epproducts_domain_model_product.php | 13 +++++++++++- .../typo3conf/ext/ep_products/ext_tables.sql | 1 + 3 files changed, 34 insertions(+), 1 deletion(-) 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 a6d0723e..b954e91f 100644 --- a/public/typo3conf/ext/ep_products/Classes/Domain/Model/Product.php +++ b/public/typo3conf/ext/ep_products/Classes/Domain/Model/Product.php @@ -145,6 +145,11 @@ class Product extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements */ protected $additionalServices = ''; + /** + * @var string + */ + protected $includedServices; + /** * @var string */ @@ -646,6 +651,22 @@ class Product extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements $this->additionalServices = $additionalServices; } + /** + * @return string + */ + public function getIncludedServices() + { + return $this->includedServices; + } + + /** + * @param string $includedServices + */ + public function setIncludedServices($includedServices) + { + $this->includedServices = $includedServices; + } + /** * @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 cd2b44b5..d9b2a7f9 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,7 @@ 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, - programme_description, ski_pass_description, + included_services, programme_description, ski_pass_description, --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, @@ -341,6 +341,17 @@ return [ 'enableRichtext' => true, ], ], + 'included_services' => [ + 'exclude' => 0, + 'label' => 'Inklusivleistungen (Gruppen)', + 'config' => [ + 'type' => 'text', + 'cols' => 40, + 'rows' => 5, + 'eval' => 'trim', + 'enableRichtext' => true, + ], + ], 'programme_description' => [ 'exclude' => 0, 'label' => 'Programm', diff --git a/public/typo3conf/ext/ep_products/ext_tables.sql b/public/typo3conf/ext/ep_products/ext_tables.sql index 46d28275..170ea8bd 100644 --- a/public/typo3conf/ext/ep_products/ext_tables.sql +++ b/public/typo3conf/ext/ep_products/ext_tables.sql @@ -34,6 +34,7 @@ CREATE TABLE tx_epproducts_domain_model_product concept_description text NOT NULL, board_description text NOT NULL, additional_services text NOT NULL, + included_services text NOT NULL, programme_description text NOT NULL, ski_pass_description text NOT NULL, rating_average varchar(255) DEFAULT '' NOT NULL, From 37c7aca445c863852512acd1734f7c9b43e1b6ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Thu, 5 May 2022 15:34:02 +0200 Subject: [PATCH 3/3] Adds included services and min price to detail page if applicable --- .../Private/Partials/Product/Details.html | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) 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 181028c0..2ef7184c 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 @@ -21,6 +21,30 @@ {product.boardDescription -> f:format.html()} + +
+
+ Inklusivleistungen +
+ {product.includedServices -> f:format.html()} + +
+ + + + +
+ + ab
{product.minPrice} € +
+
+
+
+
+