laravelshoppingcart
laravelshoppingcart copied to clipboard
Issue Item add and Item Remove
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.