Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6039067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T06:18:50+00:00 2026-05-23T06:18:50+00:00

I designed a shopping cart solution for a client. For one of their items

  • 0

I designed a shopping cart solution for a client. For one of their items (candy, for example), they have a certain quantity they can sell for each type. I deduct from the quantity available after items have been purchased.

The candy shopping flow is as follow:

  1. Select (add to cart) candy on candy catalog page
  2. Go to Cart page to review items to be purchased
  3. Go to checkout page (billing information + list of items to be purchased with price total details)

Pertinent Situation:
Customer A select 9 of the remaining 10 Snickers. Customer B selects 5 of the remaining 10 Snickers. At checkout, Customer B submits his payment information (leaving 5 snickers left) before Customer A, who bought 9 Snickers.

Now, Customer A will be left with a message on the checkout page about what happened (i.e. – Oops.. yur candiez r all gone!), including a list of which candy is sold out, or less available. Here, I am unsure as to where the flow should continue (hoping this was even a good path to begin with).

Should the customer be given a link back to their shopping cart where the items they selected are unchanged, and be left for them to remove and continue purchasing? Or, should these items reflect the new quantities available for each item, such that since Customer A bought 9 Snickers, the cart will show Customer A added 5 Snickers (of the remaining 5)? Or, should these items be removed from the cart altogether?

Another solution (as suggested by Andreas Niedermair and E. Rodriguez): Deduct inventory as customers add items to their shopping cart.

If this were my implementation, at what point/how would I add items back into the inventory if the customer leaves the site? My cart is not DB driven.

Any feedback would be great, and I will be happy to clarify.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T06:18:51+00:00Added an answer on May 23, 2026 at 6:18 am

    If it were me I would introduce an intermediate state where the candiez are considered “sold” at the moment a quantity is selected. Depending on other cart features (“save ur candiez for laterz”, for example) you might want to reallocate them back to the available inventory pool after a certain amount of time… but I believe that the moment the customer wants them, as in a store, if they put them in their cart (even without buying them) then the next customer only sees what is available.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have designed a shopping cart that allows both login and non-login users to
I've built some shopping cart systems in the past, but I always designed them
I have designed a store using PayPal Express Checkout. They have recently decided that
I have a view designed like that: Ext.define('MY.view.NotificationMails', { extend: 'Ext.grid.Panel', alias: 'widget.NotificationMailsPanel', id:
I have designed a site and my CSS is not loading in FF and
I have designed a menu that consists of a few buttons in several different
I have a long-lived server application that is designed to run with minimal downtime
I designed a website for a client, and built it for them. It's almost
I designed a table with one field of type char(10). I then I input
I have designed a windows service in C#, which runs continiously and spawns three

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.