dotnet / eShop

A reference .NET application implementing an eCommerce site
MIT License
5.45k stars 1.61k forks source link

Add items to cart without logging in #27

Open JamesNK opened 10 months ago

JamesNK commented 10 months ago

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 commented 10 months ago

re: good first issue

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

ks1990cn commented 8 months ago

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?

sirmarvinc commented 1 month ago

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.