[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [mv] Need more shipping help
****** message to minivend-users from "Christopher P. Lindsey" <lindsey@mallorn.com> ******
> > foreach $item (@{$Safe{items}}) {
> > if ($item->{shipping_id} == 0) {
> > $total += $item->{price};
> > }
> > }
>
> Are you sure that wouldn't be $Safe{'items'} ?
Yes, although both work/don't work equally well. :) It looks like
only quantity and code, and other modifiers can be accessed from
here. This leaves out price, etc.
If I just do
$total+= $item->{quantity};
in the middle of the foreach loop I get back the equivalent of @@TOTAL@@.
So now I'm trying to access the database from within the foreach loop
using tag_data:
foreach $item (@{$Safe{'items'}}) {
$total = tag_data("products","price",$item->{'code'});
}
Unfortunately, I now get the error
> xxxxxxx.mallorn.com xxxxxxxx:mallorn.com - [03/January/2000:23:36:43 -0600] catalog /cgi-bin/catalog/process Safe: Can't locate object method "TIEHASH" via pack age "DBI::st" at /usr/lib/perl5/site_perl/DBI.pm line 653.
>
> ()
I've adding
require Tie::Hash;
to the top of my sub, but of course Safe doesn't like it. :)
Argh! (sorry, had to do it)
Chris
-
To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list