[ic] multi items order form with different quantities

Chen Naor interchange-users@interchange.redhat.com
Mon May 6 03:37:02 2002


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