laravelshoppingcart icon indicating copy to clipboard operation
laravelshoppingcart copied to clipboard

Is it safe to use \Cart::session('cart') and \Cart::session('wishlist')

Open Scampicfx opened this issue 4 years ago • 0 comments

As the title says.

I'm wondering why the readme suggests to insert session_id() or user_id() into \Cart::session(->HERE<-). I worked with a very similar shopping cart system. There, it was usual to use \Cart::session('cart') and \Cart::session('wishlist'). Therefore, I'm wondering if I misunderstand anything vital here?

EDIT, to explain it a bit more detailed: I would like to know if there is any problem if two users (user A and user B) are shopping on the page simultaneously and the php code uses \Cart::session('cart') and \Cart::session('wishlist') in general? Do the shopping carts of both users collide?

Scampicfx avatar Aug 03 '20 17:08 Scampicfx