[ic] ups_cache

Steve Graham icdev at mrlock.com
Wed Sep 14 21:51:43 UTC 2011

I just added this one line into /lib/Vend/Ship/QueryUPS.pm

        if($Vend::Database{$ctable}) {
                $Vend::WriteDatabase{$ctable} = 1;
                CACHE: {
                        $db = dbref($ctable)
                                or last CACHE;
                        my $tname = $db->name();
                        $cache = 1;
+                      $weight = int($weight +1);
                        %cline = (
                                weight => $weight,
                                origin => $origin,
                                country => $country,
                                zip     => $zip,
                                shipmode => $opt->{service},

Is there a better place to do this. I think I must have lost this change on 
my last upgrade, but there should be a flag here to make it the default or 
Otherwise the ups_cache table fills with all sort of weight value 0.25, 0.15 
etc.... You can't assume everyone uses round numbers for small items....

Comments please?

From: "Steve Graham" <icdev at mrlock.com>
Sent: Wednesday, September 14, 2011 4:02 PM
To: <interchange-users at icdevgroup.org>
Subject: [ic] ups_cache

> I notice many unrounded entries in the ups_cache table.
> Did I miss an update, or a setting to round request up to the next pound?
> thanks,
> Steve
> _______________________________________________
> interchange-users mailing list
> interchange-users at icdevgroup.org
> http://www.icdevgroup.org/mailman/listinfo/interchange-users 

More information about the interchange-users mailing list