[ic] Getting at [item-list] "special tags" with perl
Grant
emailgrant at gmail.com
Wed Nov 10 14:56:09 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
Try using [calc][item-price][/calc] instead of the perl tag or [perl
interpolate="1"][item-price][/perl].
- Grant
More information about the interchange-users
mailing list