lukepolo/laracart

Only 1 item in cart

tripex opened this issue · 2 comments

Everytime I'm adding an item to the cart, it's only return one item, even if I added multiple products:

This is my code to add an item:

LaraCart::addLine($product['id'], $product['name'], 1, $product['price'], $attributes); return LaraCart::getItems();
Anybody experienced the same? LaraCart::getItems() only returns the latest added item.

This sounds like a session issue , I’ll test it out and see if I can reproduce

Hi @lukepolo
Guess you are right about the session issue, I was using laradock yesterday, today I tried on Homestead, and it works like a charm.
Nice work 👍