From 08c11473369071d8345ba4c8a5a9479e761b4ed4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Tue, 15 Apr 2025 16:32:23 +0200 Subject: [PATCH 01/18] fix: correctly calculate option price per person closes #8697b8j0m --- .../js/components/GroupsPriceCalculator.vue | 49 ++++++++++++------- 1 file changed, 31 insertions(+), 18 deletions(-) diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/GroupsPriceCalculator.vue b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/GroupsPriceCalculator.vue index 37d28a19..a291d6f3 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/GroupsPriceCalculator.vue +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/GroupsPriceCalculator.vue @@ -95,7 +95,7 @@ {{ selectedOption.title }} - {{ formatCurrency(selectedOption.price) }} + {{ formatCurrency(calculateOptionPrice(selectedOption)) }} @@ -114,8 +114,11 @@ Gesamtpreis - {{ formatCurrency(priceTotal) }}
zzgl. vor Ort zu entrichtender - Ortstaxe + + {{ formatCurrency(priceTotal) }} +
+ zzgl. vor Ort zu entrichtender Ortstaxe + @@ -371,6 +374,28 @@ export default { return price }, + calculateOptionPrice(option) { + let price = { + EUR: 0, + CHF: 0, + }; + let optionPriceEUR = option.price.EUR + let optionPriceCHF = option.price.CHF + if (1 === option.type) { + price.EUR = optionPriceEUR; + price.CHF = optionPriceCHF; + } else if (2 === option.type) { + price.EUR = optionPriceEUR * this.selectedPax; + price.CHF = optionPriceCHF * this.selectedPax; + } else if (3 === option.type) { + price.EUR = optionPriceEUR * this.nightsCount; + price.CHF = optionPriceCHF * this.nightsCount; + } else if (4 === option.type) { + price.EUR = optionPriceEUR * this.nightsCount * this.selectedPax; + price.CHF = optionPriceCHF * this.nightsCount * this.selectedPax; + } + return price; + }, formatOptionPriceType(option) { if (2 === option.type) { return ` (${this.formatCurrency(option.price)} pro Person)` @@ -518,21 +543,9 @@ export default { CHF: 0, }; for (let option of this.selectedOptions) { - let optionPriceEUR = option.price.EUR - let optionPriceCHF = option.price.CHF - if (1 === option.type) { - price.EUR += optionPriceEUR; - price.CHF += optionPriceCHF; - } else if (2 === option.type) { - price.EUR += optionPriceEUR * this.selectedPax; - price.CHF += optionPriceCHF * this.selectedPax; - } else if (3 === option.type) { - price.EUR += optionPriceEUR * this.nightsCount; - price.CHF += optionPriceCHF * this.nightsCount; - } else if (4 === option.type) { - price.EUR += optionPriceEUR * this.nightsCount * this.selectedPax; - price.CHF += optionPriceCHF * this.nightsCount * this.selectedPax; - } + let optionPrice = this.calculateOptionPrice(option) + price.EUR += optionPrice.EUR; + price.CHF += optionPrice.CHF; } return price; }, From 24685b6cb893030a405cfae4204738c4fbbf969a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Tue, 22 Apr 2025 10:20:49 +0200 Subject: [PATCH 02/18] feat: additional distinction in pax regarding undersubscription costs closes #8698nahva --- .../Controller/GroupsPriceController.php | 6 ++-- .../flexform_groups_price_calculator.xml | 34 +++++++++++++++---- .../js/components/GroupsPriceCalculator.vue | 21 +++++++++--- 3 files changed, 48 insertions(+), 13 deletions(-) diff --git a/public/typo3conf/ext/ep_products/Classes/Controller/GroupsPriceController.php b/public/typo3conf/ext/ep_products/Classes/Controller/GroupsPriceController.php index 49300c80..e68a4fca 100644 --- a/public/typo3conf/ext/ep_products/Classes/Controller/GroupsPriceController.php +++ b/public/typo3conf/ext/ep_products/Classes/Controller/GroupsPriceController.php @@ -52,8 +52,10 @@ class GroupsPriceController extends ActionController $this->view->assign('hotel', $hotel); $this->view->assign('runningCostsEUR', $this->settings['runningCostsEUR']); $this->view->assign('runningCostsCHF', $this->settings['runningCostsCHF']); - $this->view->assign('undersubscriptionEUR', $this->settings['undersubscriptionEUR']); - $this->view->assign('undersubscriptionCHF', $this->settings['undersubscriptionCHF']); + $this->view->assign('undersubscription30EUR', $this->settings['undersubscription30EUR']); + $this->view->assign('undersubscription30CHF', $this->settings['undersubscription30CHF']); + $this->view->assign('undersubscription40EUR', $this->settings['undersubscription40EUR']); + $this->view->assign('undersubscription40CHF', $this->settings['undersubscription40CHF']); $this->view->assign('countryCode', $hotel->getCountry()->getCode()); $this->view->assign('configs', json_encode(array_values($configs), JSON_HEX_APOS)); $this->view->assign('boards', json_encode($hotel->getGroupsPriceBoards()->toArray(), JSON_HEX_APOS)); diff --git a/public/typo3conf/ext/ep_products/Configuration/FlexForms/flexform_groups_price_calculator.xml b/public/typo3conf/ext/ep_products/Configuration/FlexForms/flexform_groups_price_calculator.xml index 67cb1a72..f8c607c3 100644 --- a/public/typo3conf/ext/ep_products/Configuration/FlexForms/flexform_groups_price_calculator.xml +++ b/public/typo3conf/ext/ep_products/Configuration/FlexForms/flexform_groups_price_calculator.xml @@ -32,28 +32,50 @@ - + 0 - + input 5.0 double2,required - - + + 0 - + input 5.0 double2,required - + + + + 0 + + + input + 2.5 + double2,required + + + + + + 0 + + + input + 2.5 + double2,required + + + diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/GroupsPriceCalculator.vue b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/GroupsPriceCalculator.vue index a291d6f3..e659cadc 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/GroupsPriceCalculator.vue +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/GroupsPriceCalculator.vue @@ -294,14 +294,22 @@ export default { type: Number, default: 2.9, }, - undersubscriptionEur: { + undersubscription30Eur: { type: Number, default: 5.0, }, - undersubscriptionChf: { + undersubscription30Chf: { type: Number, default: 5.0, }, + undersubscription40Eur: { + type: Number, + default: 2.5, + }, + undersubscription40Chf: { + type: Number, + default: 2.5, + }, countryCode: { type: String, required: true @@ -530,9 +538,12 @@ export default { } } } - if (this.selectedBoard && this.selectedPax < 50) { - undersubscription.EUR = this.selectedPax * this.undersubscriptionEur * this.selectedRange.length - undersubscription.CHF = this.selectedPax * this.undersubscriptionChf * this.selectedRange.length + if (this.selectedBoard && this.selectedPax < 40) { + undersubscription.EUR = this.selectedPax * this.undersubscription30Eur * this.selectedRange.length + undersubscription.CHF = this.selectedPax * this.undersubscription30Chf * this.selectedRange.length + } else if (this.selectedBoard && this.selectedPax < 50) { + undersubscription.EUR = this.selectedPax * this.undersubscription40Eur * this.selectedRange.length + undersubscription.CHF = this.selectedPax * this.undersubscription40Chf * this.selectedRange.length } return {base, additional, undersubscription} From 40c72a905f0a2aa2061e1497c71871582d37e821 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Tue, 22 Apr 2025 10:20:49 +0200 Subject: [PATCH 03/18] feat: additional distinction in pax regarding undersubscription costs closes #8698nahva --- .../Resources/Private/Templates/GroupsPrice/Index.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Templates/GroupsPrice/Index.html b/public/typo3conf/ext/ep_theme/Resources/Private/Templates/GroupsPrice/Index.html index f656bc61..326e0043 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Templates/GroupsPrice/Index.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Templates/GroupsPrice/Index.html @@ -15,8 +15,10 @@ options-json='{options}' running-costs-factor-eur="{runningCostsEUR}" running-costs-factor-chf="{runningCostsCHF}" - undersubscription-eur="{undersubscriptionEUR}" - undersubscription-chf="{undersubscriptionCHF}" + undersubscription-30-eur="{undersubscription30EUR}" + undersubscription-30-chf="{undersubscription30CHF}" + undersubscription-40-eur="{undersubscription40EUR}" + undersubscription-40-chf="{undersubscription40CHF}" country-code="{countryCode}" endpoint="{ep:uri.ajax(action: 'processForm', controller: 'AjaxGroupsPrice', pageUid: settings.defaultAjaxUid, arguments: '{hotel: hotel}')}" loader-uri="{f:uri.image(src: 'EXT:ep_theme/Resources/Public/images/ajax-loader-white.gif')}" From d6df7ba552cfdb065fa2c11bc2cc98c305ffe41d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Tue, 22 Apr 2025 14:34:00 +0200 Subject: [PATCH 04/18] feat: render price table rows separately in regard of availability closes #8698te15z --- .../Domain/Repository/ProductRepository.php | 15 +- .../Classes/Service/DateService.php | 14 +- .../Templates/AjaxTable/Pricetable.html | 256 +++++++++--------- 3 files changed, 147 insertions(+), 138 deletions(-) diff --git a/public/typo3conf/ext/ep_products/Classes/Domain/Repository/ProductRepository.php b/public/typo3conf/ext/ep_products/Classes/Domain/Repository/ProductRepository.php index 3753dfa4..9cfd8df9 100644 --- a/public/typo3conf/ext/ep_products/Classes/Domain/Repository/ProductRepository.php +++ b/public/typo3conf/ext/ep_products/Classes/Domain/Repository/ProductRepository.php @@ -191,7 +191,7 @@ class ProductRepository extends AbstractRepository ; } - public function getPricetable(Product $product, Hotel $hotel, array $filterSettings, Date $date = null, bool $sortByRoom = true): array + public function getPricetable(Product $product, Hotel $hotel, array $filterSettings, Date $date = null): array { $qb = $this->getDbConnection()->createQueryBuilder(); @@ -207,18 +207,11 @@ class ProductRepository extends AbstractRepository ) ->from('tx_epproducts_domain_model_date', 'date') ->innerJoin('date', 'tx_epproducts_domain_model_room', 'room', 'date.uid = room.date') - ->orderBy('room.available', 'DESC') + ->orderBy('room.pax', 'ASC') + ->addOrderBy('room.price', 'ASC') + ->addOrderBy('room.available', 'DESC') ; - if (true === $sortByRoom) { - $qb->addOrderBy('room.name', 'ASC'); - } else { - $qb - ->addOrderBy('room.pax', 'ASC') - ->addOrderBy('room.price', 'ASC') - ; - } - $qb ->where('date.date_start >= NOW()') ->andWhere($qb->expr()->eq( diff --git a/public/typo3conf/ext/ep_products/Classes/Service/DateService.php b/public/typo3conf/ext/ep_products/Classes/Service/DateService.php index 03661b1a..c8d90af7 100644 --- a/public/typo3conf/ext/ep_products/Classes/Service/DateService.php +++ b/public/typo3conf/ext/ep_products/Classes/Service/DateService.php @@ -109,7 +109,6 @@ class DateService implements SingletonInterface $date = $resolvedOptions['date']; $template = $resolvedOptions['template']; $paCode = $resolvedOptions['paCode']; - $sortByRoom = $resolvedOptions['sortByRoom']; if ($filterSettings === null) { $filterSettings = $this->filterService->getNormalizedFilterSettings(); @@ -118,7 +117,7 @@ class DateService implements SingletonInterface $nonBookableDateUids = GeneralUtility::trimExplode(',', $product->getNonBookableDates(), true); return $this->preprocessPriceTable([ - 'priceTableData' => $this->productRepository->getPricetable($product, $hotel, $filterSettings, $date, $sortByRoom), + 'priceTableData' => $this->productRepository->getPricetable($product, $hotel, $filterSettings, $date), 'template' => $template, 'paCode' => $paCode, 'isDayTrip' => $product->isDaytrip(), @@ -188,7 +187,11 @@ class DateService implements SingletonInterface $resolver->setDefault('isDayTrip', false); $resolver->setDefault('showBookingButton', true); $resolvedOptions = $resolver->resolve($options); - $priceTable = []; + + $priceTable = [ + 'available' => [], + 'unavailable' => [], + ]; $priceTableData = $resolvedOptions['priceTableData']; $template = $resolvedOptions['template']; @@ -210,7 +213,10 @@ class DateService implements SingletonInterface 'isDayTrip' => $isDayTrip, ]); $optionalServices = $this->preprocessOptionalServices(unserialize($row['roomOptionalServices'], ['allowed_classes' => false])); - $priceTable[] = [ + + $key = $row['roomAvailable'] && $row['roomPrice'] ? 'available' : 'unavailable'; + + $priceTable[$key][] = [ 'dateStart' => $dateStart->format('d.m.Y'), 'dateEnd' => $dateEnd->format('d.m.Y'), 'season' => $row['season'], diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Templates/AjaxTable/Pricetable.html b/public/typo3conf/ext/ep_theme/Resources/Private/Templates/AjaxTable/Pricetable.html index f9ffae3e..f6b1b9a5 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Templates/AjaxTable/Pricetable.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Templates/AjaxTable/Pricetable.html @@ -47,129 +47,17 @@ - - - - - - - {row.roomName} - - - - - {row.roomName} - - - - ausgebucht - - - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
- - - - - - - - - - - - - {row.minPrice} - - - - - - {row.minPrice} € - - - - - - - Reisen-Alert - - - - - + + + + + + @@ -307,4 +195,126 @@ + + + + + + + {row.roomName} + + + + {row.roomName} + + + ausgebucht + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ + + + + + + + + + + + + {row.minPrice} + + + + + + {row.minPrice} € + + + + + + + Reisen-Alert + + + + + +
From 0d0e0777a27c6d527fbb47d49c4525dd33cda85b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Tue, 22 Apr 2025 14:37:21 +0200 Subject: [PATCH 05/18] feat: add optional field for booking number to general contact form closes #8698u7753 --- .../ep_theme/Resources/Private/Forms/ContactForm.form.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Forms/ContactForm.form.yaml b/public/typo3conf/ext/ep_theme/Resources/Private/Forms/ContactForm.form.yaml index a9394c68..3a0ec95b 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Forms/ContactForm.form.yaml +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Forms/ContactForm.form.yaml @@ -121,6 +121,11 @@ renderables: type: Textarea identifier: message label: 'Deine Kontaktanfrage' + - + defaultValue: '' + type: Text + identifier: bookingNumber + label: 'Buchungsnummer (falls vorhanden)' - type: LinkedCheckbox identifier: privacypolicyaccepted From fbf3a5170de7e94bcc86abe291ed3fd1c709c3fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Tue, 22 Apr 2025 16:49:32 +0200 Subject: [PATCH 06/18] chore: remove obsolete import --- .../Classes/Controller/TravelinfoController.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/public/typo3conf/ext/ep_products/Classes/Controller/TravelinfoController.php b/public/typo3conf/ext/ep_products/Classes/Controller/TravelinfoController.php index 582f3866..a3279963 100644 --- a/public/typo3conf/ext/ep_products/Classes/Controller/TravelinfoController.php +++ b/public/typo3conf/ext/ep_products/Classes/Controller/TravelinfoController.php @@ -5,7 +5,6 @@ namespace EP\EpProducts\Controller; use EP\EpProducts\Domain\Model\Date; use EP\EpProducts\Domain\Model\Travelinfo; use EP\EpProducts\Domain\Repository\DateRepository; -use EP\EpProducts\Domain\Repository\ProductRepository; use EP\EpProducts\Domain\Repository\TravelinfoRepository; use TYPO3\CMS\Core\Http\ImmediateResponseException; use TYPO3\CMS\Core\Utility\GeneralUtility; @@ -24,19 +23,12 @@ class TravelinfoController extends ActionController */ private $travelinfoRepository; - /** - * @var ProductRepository - */ - private $productRepository; - public function __construct( DateRepository $dateRepository, - TravelinfoRepository $travelinfoRepository, - ProductRepository $productRepository + TravelinfoRepository $travelinfoRepository ) { $this->dateRepository = $dateRepository; $this->travelinfoRepository = $travelinfoRepository; - $this->productRepository = $productRepository; } public function travelCodeAction(string $travelCode) From 1843a67a001ae3ee7d9f724bad76e9264539b0b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Wed, 23 Apr 2025 09:21:12 +0200 Subject: [PATCH 07/18] feat: exclude children from price calculation except for running costs closes #8698nak2f --- .../Domain/Model/Dto/GroupsPriceInquiry.php | 21 +++++ .../js/components/GroupsPriceCalculator.vue | 76 ++++++++++++------- .../Private/Templates/Email/GroupsPrice.html | 4 + 3 files changed, 75 insertions(+), 26 deletions(-) diff --git a/public/typo3conf/ext/ep_products/Classes/Domain/Model/Dto/GroupsPriceInquiry.php b/public/typo3conf/ext/ep_products/Classes/Domain/Model/Dto/GroupsPriceInquiry.php index 99bbfdb7..224f077c 100644 --- a/public/typo3conf/ext/ep_products/Classes/Domain/Model/Dto/GroupsPriceInquiry.php +++ b/public/typo3conf/ext/ep_products/Classes/Domain/Model/Dto/GroupsPriceInquiry.php @@ -97,6 +97,11 @@ class GroupsPriceInquiry */ protected $pax; + /** + * @var string + */ + protected $children; + /** * @var array */ @@ -297,6 +302,22 @@ class GroupsPriceInquiry $this->pax = $pax; } + /** + * @return string + */ + public function getChildren() + { + return $this->children; + } + + /** + * @param string $pax + */ + public function setChildren($children) + { + $this->children = $children; + } + /** * @return array */ diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/GroupsPriceCalculator.vue b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/GroupsPriceCalculator.vue index e659cadc..1aa19547 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/GroupsPriceCalculator.vue +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/GroupsPriceCalculator.vue @@ -16,20 +16,38 @@ Einzelne Nächte sind nur auf Anfrage buchbar

-
- - -

- Bitte zuerst einen Zeitraum wählen -

+
+ + +

+ Bitte zuerst einen Zeitraum wählen +

+
+
+ + +

+ Bitte zuerst einen Zeitraum wählen +

+
@@ -350,6 +368,7 @@ export default { selectedTo: null, selectedRange: [], selectedPax: 30, + childrenCount: 0, selectedOptions: [], selectedBoard: null, name: null, @@ -393,14 +412,14 @@ export default { price.EUR = optionPriceEUR; price.CHF = optionPriceCHF; } else if (2 === option.type) { - price.EUR = optionPriceEUR * this.selectedPax; - price.CHF = optionPriceCHF * this.selectedPax; + price.EUR = optionPriceEUR * this.paxCount; + price.CHF = optionPriceCHF * this.paxCount; } else if (3 === option.type) { price.EUR = optionPriceEUR * this.nightsCount; price.CHF = optionPriceCHF * this.nightsCount; } else if (4 === option.type) { - price.EUR = optionPriceEUR * this.nightsCount * this.selectedPax; - price.CHF = optionPriceCHF * this.nightsCount * this.selectedPax; + price.EUR = optionPriceEUR * this.nightsCount * this.paxCount; + price.CHF = optionPriceCHF * this.nightsCount * this.paxCount; } return price; }, @@ -462,6 +481,7 @@ export default { 'tx_epproducts_ajax[groupsPriceInquiry][dateFrom]': this.selectedFrom.format('DD.MM.YYYY'), 'tx_epproducts_ajax[groupsPriceInquiry][dateTo]': this.selectedTo.format('DD.MM.YYYY'), 'tx_epproducts_ajax[groupsPriceInquiry][pax]': this.selectedPax, + 'tx_epproducts_ajax[groupsPriceInquiry][children]': this.childrenCount, 'tx_epproducts_ajax[groupsPriceInquiry][summary][paxBase]': this.formatCurrency(this.pricePax.base), 'tx_epproducts_ajax[groupsPriceInquiry][summary][paxAdditional]': this.formatCurrency(this.pricePax.additional), 'tx_epproducts_ajax[groupsPriceInquiry][summary][undersubscription]': this.formatCurrency(this.pricePax.undersubscription), @@ -498,6 +518,10 @@ export default { }, }, computed: { + paxCount() { + // subtract number of children from pax for price calculation, but minimum 30 pax + return Math.max(this.selectedPax - this.childrenCount, 30) + }, nightsCount() { return this.selectedRange.length; }, @@ -530,7 +554,7 @@ export default { base.EUR += config.price.EUR base.CHF += config.price.CHF let included = config.personsIncluded - let additionalPax = this.selectedPax - included + let additionalPax = this.paxCount - included if (this.selectedPax > included) { additional.EUR += additionalPax * config.priceAdditionalPerson.EUR additional.CHF += additionalPax * config.priceAdditionalPerson.CHF @@ -538,12 +562,12 @@ export default { } } } - if (this.selectedBoard && this.selectedPax < 40) { - undersubscription.EUR = this.selectedPax * this.undersubscription30Eur * this.selectedRange.length - undersubscription.CHF = this.selectedPax * this.undersubscription30Chf * this.selectedRange.length - } else if (this.selectedBoard && this.selectedPax < 50) { - undersubscription.EUR = this.selectedPax * this.undersubscription40Eur * this.selectedRange.length - undersubscription.CHF = this.selectedPax * this.undersubscription40Chf * this.selectedRange.length + if (this.selectedBoard && this.paxCount < 40) { + undersubscription.EUR = this.paxCount * this.undersubscription30Eur * this.selectedRange.length + undersubscription.CHF = this.paxCount * this.undersubscription30Chf * this.selectedRange.length + } else if (this.selectedBoard && this.paxCount < 50) { + undersubscription.EUR = this.paxCount * this.undersubscription40Eur * this.selectedRange.length + undersubscription.CHF = this.paxCount * this.undersubscription40Chf * this.selectedRange.length } return {base, additional, undersubscription} @@ -566,8 +590,8 @@ export default { CHF: 0, } if (this.selectedBoard) { - price.EUR = this.selectedBoard.price.EUR * this.nightsCount * this.selectedPax; - price.CHF = this.selectedBoard.price.CHF * this.nightsCount * this.selectedPax; + price.EUR = this.selectedBoard.price.EUR * this.nightsCount * this.paxCount; + price.CHF = this.selectedBoard.price.CHF * this.nightsCount * this.paxCount; } return price }, diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Templates/Email/GroupsPrice.html b/public/typo3conf/ext/ep_theme/Resources/Private/Templates/Email/GroupsPrice.html index 42a07ae4..c72ad853 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Templates/Email/GroupsPrice.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Templates/Email/GroupsPrice.html @@ -54,6 +54,10 @@ Anzahl der Personen {pax -> v:or(alternative: '-')} + + Anzahl Kinder 0-3 Jahre + {children -> v:or(alternative: '-')} + Verpflegung From 3839c31270a48648efd671777a18d032e39b8cfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Wed, 23 Apr 2025 09:49:09 +0200 Subject: [PATCH 08/18] feat: additional info text regarding children in price calculator addresses #8698nak2f --- .../Private/Assets/js/components/GroupsPriceCalculator.vue | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/GroupsPriceCalculator.vue b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/GroupsPriceCalculator.vue index 1aa19547..6ab91df2 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/GroupsPriceCalculator.vue +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/GroupsPriceCalculator.vue @@ -43,9 +43,8 @@ v-model.number="childrenCount" @change="onPaxUpdated()" v-show="nightsCount > 0"/> -

- Bitte zuerst einen Zeitraum wählen +

+ Kinder werden nur bei Strom- und Abfallgebühren berücksichtigt

From 751b54355642ae9c59e53b8a34a784b778c0f2b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Thu, 24 Apr 2025 09:11:46 +0200 Subject: [PATCH 09/18] fix: default search parameter 'pax' to 0 closes #8698uzhqd --- .../ext/ep_products/Classes/Service/SearchResultService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/typo3conf/ext/ep_products/Classes/Service/SearchResultService.php b/public/typo3conf/ext/ep_products/Classes/Service/SearchResultService.php index 0045a31c..7aeddda3 100644 --- a/public/typo3conf/ext/ep_products/Classes/Service/SearchResultService.php +++ b/public/typo3conf/ext/ep_products/Classes/Service/SearchResultService.php @@ -69,7 +69,7 @@ class SearchResultService implements SingletonInterface 'destinationUid' => null, 'destinationType' => null, 'nights' => null, - 'pax' => 1, + 'pax' => 0, 'pageUid' => null, ]); From 61b49409de37e77836e3a90206b2978883f22300 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Tue, 29 Apr 2025 15:56:14 +0200 Subject: [PATCH 10/18] fix: adjust header image dimensions to improve image quality addresses #8698uzqru --- .../ep_theme/Resources/Private/Partials/HeaderSliderSmall.html | 2 +- .../Resources/Private/Partials/Product/HeaderDetail.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/HeaderSliderSmall.html b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/HeaderSliderSmall.html index 679c008e..49eac74d 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/HeaderSliderSmall.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/HeaderSliderSmall.html @@ -7,7 +7,7 @@ - +
- + Date: Tue, 29 Apr 2025 17:38:44 +0200 Subject: [PATCH 11/18] feat: extended feedback after calculator submission closes #8698wr7v0 --- .../js/components/GroupsPriceCalculator.vue | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/GroupsPriceCalculator.vue b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/GroupsPriceCalculator.vue index 6ab91df2..53acddbb 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/GroupsPriceCalculator.vue +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/GroupsPriceCalculator.vue @@ -85,10 +85,18 @@
+
+

+ Vielen Dank für Deine {{ mode === 'booking' ? 'Buchung' : 'Anfrage' }}. +

+

+ Für folgendes habt ihr euch entschieden: +

+
Preise
-
+
@@ -144,6 +152,15 @@ Bitte zuerst einen Zeitraum wählen

+
+ Bitte beachtet, dass die Buchung bei uns eingegangen, aber noch nicht bestätigt ist. + Wir behalten uns vor, die Buchungen auf Verfügbarkeit und Länge des gewünschten Aufenthalts zu prüfen. + Erst wenn wir euch die Buchung per Mail bestätigt haben, wird sie bindend. +
+
+ Die Anfrage ist bei uns eingegangen und wird schnellstmöglich bearbeitet. Wir melden uns telefonisch + oder per Mail bei euch. +
@@ -254,9 +271,6 @@
-
- Vielen Dank für Deine {{ mode === 'booking' ? 'Buchung' : 'Anfrage' }}. Wir werden diese schnellstmöglich bearbeiten. -
From a7669aff6021bfc6a74456e01a5284fa2318c28b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Tue, 6 May 2025 17:39:07 +0200 Subject: [PATCH 12/18] fix: empty options modals in price-tables closes #8698z480j --- .../Templates/AjaxTable/Pricetable.html | 55 +++++++++++-------- 1 file changed, 31 insertions(+), 24 deletions(-) diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Templates/AjaxTable/Pricetable.html b/public/typo3conf/ext/ep_theme/Resources/Private/Templates/AjaxTable/Pricetable.html index f6b1b9a5..c8c06a33 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Templates/AjaxTable/Pricetable.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Templates/AjaxTable/Pricetable.html @@ -165,30 +165,11 @@
- - + + + + +
@@ -317,4 +298,30 @@ + + + + From 0038ff598aa0e80b8c4c74f1572b08702b178993 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Tue, 6 May 2025 17:44:13 +0200 Subject: [PATCH 13/18] feat: don't render superfluous modals --- .../Templates/AjaxTable/Pricetable.html | 37 +++++++++---------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Templates/AjaxTable/Pricetable.html b/public/typo3conf/ext/ep_theme/Resources/Private/Templates/AjaxTable/Pricetable.html index c8c06a33..73d7e3e9 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Templates/AjaxTable/Pricetable.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Templates/AjaxTable/Pricetable.html @@ -168,9 +168,6 @@ - - - @@ -304,23 +301,25 @@ data-modal-target="content" data-uid="{row.roomUid}"> -
-
- {section.label} + +
+
+ {section.label} +
+ + +
+
+ {service.label}: +
+
+ {service.price} € +
+
+
+
- - -
-
- {service.label}: -
-
- {service.price} € -
-
-
-
-
+
From 03a52fe47c661e7df07218f3c379e088bd33f47b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Wed, 7 May 2025 12:35:37 +0200 Subject: [PATCH 14/18] fix: don't hide optional but free board options --- .../Resources/Private/Templates/AjaxTable/Pricetable.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Templates/AjaxTable/Pricetable.html b/public/typo3conf/ext/ep_theme/Resources/Private/Templates/AjaxTable/Pricetable.html index 73d7e3e9..c0c1e140 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Templates/AjaxTable/Pricetable.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Templates/AjaxTable/Pricetable.html @@ -307,7 +307,7 @@ {section.label} - +
{service.label}: From 8a7b61612e05ed41de07503e2d95bf9a3ca160cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Fri, 9 May 2025 15:35:15 +0200 Subject: [PATCH 15/18] fix: adopt changes in price-table rendering to events --- .../ext/ep_theme/Resources/Private/Partials/Pricetable.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Pricetable.html b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Pricetable.html index 298ec8be..e2e8b52d 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Pricetable.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Pricetable.html @@ -3,7 +3,7 @@ xmlns:f="http://typo3.org/ns/fluid/ViewHelpers" xmlns:ep="http://typo3.org/ns/EP/EpTheme/ViewHelpers"> - +
{nonBookableInfo.text -> f:format.html()} @@ -32,7 +32,7 @@
- +
{row.roomName} @@ -137,7 +137,7 @@
- +