Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date ][Interchange by thread ]

RE: [ic] Empty cart button



At 01:57 PM 7/20/2001 -0500, you wrote:
>Quoting Tim Mirecki
> >
> > I would like the user to be able to empty their cart.
> >
> > I checked on the developer site, and waded through a bunch of the archives
> > but couldn't seem to find a simple way to just empty the cart.
>
>This code is thanks to Ron Phipps and is from my personal archives:
>
>Here's the code I use to clear the cart, I have this on my basket page.
>
>[button
>        text="Clear Basket"
>             src="other/clear_basket.gif"
>        hidetext=1
>        form=basket
>       ]
>       mv_todo=cancel
>       mv_nextpage=index
>[/button]
>
>This should work for you.  The mv_todo=cancel should clear the cart and the
>mv_nextpage=index will bounce you to index.html.
>
>Good Luck!
>
>Curt Hauge

And if you want to do it in perl:

         @{$Carts->{$CGI->{mv_cartname} || 'main'}} = ();
         return;

HAND,

Dan Browning, Cyclone Computer Systems, danb@cyclonecomputers.com

_______________________________________________
Interchange-users mailing list
Interchange-users@lists.akopia.com
http://lists.akopia.com/mailman/listinfo/interchange-users


Search for: Match: Format: Sort by: