Add email templates, page layouts, and shop themes (template system)
Deploy to Production (witstore.wende.it) / deploy (push) Successful in 7s

- E-Mail-Templates: DB-gespeicherte HTML-Templates mit {{placeholder}}-System,
  Admin-UI zum Bearbeiten von Betreff und Body, alle 4 Mailables aktualisiert
- Seiten-Layouts: 4 Layouts für CMS-Seiten (Standard, Sidebar, Volle Breite, Landing),
  Layout-Auswahl im Admin-Formular
- Shop-Themes: 5 Farbthemen via CSS-Variablen, Picker in Einstellungen
- Deployment: EmailTemplateSeeder wird automatisch beim Deploy ausgeführt

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-20 22:04:54 +02:00
co-authored by Claude Sonnet 4.6
parent 4f42b64f24
commit 5dad8b9324
23 changed files with 700 additions and 55 deletions
+27 -4
View File
@@ -2,6 +2,7 @@
namespace App\Mail;
use App\Models\EmailTemplate;
use App\Models\Setting;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
@@ -18,10 +19,32 @@ class WiderrufsformularMail extends Mailable
public function build()
{
$subject = $this->isConfirmation
? 'Bestätigung Ihres Widerrufs – ' . Setting::get('shop_name')
: 'Neues Widerrufsformular eingegangen';
if (!$this->isConfirmation) {
$subject = 'Neues Widerrufsformular eingegangen';
return $this->subject($subject)->view('emails.widerruf');
}
return $this->subject($subject)->view('emails.widerruf');
$template = EmailTemplate::getByKey('widerruf_confirmation');
if (!$template) {
return $this
->subject('Bestätigung Ihres Widerrufs – ' . Setting::get('shop_name'))
->view('emails.widerruf');
}
$vars = [
'customer_name' => $this->data['name'],
'widerruf_name' => $this->data['name'],
'widerruf_email' => $this->data['email'],
'widerruf_order_number' => $this->data['order_number'] ?? '—',
'widerruf_product' => $this->data['product'],
'widerruf_date' => $this->data['date'],
'widerruf_reason' => $this->data['reason'] ?? '—',
'shop_name' => Setting::get('shop_name'),
];
return $this
->subject($template->renderSubject($vars))
->html($template->renderBody($vars));
}
}