[ic] Getting at [item-list] "special tags" with perl

Brian Kaney brian at vermonster.com
Wed Nov 10 14:22:22 EST 2004


Hello,

I've looked for a few days and can't find an answer to this one and hope
someone could help.

Can I get at special tags like [quantity-name] and [item-price] when
manually looping around perl blocks?  Or does "interpreted only inside
their corresponding list container" mean I can't get at them directly?


I though it would be something like this, but was wrong:

[perl]
foreach my $item (@{$Items})
{
   $item->{'quantity-name'};
}
[/perl]


In fact, I did this and found it was basically the same information
found under the 'Carts' section of a [dump].

[perl]
my $ret;
foreach my $item (@{$Items})
{
   foreach my $attribute (keys %{$item})
   {
      $ret .= $attribute ." => ".$item->{$key}."\n";
   }
}
return $ret;
[/perl]


Thanks in advance!

- Brian






More information about the interchange-users mailing list