[ic] Use Checkboxes instead

Stefan Hornburg interchange-users@icdevgroup.org
Fri Jan 17 17:12:00 2003


On Fri, 17 Jan 2003 13:45:29 -0800
"Matthew Villa" <matt@1percent.com> wrote:

> 
> > It doesn't seem too difficult to me.  A checkbox either sends 
> > a value or it doesn't.  A checkbox that sends a qty of 1 
> > should do the trick.
> 
> It doesn't work with IC. Regardless if the form element is checked or
> not, its added the additional items to the cart.

Well, I did the following on the search results page of http://www.materialboerse.de/:

<FORM ACTION="[process-target secure=1]" METHOD=POST>
<INPUT TYPE=hidden NAME=mv_session_id VALUE="[data session id]">
<INPUT TYPE=hidden NAME=mv_todo VALUE=refresh>
<input type=hidden name=mv_click value=addtobasket>

For any product a checkbox:

<input type=checkbox name=mv_order_item value=[item-code]>

The mv_click code:

[set addtobasket]
[perl table=component]
$CGI->{mv_order_quantity} = join ("\0", map{$Tag->field('count', $_)} @{$CGI_array->{mv_order_item}});
[/perl]
[/set]

Bye
       Racke