This commit is contained in:
rahul shukla 2020-01-23 19:43:03 +05:30
parent 2c0b7e4e54
commit 259f5a8c00
1 changed files with 6 additions and 0 deletions

View File

@ -146,6 +146,10 @@ class Cart {
if (is_string($cartProducts)) {
$this->collectTotals();
if (! count($cart->all_items) > 0) {
session()->forget('cart');
}
throw new \Exception($cartProducts);
} else {
$parentCartItem = null;
@ -328,6 +332,8 @@ class Cart {
$guestCart = session()->get('cart');
dd($guestCart);
//when the logged in customer is not having any of the cart instance previously and are active.
if (! $cart) {
$this->cartRepository->update([