[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SOLVED! Re: [ic] User tag on CommonAdjust producing an error message


Dan Browning wrote:

At 10:07 PM 8/29/2002 -0700, you wrote:

Dan Browning wrote:

At 06:25 PM 8/29/2002 -0700, you wrote:

Below is the current CommonAdjust and yet the error I'm receiving that immediately follows makes no sense to me when considering that the tag is working fine on the CommonAdjust.

CommonAdjust "&$Tag->tier_pricing( $item->{code}, $item->{quantity} )" ;:price

w2k.mmaz.com IQf3PB7m:192.168.10.10 - [29/August/2002:20:25:26 -0400] mmb2c /cgi-bin/mmb2c/ATT-0290-03-SMA-02.html Safe: Can't locate object method "query" via package "Vend::Table::GDBM" (perhaps you forgot to load "Vend::Table::GDBM"?) at
/ibin/interchange/lib/Vend/Interpolate.pm line 5235.
>
> $Tag->tier_pricing( $item->{code}, $item->{quantity} )
>

Though the page is working, it will pollute my error log with tons of messages and I'd like to fix or stop that... Any ideas?

Barry



This may not be your problem, but any functions that you call that use the database (perhaps 'products' and 'options' in your case) require that you first specify the database ala:

[perl tables="products options"]


Good evening Dan.

Thanks for writing. In this case, the CommonAdjust is using a usertag for the determination of the proper pricing, of which in that usertag a call to query does occur. Perhaps I'm dense, or that it is just late, but I do not see how I can meld your recommendation into that setup...


Ah, yes; that'll teach me to actually read the e-mail next time. :-) Try a different usertag that does absolutely nothing and see if it still logs the error. If it doesn't, then you could proceed to find which part of your usertag is triggering the error.

I sub'd the tier_pricing tag with a iclog tag that basically writes all of the passed parameters to a log file and the log file captured the details and no errors were recorded in the catalog error.log.

I proceeded to take the original tier_pricing tag and commented out the actual query call which was in fact the problem.  Thank God for the mailing archives, I found a code snippet by Kevin Walsh that utilized the db->query version of the DB access which appears to work just find and no errors...

Can someone that is more IC/Perl savvy explain why the $Tag->query would not work but the $db->query would?

Barry


--

Barry Treahy, Jr * Midwest Microwave * Vice President & CIO
E-mail: suppressed * Phone: 480/314-1320 * FAX: 480/661-7028



_______________________________________________
interchange-users mailing list
suppressed
http://www.icdevgroup.org/mailman/listinfo/interchange-users


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.