Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cart Issue : Items added to the cart while signed in will be refreshed when you sign out and then sign back in. #576

Open
kashinoki38 opened this issue May 1, 2024 · 1 comment

Comments

@kashinoki38
Copy link
Contributor

kashinoki38 commented May 1, 2024

Items added to the cart while signed in will be refreshed when you sign out and then sign back in.

Reproduce with the following steps:

  1. Sigin in the User
  2. Put some items in a cart
  3. Sign out User
  4. Sign in same User
  5. See the cart -> there is no items which was put on step2

Cause:

On the step3 (Sign out User), cart will be newly created as guest user. On the step4 newly created cart will be used for signed in user.

Ideal behavior:

On the step4,

  • If there are no items in guest cart and there are items in signed user cart, signed user cart will be used
  • If there are items in guest cart and there are items in signed user cart, pop up shown which asks which is used between guest cart and signed user cart
@TotalLag
Copy link

Commenting as this is an interesting issue I'd like to try taking on. The general concept of cart persistence and merging across guest and logged-in sessions is a common feature in modern e-commerce.

Issue:

We need to define and implement the expected behavior for the shopping cart when users interact with it across different states: as guests, logged-in users, and when transitioning between these states (e.g., adding items as a guest and then logging in, or logging out while having items in the cart).

Acceptance Criteria:

  1. Cart Merging Logic: Ensure that when a user logs in after using a guest cart, the items in both carts are merged, with quantity updates for duplicate items.
  2. Persistent Cart Across Devices: Investigate and potentially implement a feature to keep the cart synchronized across multiple devices and browsers when users log in or out.
  3. Guest Cart Expiry: Define how long guest carts should persist in case the session is inactive and how to handle cart expiry gracefully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

2 participants