MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: Can't locate object method "open_table" via package "Vend::Table::DB_File"



On Thu, 19 Aug 1999, Larry Leszczynski wrote:
> > Safe: Can't locate object method "open_table" via package
> > "Vend::Table::DB_File" at
> > /home/sites/home/users/tgarside/mvend/lib/Vend/Data.pm line 933.
> 
> > [perl arg="carts" interpolate="1"]
> > my $output_string = "";
> > 
> > foreach $item ( @{$Safe{'carts'}->{'main'}} ) {
> >    my $base = $item->{'mv_ib'};
> >    my $code = $item->{'code'};
> >    my $order_quantity = $item->{'quantity'};
> > #   my $available_quantity = tag_data('inventory', 'inv', $code);
> >    my $desc = tag_data($base, 'description', $code);
> >    my $price = tag_data($base, 'price', $code);
> 
> > Though I'm not sure, I seem to recall having those two working before, and
> > it just randomly stoppped.
> 
> The error is from the tag_data() calls in your perl code - the database
> reference has not been initialized yet.  If a MiniVend tag that references
> your database is used previously on the page (before your perl code), the
> problem will disappear.  Maybe you had one and took it out. 
> 
> You need to put this line before your perl code:
>    [tag touch products][/tag]
> 
> >From the docs:
>    Touches a database to allow use of the tag_data() routine in
>    user-defined subroutines. If this is not done, the routine will error
>    out if the database has not previously been accessed on the page.

Thanks a million.  Now that you mention it, I remember seeing this
somewhere -- the docs are extremely difficult to find things in...

--Trevor

---
Trevor Garside
Actaeon West, Inc.
trevor@actaeon.net



Search for: Match: Format: Sort by: