On 2/8/01, James McCullough penned:
>I am wondering how to get around this problem. When I add an item to a
>shopping cart, the correct number of items is added.
>However, when the refresh button is hit, the items are added again with each
>refresh button. This happens with Able Commerce carts as well.
>How would you get around this?

I wrote mine so every time you add to or update the quantities in the 
cart, it loops through the existing products in the cart (if there 
are any), and creating a temporary cart by adding each one again as 
long as it doesn't match the product_ID, size, style and color of the 
item you are adding or updating (just checking those variables 
against the form variables). Then after the loop, it adds the item 
you are submitting. Then it replaces the existing cart with the 
temporary one you just created. Let's you put items of different 
colors, sizes etc. in the cart, but won't put 2 identical items in 
more than once.
-- 

Bud Schneehagen - Tropical Web Creations

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
ColdFusion Solutions / eCommerce Development
[EMAIL PROTECTED]
http://www.twcreations.com/
954.721.3452

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to