[thelist] Re: Homemade Shopping Cart Question

Kevin Martin evolt at brasscannon.net
Tue Nov 25 08:39:40 CST 2003

Hassan Schroeder <hassan at webtuitive.com> writes:
> ? 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.)

I'll show you mine if you show me yours.  :-)

My build-a-webstore page talks about taking stuff off the shelf
and putting it back in some detail -- dig into the walk-through
at http://simpleshop.org/

My long-term goal with SimpleShoPHP is to shame the Interchange
and PHPShop people into documenting their cra^W stuff in a way
that is usable by mere mortals.  If they can't or won't, I think
it's high time they lose all their users, dry up and blow away.
(Bitter?  Angry?  Moi?!)  The code is laughable by evolt standards,
I'm sure, but the assumption is anyone who picks it up will want
it customized and extended, so the less they have to undo the

And later (yes, I'm on digest; how did you guess?):

> My shopping cart implements `HttpSessionBindingListener`, so if the
> transaction isn't completed before the standard session timeout, all
> products are returned to inventory as part of discarding the cart.
> But the `availability` is also explicitly marked as being sold if
> a credit card transaction takes place successfully. :-)
> All this, obviously, is done through a single inventory table, not
> temporary tables (which don't work with connection pooling).

Coooooo-ooool.  :-)

More information about the thelist mailing list