Fixed Exception In Merged Cart
This commit is contained in:
parent
472eb9cf46
commit
c52bcb430c
|
|
@ -310,19 +310,9 @@ class Cart
|
|||
}
|
||||
|
||||
foreach ($cart->items as $item) {
|
||||
$this->cartItemRepository->delete($item->id);
|
||||
|
||||
if ($cart->items->count() == 0) {
|
||||
$this->cartRepository->delete($cart->id);
|
||||
|
||||
if (session()->has('cart')) {
|
||||
session()->forget('cart');
|
||||
}
|
||||
}
|
||||
$this->removeItem($item->id);
|
||||
}
|
||||
|
||||
$cart->save();
|
||||
|
||||
Event::dispatch('checkout.cart.delete.all.after', $cart);
|
||||
|
||||
return $cart;
|
||||
|
|
|
|||
Loading…
Reference in New Issue