Add coupons, newsletter, country-based shipping, sale prices, USP bar
Deploy to Production (witstore.wende.it) / deploy (push) Successful in 8s
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:
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\NewsletterSubscriber;
|
||||
|
||||
class NewsletterController extends Controller
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
$subscribers = NewsletterSubscriber::orderByDesc('created_at')->get();
|
||||
return view('admin.newsletter.index', compact('subscribers'));
|
||||
}
|
||||
|
||||
public function export()
|
||||
{
|
||||
$rows = NewsletterSubscriber::whereNotNull('confirmed_at')
|
||||
->orderBy('email')
|
||||
->pluck('email');
|
||||
|
||||
$csv = "E-Mail\n" . $rows->implode("\n");
|
||||
|
||||
return response($csv, 200, [
|
||||
'Content-Type' => 'text/csv; charset=UTF-8',
|
||||
'Content-Disposition' => 'attachment; filename="newsletter-' . date('Y-m-d') . '.csv"',
|
||||
]);
|
||||
}
|
||||
|
||||
public function destroy(NewsletterSubscriber $subscriber)
|
||||
{
|
||||
$subscriber->delete();
|
||||
return back()->with('success', 'Abonnent gelöscht.');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user