feat: watchlist on TYPO3 13

Watchlist page (/merkliste/) and its list action, which renders the
hotel/product pairs a visitor stored in sessionStorage. The "remember"
buttons on teasers and detail pages had nowhere to show their list
since the static switch.

Compared with TYPO3 10 (page, empty and invalid input, unknown and
1 to 25 real pairs): identical.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
frommeandClaude Opus 5.5 committed 2026-10-21 17:28:10 +02:00
1 parent 214b4b6b86
commit 00034c99ae
6 files changed
+233

No files matched your search

@@ -0,0 +1,44 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
xmlns:ep="http://typo3.org/ns/EP/EpTheme/ViewHelpers"
data-namespace-typo3-fluid="true">
<f:if condition="{watchlist -> f:count()} == 0">
<f:then>
<div class="alert alert-info">
Deine Merkliste ist aktuell leer...
</div>
</f:then>
<f:else>
<f:for each="{watchlist}" as="section">
<div id="concept-{section.concept.uid}">
<h4 class="headline headline--tertiary headline--underlined">
{section.concept.name}
</h4>
<div class="flex flex-col space-y-4 md:space-y-8 mb-8">
<f:for each="{section.items}" as="item">
<f:render partial="Product/Teaser" section="Teaser" arguments="{
concept: section.concept,
hotel: item.hotel,
product: item.product,
country: item.country,
region: item.region,
productImage: item.hotel.images.original.0,
nights: item.nights,
board: item.board,
minPrice: item.minPrice,
daytrip: product.daytrip,
season: product.season,
dateFrom: item.minDateStart,
dateTo: item.maxDateEnd,
forceHotelUid: 1,
landscape: 1,
referringPageUri: referringPageUri
}"/>
</f:for>
</div>
</div>
</f:for>
</f:else>
</f:if>
</html>
@@ -0,0 +1,23 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
xmlns:ep="http://typo3.org/ns/EP/EpTheme/ViewHelpers"
data-namespace-typo3-fluid="true">
<f:layout name="Default"/>
<f:section name="Main">
<ep:container data="{data}">
<div class="relative"
data-controller="watchlist"
data-watchlist-uri-value="{ep:uri.ajax(action: 'list', controller: 'AjaxWatchlist', pageUid: '{settings.defaultAjaxUid}')}">
<div data-watchlist-target="container"></div>
<div class="absolute top-0 left-0 inset-0 bg-white/85 hidden"
data-watchlist-target="loadingIndicator">
<svg class="w-6 h-6 text-ep-primary-light absolute top-1/2 left-1/2 transform -translate-xy-1/2">
<use href="{f:uri.image(src: 'EXT:ep_theme/Resources/Public/images/icons_sprite.svg')}#icon-spinner"></use>
</svg>
</div>
</div>
</ep:container>
</f:section>
</html>