laravelshoppingcart icon indicating copy to clipboard operation
laravelshoppingcart copied to clipboard

Issue Item add and Item Remove

Open tomforjerry23 opened this issue 4 years ago • 0 comments

Hello Dear, I am facing some issue, for example some time I add item to cart automatically two items add in cart, and some time I remove item from cart item not remove from cart.

For example item have two quantity when I clicked to remove from cart, the remove action decrease quantity. But item doesn't remove. This problem sometimes occurs

When we try again and again, item add to cart and remove from cart.

here is my code

$cartDataArray = array(
     'id' => $item->id,
     'name' => $item->name,
     'price' => $item->price,
    'quantity' => $quantity,
     'attributes' => array(),
    'associatedModel' => $item
 );

\Cart::add($cartDataArray);

Thank You.

tomforjerry23 avatar Mar 29 '20 13:03 tomforjerry23