[ic] multi items order form with different quantities

Mike Heins interchange-users@interchange.redhat.com
Mon May 6 09:52:01 2002


Quoting Chen Naor (chen@lilux.co.il):
> 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.

You can't use checkboxes in combination with quantities
without special provisions.

The problem is that a checkbox value is only submitted if it is
checked, so there is no way to coordinate which checkbox corresponds
to which item. This is intrinsic to how HTML forms work when
used with HTTP.

You can get around this with Javascript, Interchange perl, or
other methods.

If you just use the checkbox for the SKU, and rely on the fact
that the default quantity is one, that should work.

-- 
3005 Nichols Rd., Hamilton, OH  45013
phone +1.513.523.7621      <mike@valuemedia.com>

I don't want to get to the end of my life and find I have just
lived the length of it. I want to have lived the width of it as
well. -- Diane Ackerman