Files
WitShop/resources/views/admin/settings/shipping.blade.php
T
marcoandClaude Sonnet 4.6 41078fdc08 Initial commit: WitShop Laravel Online-Shop
- Laravel 11, Blade, Alpine.js, Tailwind CSS
- Produkt- & Kategorieverwaltung mit Varianten
- Checkout (Vorkasse + Rechnung), Session-Warenkorb
- Admin-Backend (Dashboard, Bestellungen, Kunden, CMS)
- DSGVO-konform: Cookie-Consent, Impressum, Widerruf, AGB
- PDF-Rechnung via dompdf, SMTP-Mailversand
- Kundenverwaltung mit manueller Freischaltung

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 00:34:09 +02:00

43 lines
3.2 KiB
PHP

@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-4">Neue Versandzone</h3>
<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 (z.B. DE, AT)</label><input type="text" name="zone" value="DE" class="w-full border rounded px-3 py-2 text-sm" required></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