On Feb 12, 6:29 am, "wolfv" <[email protected]> wrote:
> My application allows each user to checkout one item at a time. This is
> enforced via session.item_ID, which can hold only one item at a time. Is
> a way a session can access item_ID of all other concurrent sessions?
> Then I could make sure that a user doesn?t checkout an item that a different
> user has
> already checked out.
Are you sure that you want to do it like that?
Consider the fact that the session is active by default for about 20
mins AFTER the visitor lost interest and maybe wondered off to another
site. Do you want to limit other visitors in their choice?
More common approach is to alert the visitor to the fact that there is
only one (or maybe only few very popular) item(s) left and that they
have to be quick if they want to make sure that they get it - the
checkout works on first come - first served basis.
I.e. you update item count ONLY when the item is ORDERED (paid for),
until then as many visitors can put the item in their shopping cart.
Another thing: it is more common to allow multiple items in the