[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Clear shopping cart?
Hey everybody...2 little questions:
1) Anybody have any code for clearing the shopping cart via a button or
similar? How would I go about that?
2) I was trying to write a Usertag to do #1, but I keep getting an error:
UserTag 'clear_cart' code is not a subroutine reference
In line 332 of the configuration file 'catalog.cfg':
UserTag clear_cart Routine <<EOR
Yet here is how it is in catalog.cfg:
UserTag clear_cart Order cart
UserTag clear_cart Routine <<EOR
sub {
my ($cart) = @_;
$cart = 'main' unless $cart;
my $counter = 0;
do {
splice @{$Carts->{$cart}}, $counter--, 1;
++$counter;
} until $counter > $#{$Carts->{$cart}};
return '';
}
Any help would be much appreciated!
Robert Smith
_______________________________________________
Interchange-users mailing list
Interchange-users@lists.akopia.com
http://lists.akopia.com/mailman/listinfo/interchange-users