Files
WitShop/resources/views/admin/settings/shipping.blade.php
T
marcoandClaude Sonnet 4.6 092dae6085
Deploy to Production (witstore.wende.it) / deploy (push) Successful in 8s
Add coupons, newsletter, country-based shipping, sale prices, USP bar
- 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>
2026-06-21 11:07:14 +02:00

51 lines
3.6 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
@extends('layouts.admin')
@section('title', 'Versandkosten')
@section('content')
<div class="max-w-2xl">
<div class="bg-white rounded shadow p-6 mb-6">
<h3 class="font-semibold mb-1">Neue Versandzone</h3>
<p class="text-xs text-gray-400 mb-4">Zonen: <code>DE</code> = Deutschland, <code>DACH</code> = AT/CH, <code>EU</code> = EU-Länder, <code>WORLD</code> = Welt</p>
<form method="POST" action="{{ route('admin.shipping.store') }}" class="grid grid-cols-2 gap-3">
@csrf
<div><label class="block text-xs mb-1">Name</label><input type="text" name="name" class="w-full border rounded px-3 py-2 text-sm" required></div>
<div><label class="block text-xs mb-1">Zone</label>
<select name="zone" class="w-full border rounded px-3 py-2 text-sm">
<option value="DE">DE – Deutschland</option>
<option value="DACH">DACH – Österreich + Schweiz</option>
<option value="EU">EU – Europa (ohne DE/DACH)</option>
<option value="WORLD">WORLD – Weltweit</option>
</select>
</div>
<div><label class="block text-xs mb-1">Preis (€)</label><input type="number" name="price" step="0.01" class="w-full border rounded px-3 py-2 text-sm" required></div>
<div><label class="block text-xs mb-1">Kostenlos ab (€, leer = nie)</label><input type="number" name="free_from" step="0.01" class="w-full border rounded px-3 py-2 text-sm"></div>
<div class="col-span-2 flex items-center gap-3">
<label class="flex items-center gap-2 text-sm"><input type="checkbox" name="active" value="1" checked> Aktiv</label>
<button class="bg-blue-600 text-white px-4 py-2 rounded text-sm hover:bg-blue-700">Erstellen</button>
</div>
</form>
</div>
@foreach($rates as $rate)
<div class="bg-white rounded shadow p-5 mb-4">
<form method="POST" action="{{ route('admin.shipping.update', $rate) }}" class="grid grid-cols-2 gap-3">
@csrf @method('PUT')
<div><label class="block text-xs mb-1">Name</label><input type="text" name="name" value="{{ $rate->name }}" class="w-full border rounded px-3 py-2 text-sm"></div>
<div><label class="block text-xs mb-1">Zone</label><input type="text" name="zone" value="{{ $rate->zone }}" class="w-full border rounded px-3 py-2 text-sm"></div>
<div><label class="block text-xs mb-1">Preis (€)</label><input type="number" name="price" step="0.01" value="{{ $rate->price }}" class="w-full border rounded px-3 py-2 text-sm"></div>
<div><label class="block text-xs mb-1">Kostenlos ab (€)</label><input type="number" name="free_from" step="0.01" value="{{ $rate->free_from }}" class="w-full border rounded px-3 py-2 text-sm"></div>
<div class="col-span-2 flex items-center justify-between">
<label class="flex items-center gap-2 text-sm"><input type="checkbox" name="active" value="1" {{ $rate->active ? 'checked' : '' }}> Aktiv</label>
<div class="flex gap-2">
<button class="bg-green-600 text-white px-4 py-2 rounded text-sm hover:bg-green-700">Speichern</button>
<form method="POST" action="{{ route('admin.shipping.destroy', $rate) }}" onsubmit="return confirm('Löschen?')">
@csrf @method('DELETE')
<button class="bg-red-100 text-red-600 px-4 py-2 rounded text-sm hover:bg-red-200">Löschen</button>
</form>
</div>
</div>
</form>
</div>
@endforeach
</div>
@endsection