darryldecode / laravelshoppingcart

Shopping Cart Implementation for Laravel Framework
1.32k stars 413 forks source link

How to update quantity with decimal points #357

Open Rahmat-OnyxTec opened 1 year ago

Rahmat-OnyxTec commented 1 year ago

Hello I am trying to update cart with the quantity in decimal points but it does not update it even not giving any response. Although it is working fine while adding item to cart.

Cart::add(array( 'id' => 456, // inique row ID 'name' => 'Sample Item', 'price' => 67.99, 'quantity' => 2.75, 'attributes' = array() ));

This above code is working fine for adding to cart but the below code for updating cart is not working.

Cart::update(456, array( 'quantity' => array( 'relative' => false, 'value' => 5.5 ), ));