[ic] Re: Problems using an image for "remove" in the cart component

Eros Shop info at eros-shop.co.uk
Mon May 24 14:13:15 EDT 2004


At 10:19 24/05/2004, you wrote:
>><INPUT TYPE=checkbox NAME="[quantity-name]"
>>onClick="this.form.action='[process-target]', this.form.submit()"
>>VALUE=0>
>>
>>I've tried using a variant of the above, by changing the TYPE to image
>>and
>>adding a SRC element and nothing useful happens when the image is
>>clicked,
>>the cart/checkout simply refreshes with nothing removed.
>
>This won't work - you need a chunk of perl code to remove the item, see
>here for a solution
>
>http://www.icdevgroup.org/pipermail/interchange-users/2000-September/ 
>000547.html
>
>This also works if you want to use a text link to remove the item.
>
>James
>
>_______________________________________________
>interchange-users mailing list
>interchange-users at icdevgroup.org
>http://www.icdevgroup.org/mailman/listinfo/interchange-users


Erm, thanks James (I think),

I assume I hack the code from that URL down as follows?

[perl interpolate=1]
$i = 0; @qs = ();
for (@$Items) {
     if ($i == '[item-increment]' - 1) {
         push (@qs, 'quantity' . $i++ . '=0');
     } else {
            push (@qs, 'quantity' . $i++ . '=' . $_->{quantity});
     }
}
$Scratch->{qlist} = join ("\n", @qs); '';
[/perl]
<a href="[area form="
mv_action=order
mv_doit=refresh
mv_nextpage=[scratch index]
[scratch qlist]
"]" target="_top"><img src="images/button_delete.gif" border=0 width="41" 
height="44"></a>

Many thanks

Mark



Eros Shop
vwe internet ltd
PO BOX 1067
SLOUGH
SL1 7YA
UK

Shop - http://www.eros-shop.co.uk
EMail - info at eros-shop.co.uk
Tel - 0870 284 3369
Fax - 0870 284 4469




More information about the interchange-users mailing list