Support the ongoing development of Laravel.io →
Authentication Security
Last updated 2 months ago.
0

Hello,

I think you'll have to store the items of the shopping cart into the database, this way you can add new items to it.

Giovanni

0

I thought of using Moltin/Shopping card and he is using sessions to store the contents of the card.

Roelof

0

I agree you should store the cart in the database as it is great for tracking cart abandonment and repopulating cart (if needed) on return visit.

You can then just assign a user_id to the cart to indicate/change ownership. Presumably you will need to commit the cart to the database at some point anyway (i.e when the purchase/payment is made)

0

Sign in to participate in this thread!

Full Stack Europe

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2022 Laravel.io - All rights reserved.