Crinsane / LaravelShoppingcart

A simple shopping cart implementation for Laravel
MIT License
3.67k stars 1.73k forks source link

Issues using the back button #679

Open david-lavely-avante opened 1 year ago

david-lavely-avante commented 1 year ago

After adding an item to the cart, when the back button is used the visible quantity in the cart reverts to zero. I have tried manipulating it with browser cache or a middle ware. Are there any suggestions on how to keep my quantity consistent.

Kepsondiaz commented 1 year ago

Hello, you can try to use this notation : Cart::add(['id' => '293ad', 'name' => 'Product 1', 'qty' => 1, 'price' => 9.99, 'options' => ['size' => 'large']]); or to try to use intance