[ic] multi items order form with different quantities

Ed LaFrance interchange-users@interchange.redhat.com
Mon May 6 09:58:00 2002


At 10:49 AM 5/6/2002 +0200, you wrote:
>Hello,
>
>I'm trying to do a - multi item order form - in the follow way:
>
>The client choose witch product he want to order by selecting the checkbox
>near each product.
>The items are deferent in the quantity of the items.
>In the first loop the quantity is a variable (usually it is a number bigger
>that 2).
>In the second loop the quantity is a constant (always 1).
>
>The problem is, when I reach the basket there is no connection between what
>was selected and what appear in the basket.
>All the products of the second loop appear with amount of 1.
>The product of the first loop appear with the right amount, but not always
>the right product.
>
>Here is an example of my code, if you have any idea to solve this one it
>will be grate.
>
><FORM NAME=orderform ACTION="[process-target]" METHOD=POST>
><INPUT TYPE=hidden NAME=mv_todo VALUE=refresh>
>
>[loop list="A1-40 K1-40 NO-40 R-36"]
><INPUT TYPE="checkbox" NAME="mv_order_quantity" VALUE="[scratch
>insurance_days]">
><INPUT TYPE=hidden NAME="mv_order_item" VALUE="[loop-code]">
>[/loop]
>
>[loop list="AD-LE AD-SP AD-HO AD-FL AD-AD"]
><INPUT TYPE="checkbox" NAME="mv_order_quantity" VALUE="1">>
><INPUT TYPE=hidden NAME="mv_order_item" VALUE="[loop-code]">
>[/loop]
>
><INPUT TYPE="SUBMIT" value="order" align="middle" size="10">
></FORM>
>
>Chen Naor
>Lilux Systems.
>http://www.lilux.co.il
>email: chen@lilux.co.il

I can imagine that the above form might cause trouble, particularly if you 
are going back and forth between it and the basket several times while 
testing. I would suggest that you follow the model for handling the 
ordering of multiple items in the foundation demo results page; it will 
probably do a better job of getting the quantities and items matched up.

- Ed L.


===============================================================
New Media E.M.S.               Software Solutions for Business
463 Main St., Suite D          eCommerce | Consulting | Hosting
Placerville, CA  95667         edl@newmediaems.com
(530) 622-9421                 http://www.newmediaems.com
(866) 519-4680 Toll-Free       (530) 622-9426 Fax
===============================================================