MiniVend Akopia Services

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

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



Hi Trevor -

> 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.


Larry Leszczynski
larryl@furph.com
--
  furph, Inc.	WWW/Unix/Windows Solutions	734-513-7763 (voice)
info@furph.com	   http://www.furph.com		734-513-7759 (FAX)



Search for: Match: Format: Sort by: