Skip to content
Preptima
mediumScenarioDesignMidSenior

A shopper adds items on their phone while logged out, then signs in on a laptop where they already had a cart. What should happen?

4 min readUpdated 2026-08-15

Answer

Short answer

You have two carts and no rule that is right for every case, so the merge has to be a deliberate product decision rather than whichever write lands last. Prices and stock have both moved since the older cart was created, which is the part that turns a session problem into a correctness one.

Was this answer helpful?

Likely follow-ups

  • The price of an item in the old cart has gone up. What do you charge?
  • Both carts contain the same product with different quantities. What is the result?
  • How long should an anonymous cart live?
  • Where is the cart stored, and does that change your answer?

Related questions

Related Topics