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,36 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration {
public function up(): void
{
Schema::create('coupons', function (Blueprint $table) {
$table->id();
$table->string('code')->unique();
$table->enum('type', ['percent', 'fixed'])->default('fixed');
$table->decimal('value', 10, 2);
$table->decimal('min_order_value', 10, 2)->nullable();
$table->timestamp('expires_at')->nullable();
$table->unsignedInteger('max_uses')->nullable();
$table->unsignedInteger('used_count')->default(0);
$table->boolean('active')->default(true);
$table->timestamps();
});
Schema::table('orders', function (Blueprint $table) {
$table->string('coupon_code')->nullable()->after('payment_method');
$table->decimal('discount_amount', 10, 2)->default(0)->after('coupon_code');
});
}
public function down(): void
{
Schema::table('orders', function (Blueprint $table) {
$table->dropColumn(['coupon_code', 'discount_amount']);
});
Schema::dropIfExists('coupons');
}
};
@@ -0,0 +1,23 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration {
public function up(): void
{
Schema::create('newsletter_subscribers', function (Blueprint $table) {
$table->id();
$table->string('email')->unique();
$table->string('token', 64)->nullable();
$table->timestamp('confirmed_at')->nullable();
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('newsletter_subscribers');
}
};
@@ -0,0 +1,21 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration {
public function up(): void
{
Schema::table('products', function (Blueprint $table) {
$table->decimal('sale_price', 10, 2)->nullable()->after('base_price');
});
}
public function down(): void
{
Schema::table('products', function (Blueprint $table) {
$table->dropColumn('sale_price');
});
}
};