Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Imagine the scenario, someone adds an item to a cart and then proceeds to check out. On the very rare occasion that the price in the DB is updated before they have reached the end of their checkout process, what should happen? I see it happening one of two ways:

  1. At some point (probably on the confirm order page) they will notice the price has changed. I would save the price around this stage because I would also save an order to the DB (status- Pending). This is slightly undesirable as it may cause confusion to the customer why their order is more than they expected.

  2. When they add the item to the cart I actually save the price then so that if they continue without ever removing it from the cart they will get it at the price listed for. The problem I see here is if there was a sale or something similar then the item in the cart could be left at a cheaper price for a long time (I'm happy for items to sit in the cart for a while as it means they may one day be bought).

Any suggestions/real world examples?

share|improve this question
    
Basket content (item id, title, quantity and price) should be stored in session (server side, of course). Session can be stored in file (traditional approach), RAM, DB or whatever. You can make session valid for 1 hour (or any other interval) since last basket activity and re-fetch current price if necessary. P.S. In my place we do honour price for 24 hours regardless of price changes (and if we are unable to supply that item at that price we simply communicate with customer explaining the reasons; making full refunds/charging extra if necessary -- we are fine with that as it's very rare). –  LazyOne Sep 6 '13 at 15:46
    
That's interesting about the session info, I was thinking that I would need to encode the cookie if I chose to go down that route. I wasn't planning on having a basket DB table but maybe I will need to so I can retrieve customers baskets over longer periods of time. OK so you've gone with option 2 if only for a limited time. I'm less worried about long time returns (eg. hours) I'm more worried about the price changing in a 10 minute window. –  Chris Nicholson Sep 6 '13 at 15:54

1 Answer 1

Amazon warns the user if the price was changed since the product was added to the cart. In a box with yellow background above the cart (see screenshot ↓) there is a list containing all products whose price was changed, giving the old and the new price. They also note that the product prices in the cart always correspond to the current prices on the product page, no matter when the product was added to the cart.

Here’s a screenshot from amazon.de (Einkaufswagen = Cart):

amazon.de: Wichtige Nachrichten zu Artikeln in Ihrem Einkaufswagen


You might also be interested in these questions on ux.stackexchange.com:

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.