[ic] [delete-checked] and 5.2

Ed LaFrance (New Media E.M.S.) ic_users at newmediaems.com
Thu Oct 7 16:03:39 EDT 2004


At 12:31 PM 10/7/2004, you wrote:

>I'm using the delete-checked usertag, but it doesn't seem to work well
>when deleting more than one line-item from the cart at a time.  It
>only ends up deleting one and it leaves a strange blank-titled and
>$0.00-priced item in the cart.  The tag was originally written for 4.6
>but it says it should work in all future versions.
>
>The tag is very short, does anyone see any reason it might have
>problems like this in 5.2:
>
>-----
>UserTag delete-checked Order cart
>UserTag delete-checked PosNumber 1
>UserTag delete-checked addAttr
>UserTag delete-checked Routine <<EOF
>sub {
>     my $cart = shift || 'main';
>     my $opt = shift;
>     my $key;
>     my $counter = 0;
>     my $removed = 0;
>     foreach $key (keys %{ $CGI }) {
>         next unless $key =~ s/^\^\^DELETE_//;
>         do {
>             if ($Carts->{$cart}[$counter]{code} eq $key) {
>                 $removed++;
>                 splice @{$Carts->{$cart}}, $counter--, 1;
>             }
>             ++$counter;
>         } until $counter > $#{$Carts->{$cart}};
>     }
>}
>EOF
>-----
>
>Here's the original link to the tag:
>
>http://www.icdevgroup.org/pipermail/interchange-users/2001-April/007099.html
>

Did you set your basket code up according to the original post?

- Ed


===============================================================
New Media E.M.S.              Technology Solutions for Business
11630 Fair Oaks Blvd., #250   eCommerce | Consulting | Hosting
Fair Oaks, CA  95628          Ed.LaFrance at newmediaems.com
(916) 961-0446                http://www.newmediaems.com
(866) 519-4680 Toll-Free      (916) 961-0447 Fax
=============================================================== 



More information about the interchange-users mailing list