> Hi again Isaac, you just hit the nail on the head, the query given is
> just 1 of hundreds in that CFC but the problem of the user deleting a
> category happen sometime back. Halloween products after the season
> had ended and a customer placed an order they should not. I put it
> down to a catching issue at the time. 

Ahh... seasonal items... yeah, that would make it more likely... but
although I would still recommend adding the var in that function, it
won't eliminate the race condition in that case. You'll still need to
check the item(s) individually when they're added to the cart and
probably again when the user reaches the checkout if you want to handle
all the possible race-condition scenarios with that. If the guy puts
something in his cart and is shopping around for a few minutes while the
item is removed from the inventory, then he'll still get to the checkout
with the item unless you do some kind of check and tell him "woops, this
was removed from the inventory". 

Although personally my preference would be not to remove anything from
the cart, like, unless they actually ran out of stock and needed to give
him a store credit or a refund, once it's in the cart, I would consider
it "set" until he checks out -- no price changes, etc. Because he agreed
to the price when he added it to the cart. If he agreed to 8 and then he
reaches the check out and it's 10 or 12 or whatever, he's  liable to be
unhappy about that and consider it "poor service". 

-- 
s. isaac dealey  ^  new epoch
 isn't it time for a change? 
     ph: 781.769.0723

http://onTap.riaforge.org/blog



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317296
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to