laravelshoppingcart icon indicating copy to clipboard operation
laravelshoppingcart copied to clipboard

How to update quantity with decimal points

Open Rahmat-OnyxTec opened this issue 2 years ago • 1 comments

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 ), ));

Rahmat-OnyxTec avatar Mar 01 '23 11:03 Rahmat-OnyxTec

Hey mate, we've forked this package and fixed that here: https://github.com/wearepixel/laravel-cart/issues/3

joelwmale avatar Aug 16 '24 06:08 joelwmale