[ic] using the perl api for ord/basket

Mike Heins mikeh@minivend.com
Mon, 30 Apr 2001 04:52:29 -0400


Quoting Doug Alcorn (doug@lathi.net):
> for various reasons i'm trying to redo the ord/basket using mvasp
> instead of iml.  However, i'm having some fundamental problems
> accessing some of the data.  basically I have a block that looks like
> this:
> 
> [mvasp]
> <%
>   foreach my $item (@{$Items}) {
>     my $itemcode = $item->{code};
>     my $table = $item->{mv_ib};
>     my $itemdesc = $Tag->data({table=>$table, field=>'description', key=>$itemcode});
>     # my $itemdesc = $Tag->description({code=>$itemcode});
>     my $price = $Tag->data({table=>$table, field=>'price', $key=>$itemcode});
>     HTML "$itemcode, $table, $itemdesc, $price<br>";
>   }
> %>
> [/mvasp]
> 
> I can get out the correct $itemcode and $table with this.  I just
> can't seem to get the $itemdesc and $price.  I must be missing
> something simple.  It's way too late in this coding session for me to
> see it.

Perhaps

	[mvasp tables="products pricing"]

would help.

-- 
Red Hat, Inc., 131 Willow Lane, Floor 2, Oxford, OH  45056
phone +1.513.523.7621 fax 7501 <mheins@redhat.com>

"Even if you're on the right track, you'll get run over if you just
sit there." -- Will Rogers