[thelist] Homemade Shopping Cart Question
Hassan Schroeder
hassan at webtuitive.com
Mon Nov 24 15:21:50 CST 2003
Rob Smith wrote:
> When a user "Adds an Item to their cart," you want to reserve that item and
> take it off the shelf so that no one else can put it in their cart. Each
> item is unique. To accomplish this feet, I have created a separate table
> (basket) that will hold their items to their customer id.
>
> My question is that when they return to browse other items, how can you hide
> the items that were stored in this temporary table.
? When the customer puts the unique item in their cart, remove it
from inventory, just as if it were sold. (You can use a 'quantity'
field for this, a 'status' field -- available, sale pending, sold --
or whatever seems appropriate.
Just make sure you return things to inventory if the session times
out and the cart gets discarded. :-)
(I'm working on just such a site right now, BTW.)
HTH!
--
Hassan Schroeder ----------------------------- hassan at webtuitive.com
Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com
dream. code.
More information about the thelist
mailing list