eShop icon indicating copy to clipboard operation
eShop copied to clipboard

Add items to cart without logging in

Open JamesNK opened this issue 9 months ago • 3 comments

Every online store I've used allows anonymously adding items to a shopping cart and then prompts for login during check out. Unusually, eshop requires logging in before adding items to the cart. I think the demo should follow the usual rules for websites.

Was this done for technical reasons? i.e. tracking cart items against an account, or to show off requiring auth in the cart APIs

JamesNK avatar Nov 01 '23 01:11 JamesNK

re: good first issue

I think there are technical and UI implications to making this change. It's probably not simple.

JamesNK avatar Nov 01 '23 02:11 JamesNK

Interesting, created a PR. My idea is to store cart into session before log-in. Then we can move that into user bucket when user logs-in.

Any suggestions on this idea?

ks1990cn avatar Jan 11 '24 08:01 ks1990cn

Interesting, created a PR. My idea is to store cart into session before log-in. Then we can move that into user bucket when user logs-in.

Any suggestions on this idea?

I think a browserDB would be a much cleaner way to keep the data for much longer, then clear this when there is login.

sirmarvinc avatar Jul 24 '24 10:07 sirmarvinc