Guest cart session is not getting removed after last item deletion

This commit is contained in:
jitendra 2022-04-05 15:01:16 +05:30
parent db5916f7dd
commit 0f23443a17
1 changed files with 1 additions and 1 deletions

View File

@ -274,7 +274,7 @@ class Cart
if ($cartItem = $cart->items()->find($itemId)) {
$cartItem->delete();
if ($cart->items->count() == 0) {
if ($cart->items()->get()->count() == 0) {
$this->cartRepository->delete($cart->id);
if (session()->has('cart')) {