LaravelShoppingcart icon indicating copy to clipboard operation
LaravelShoppingcart copied to clipboard

(1/1) InvalidRowIDException The cart does not contain rowId

Open Grald opened this issue 6 years ago • 2 comments

I could not figure it out the main problem of this. I check the cart item and it has a rowId inside an array.. Please help me...

Grald avatar Jun 28 '18 14:06 Grald

i have solved this problem, you just call rowId from Cart Session

if you print_r(Cart::content())) ,you get array

( [rowId] => 0ce37e9a2342235c7d3b4055b636cd08 [id] => 3 [qty] => 1 [name] => NikeLab Air Force 1 High x RT [price] => 3109000 [options] => Gloudemans\Shoppingcart\CartItemOptions Object ( [items:protected] => Array ( [size] => s [image] => nikelab-air-force-1-high-x-rt.png )

                                    )

and past the rowId to controller

dayatfadila7 avatar Jul 05 '18 13:07 dayatfadila7

you've to remove item from the cart first and then save it. Cart::remove($id);

yanikkumar avatar Aug 06 '19 11:08 yanikkumar