Add coupons, newsletter, country-based shipping, sale prices, USP bar
Deploy to Production (witstore.wende.it) / deploy (push) Successful in 8s

- Gutscheincodes: DB-Verwaltung (%, €-Rabatt, Mindestbestellwert, Ablauf),
  Eingabefeld im Checkout, Admin unter Marketing → Gutscheine
- Newsletter: Double-Opt-In per E-Mail, Formular im Footer,
  Admin-Liste mit CSV-Export
- Länderzonen-Versand: DE / DACH / EU / WORLD, Versandkosten nach
  Lieferland dynamisch berechnet, Coupon-Rabatt in Bestellung gespeichert
- Sale-Preise: sale_price auf Produkten, durchgestrichener UVP auf
  Produktkarte, Sonderangebote-Sektion auf Startseite
- USP-Leiste auf Startseite: Versand, Zahlung, Rückgabe, Service

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-21 11:07:14 +02:00
co-authored by Claude Sonnet 4.6
parent 5dad8b9324
commit 092dae6085
27 changed files with 782 additions and 51 deletions
@@ -0,0 +1,59 @@
@extends('layouts.admin')
@section('title', 'Gutscheine')
@section('content')
<div class="flex items-center justify-between mb-6">
<h2 class="text-xl font-bold">Gutscheine</h2>
<a href="{{ route('admin.coupons.create') }}" class="bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700 text-sm">+ Neuer Gutschein</a>
</div>
@if(session('success'))
<div class="bg-green-100 border border-green-300 text-green-800 px-4 py-3 rounded mb-4">{{ session('success') }}</div>
@endif
<div class="bg-white rounded shadow overflow-hidden">
<table class="w-full text-sm">
<thead class="bg-gray-50 text-gray-600 uppercase text-xs">
<tr>
<th class="px-4 py-3 text-left">Code</th>
<th class="px-4 py-3 text-left">Typ</th>
<th class="px-4 py-3 text-left">Wert</th>
<th class="px-4 py-3 text-left">Mind. Bestellwert</th>
<th class="px-4 py-3 text-left">Läuft ab</th>
<th class="px-4 py-3 text-left">Verwendet</th>
<th class="px-4 py-3 text-left">Status</th>
<th class="px-4 py-3"></th>
</tr>
</thead>
<tbody class="divide-y divide-gray-100">
@forelse($coupons as $coupon)
<tr class="hover:bg-gray-50">
<td class="px-4 py-3 font-mono font-bold">{{ $coupon->code }}</td>
<td class="px-4 py-3">{{ $coupon->type === 'percent' ? 'Prozent' : 'Betrag' }}</td>
<td class="px-4 py-3">
{{ number_format($coupon->value, 2, ',', '.') }}{{ $coupon->type === 'percent' ? ' %' : ' €' }}
</td>
<td class="px-4 py-3">{{ $coupon->min_order_value ? number_format($coupon->min_order_value, 2, ',', '.') . ' €' : '–' }}</td>
<td class="px-4 py-3">{{ $coupon->expires_at ? $coupon->expires_at->format('d.m.Y') : '–' }}</td>
<td class="px-4 py-3">{{ $coupon->used_count }}{{ $coupon->max_uses ? ' / ' . $coupon->max_uses : '' }}</td>
<td class="px-4 py-3">
@if($coupon->active)
<span class="bg-green-100 text-green-800 text-xs px-2 py-0.5 rounded-full">Aktiv</span>
@else
<span class="bg-gray-100 text-gray-600 text-xs px-2 py-0.5 rounded-full">Inaktiv</span>
@endif
</td>
<td class="px-4 py-3 text-right flex gap-2 justify-end">
<a href="{{ route('admin.coupons.edit', $coupon) }}" class="text-blue-600 hover:underline">Bearbeiten</a>
<form method="POST" action="{{ route('admin.coupons.destroy', $coupon) }}" onsubmit="return confirm('Gutschein löschen?')">
@csrf @method('DELETE')
<button class="text-red-500 hover:underline">Löschen</button>
</form>
</td>
</tr>
@empty
<tr><td colspan="8" class="px-4 py-8 text-center text-gray-400">Noch keine Gutscheine angelegt.</td></tr>
@endforelse
</tbody>
</table>
</div>
@endsection