[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"
- To: MiniVend Users List <minivend-users@minivend.com>
- Subject: Can't locate object method "open_table" via package "Vend::Table::DB_File"
- From: Larry Leszczynski <larryl@furph.com>
- Date: Thu, 19 Aug 1999 10:39:26 -0400 (EDT)
- cc: Trevor Sky Garside <trevor@actaeon.net>
- In-Reply-To: <Pine.LNX.3.96.990818112814.32679A-100000@xaioyou>
- Organization: furph Inc. - ChargeNow.com
- Reply-To: Larry Leszczynski <larryl@furph.com>
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)