Abo Einmalprodukte und Bestätigung abschließen

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Kevin 2026-06-05 15:28:08 +00:00
parent 2bdc9ada3c
commit 2269ce031f
57 changed files with 3647 additions and 371 deletions

View file

@ -163,13 +163,13 @@ class UserMakeOrder
// WICHTIG: Yard komplett leeren vor jedem Abo, um sicherzustellen, dass keine Produkte
// aus vorherigen Abos im Cart bleiben
Yard::instance('shopping')->destroy();
Yard::instance(AboOrderCart::INSTANCE)->destroy();
// initYard akzeptiert nur einen Parameter (user_abo)
AboOrderCart::initYard($this->userAbo);
// Nochmalige Sicherheitsprüfung: Yard sollte leer sein
$yardBefore = Yard::instance('shopping');
$yardBefore = Yard::instance(AboOrderCart::INSTANCE);
$itemsBefore = $yardBefore->content();
if ($itemsBefore->count() > 0) {
Log::warning('UserMakeOrder: Yard war nicht leer nach initYard für Abo ID: '.$this->userAbo->id.', Items: '.$itemsBefore->count());
@ -179,7 +179,7 @@ class UserMakeOrder
// hier wird die Bestellung erstellt inkl aktueller Preise
AboOrderCart::makeOrderYard($this->userAbo);
$yard = Yard::instance('shopping');
$yard = Yard::instance(AboOrderCart::INSTANCE);
// Debug: Logge welche Produkte im Cart sind
$items = $yard->content();