Well, yeah.

The most basic approach is like this:

1) on your form, make a text box for each product, and name the text field
quantity_XXX, where XXX is the product ID;

2) on your form-handler, loop through all of the form fields.  If fieldName
is of the form "quantity_XXX", and the value of the field [evaluate("form."
& fieldName)] is greater than 0, then process that product.

3) wrap the entire form-handler in a CFTRANSACTION.

That works fine.  You can do nicer things with JavaScript and possibly
multi-row Select boxes to accumulate your total order before submitting, but
that's another large step up in complexity.

Let us know how you go,
Lee (Bjork) Borkman
http://bjork.net ColdFusion Tags by Bjork


-----Original Message-----
From: JayB [mailto:[EMAIL PROTECTED]]

....

One of the things I really like about our current cgi shopping cart system 
is that a customer can add multiple items to the cart from one page with a 
single click of the add to basket button.
....

I haven't looked into it yet but I thought I'd ask first...can CF do this 
kind of thing?



IMPORTANT NOTICE:
This e-mail and any attachment to it is intended only to be read or used by
the named addressee.  It is confidential and may contain legally privileged
information.  No confidentiality or privilege is waived or lost by any
mistaken transmission to you.  If you receive this e-mail in error, please
immediately delete it from your system and notify the sender.  You must not
disclose, copy or use any part of this e-mail if you are not the intended
recipient.  The RTA is not responsible for any unauthorised alterations to
this e-mail or attachment to it.  

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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