snapjay / ngCart

Really simple shopping cart for AngularJS
http://ngcart.snapjay.com
380 stars 236 forks source link

User Specific Cart #51

Open mauliksoni opened 8 years ago

mauliksoni commented 8 years ago

When having an item in the cart on a different account, it is put into the cart on a newly created account.

1) Sign in into Account A 2) Add item into Cart A 3) Logout of Account A 4) Log into Account B 5) Cart B has item from Cart A

Q: Is there a way to associate either user session or id to the cart so next user log in to site from same computer does not see the cart content of previous user.

j-langlois commented 8 years ago

+1

j-langlois commented 8 years ago

To get over this limitation, I've included a global user object taken from the session deserialisation and altered the local storage key to reflect it