[ic] ups-query problem.

Gert van der Spoel gert at 3edge.com
Sun Aug 16 13:51:38 UTC 2009


> -----Original Message-----
> From: interchange-users-bounces at icdevgroup.org [mailto:interchange-
> users-bounces at icdevgroup.org] On Behalf Of Rick Bragg
> Sent: Sunday, August 16, 2009 4:13 PM
> To: interchange-users at icdevgroup.org
> Subject: Re: [ic] ups-query problem.
> 
> On Fri, 2009-08-14 at 12:57 -0500, Steve Graham wrote:
> > > Hi,
> > >
> > > I have the following ups-query tag:
> > >
> > > [ups-query
> > >    weight=5
> > >    origin=05404
> > >    zip=90210
> > >    country=US
> > >    mode=GNDRES
> > > ]
> > >
> > > This returns $10.29.
> > >
> > > However, when I look up the same on the UPS website, I get the
> > > following:
> > >
> > > UPS Ground:      13.56 USD
> > > Fuel Surcharge:   0.47  USD
> > > Total:           14.03 USD
> > >
> > > Seems the farther the distance, and faster the method I use, the
> bigger
> > > the spread, ouch!  Creating code to try do compensate for this is
> just a
> > > bad idea.  It will pretty much never be right.
> > >
> > > This has actually been a long time problem as far as I can tell,
> but I
> > > never really needed to use this until now.
> > >
> > > Is ups-query no longer used? What is going on with this?  Anybody?
> > >
> > > Thanks
> > > Rick
> > >
> >
> >
> > Did you look in the ups_cache table to see If there are old values
> stored?
> >
> > Steve
> 
> 
> Hi,
> 
> I just emptied the ups_cache table, and it created the following new
> row
> again with $10.29.
> 
> code 	weight 	origin 	zip 	country 	shipmode 	cost
> 	updated
> 1 	5 	05404 	90210 	US 	GNDRES 	10.29
> 	1250427373
> 
> 
> Checking again at the UPS website today with their on-line calculator,
> I
> get the following price for the same Ground Residential shipment:
> 
> UPS Ground   	 13.56 USD
> Fuel Surcharge
> 	0.47  USD
> Charges Per Package 	14.03 USD
> Shipment Total: 	14.03 USD
> 
> 
> Is this happening to anyone else?
> Any ideas?

Idea the same as before, chewing it out a bit further. [ups-query] uses
Business::UPS to do the query.
So, as mentioned before, try it out without Interchange, using the module
itself:

#!/your/path/to/perl

use Business::UPS;

my ($shipping,$ups_zone,$error) = getUPS(qw/GNDRES 05404 90210 5/);
$error and die "ERROR: $error\n";
print "Shipping is \$$shipping\n";
print "UPS Zone is $ups_zone\n";

~# ./test.pl
Shipping is $10.29
UPS Zone is 008

So from the looks of it Business::UPS does not return the correct data ...
In that case you probably need to talk to the person who is responsible for
this module:
http://search.cpan.org/~msolomon/Business-UPS-1.13/UPS.pm

Considering the latest release is 6 years old there are chances this is not
anymore working as it should.

Perhaps there are other Interchange people who actually use [ups-query] tag
and if you are awfully lucky they might reply how they have solved it... Or
if you are even luckier there is someone who has a better solution for this.

This is all I can tell from available data.

CU,

Gert




More information about the interchange-users mailing list