diff --git a/packages/Webkul/Checkout/src/Cart.php b/packages/Webkul/Checkout/src/Cart.php index 8b3ae7993..581dba191 100755 --- a/packages/Webkul/Checkout/src/Cart.php +++ b/packages/Webkul/Checkout/src/Cart.php @@ -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([