[ic] Re: Syntax Question on Using Cart in UserTags (Perl)

interchange-users@icdevgroup.org interchange-users@icdevgroup.org
Fri Sep 27 12:33:57 2002


Kevin Walsh writes: 

> C.B. Currier [cbcurrier@spinrx.com] wrote:
>> 
>> Trying to do a loop through a cart inorder to do some SQL lookups.
>> Having a problem with the fact that I believe the cart is being passed in
>> but for what ever reason I cannot reference the array properly.
>> Any suggestions on the below mentioned code is greatly appreciated.
>> BTW: I am not necessarily getting an error, just not log string being
>> returned. 
>> 
>> C.B. 
>> 
>> Code: 
>> 
>> UserTag test_calc Routine <<EOF
>> sub {
>> 	my $itmcount = 0;
>> 	my $itmlst = "";
>> 	my $item = $Carts->{main};
>> 	foreach (@$item){
>> 		$itmcount++;
>>             $itmlst.= $item->{code};
>> 	}
>> return $itmlst;
>> }
>> EOF 
>> 
> Change this line: 
> 
>     my $item = $Carts->{main}; 
> 
> to this: 
> 
>     my $item = $::Carts->{main};

Nope. $Carts->{main} is fine, the code is silly. 

Bye
    Racke 


-- 
Prolific Interchange Consulting (Excellent German Quality !).
Take a look at Materialboerse (http://www.materialboerse.de/), WITT
(http://www.witt-weiden.de/), Boxmover (http://shop.boxmover.ch/) or
Passionshop (http://www.passionshop.com/racke). Need a shop ? Contact us.