Binde den Shop ins CMS ein: Seite shop, Widget Shop-Produkte, Kacheln auf der Mitgliederseite
CI Feature / test (push) Successful in 5m29s

- Eine veroeffentlichte CMS-Seite mit dem Pfad /shop bestimmt den Aufbau von /shop, sonst gilt die Standardseite
- Widget shop_products mit Filter (Saeule, Materialart), Reihenfolge, Anzahl und Suchfeld; leer, solange der Shop nicht sichtbar ist
- ShopCatalog mit Filter, Sortierung und Limit; Suchbegriff auf 100 Zeichen gekuerzt
- Sitemap ohne /shop, solange nicht gekauft werden kann
- Mitgliederseite Angebote zeigt die neuesten Produkte als Kacheln
- ADR-55, Widget-Register

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
LarsandClaude Sonnet 5.5 committed 2026-11-26 08:12:45 +01:00
1 parent 1af462e1d6
commit 61c65595e1
14 files changed
+569 -12

No files matched your search

+11 -1
View File
@@ -29,6 +29,16 @@
</ul>
@endif
@if ($shop)
<p class="mb-offers-shop"><a class="button button-secondary" href="{{ route('shop') }}">Zum Shop</a></p>
<section class="mb-offers-shop" aria-labelledby="angebote-shop">
<h2 id="angebote-shop">Im Shop</h2>
@if ($cards !== [])
<ul class="shop-tiles">
@foreach ($cards as $card)
@include('shop.kachel', ['card' => $card])
@endforeach
</ul>
@endif
<p><a class="button button-secondary" href="{{ route('shop') }}">Zum Shop</a></p>
</section>
@endif
@endsection
@@ -0,0 +1,41 @@
{{--
Shop-Produkte (ADR-55). Die Kacheln kommen aus ShopCatalog, nichts davon wird im CMS gespeichert. Ist der Shop nicht
sichtbar, bleibt der Abschnitt öffentlich leer; die Redaktionsvorschau zeigt einen Hinweis.
--}}
@if ($shopVisible || $context->preview)
<div class="shop-products">
@if (filled($data['heading'] ?? null))
<h2>{{ $data['heading'] }}</h2>
@endif
@if (filled($data['intro'] ?? null))
<p class="lede">{{ $data['intro'] }}</p>
@endif
@unless ($shopVisible)
<p class="preview-note">Der Shop ist zurzeit nicht sichtbar. Öffentlich erscheint dieser Abschnitt nicht.</p>
@else
@if (($settings['search'] ?? 'aus') === 'an')
<form class="shop-search" method="get" action="{{ route('shop') }}" role="search">
<label for="shop-suche-{{ $widget['id'] ?? 'w' }}">Shop durchsuchen</label>
<input id="shop-suche-{{ $widget['id'] ?? 'w' }}" type="search" name="suche" value="{{ $term }}" autocomplete="off">
<button class="button" type="submit">Suchen</button>
@if ($term !== '')
<a class="button button-quiet" href="{{ route('shop') }}">Suche zurücksetzen</a>
@endif
</form>
@endif
@if ($cards === [])
<div class="empty">
<h3>{{ $term !== '' ? 'Keine Treffer' : 'Noch keine kaufbaren Produkte' }}</h3>
<p>{{ $term !== '' ? 'Zu „'.$term.'“ gibt es keine kaufbaren Produkte. Prüfe die Schreibweise oder setze die Suche zurück.' : 'Sobald ein Angebot aktiv ist, erscheint es hier.' }}</p>
</div>
@else
<p class="shop-count" role="status">{{ count($cards) }} {{ count($cards) === 1 ? 'Produkt' : 'Produkte' }}</p>
<ul class="shop-tiles">
@foreach ($cards as $card)
@include('shop.kachel', ['card' => $card])
@endforeach
</ul>
@endif
@endunless
</div>
@endif