laravel-cart icon indicating copy to clipboard operation
laravel-cart copied to clipboard

Troubles with users

Open brjosue73 opened this issue 10 years ago • 3 comments

Hi, i am trying to implement a shopping cart and i have moltin installed but when i add a producto, it stored for every users, and its suppose to save it only for one user, what can i do? or what i am doing wrong? thanks for the help psd. sorry for my bad english

brjosue73 avatar Jan 02 '15 16:01 brjosue73

The laravel interface handles all carts using a unique identifier stored as a cookie, if you're testing solo chances are you've still got the same cookie from the first user. What you can do is either switch to using our session storage driver or create your own that would store these in your database with your user data.

jHoldroyd avatar Jan 02 '15 17:01 jHoldroyd

so if i put it in a web server it will work, or how i destroy the cookie when the user logout?, i am using the auth::logout, where can i see the session storage driver?

brjosue73 avatar Jan 02 '15 18:01 brjosue73

Use Cart::destroy();

zurez avatar Mar 31 '17 08:03 zurez