News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Simon's hacked UPS module

Started by Simon A., January 31, 2008, 19:34:49 PM

Previous topic - Next topic

Simon A.

Attached is a file which breaks out some of the UPS functionality in order to add extra flexibility.
use it something like this:

$ups = new ups();
ob_start ();    // suppress all output while fetching rates
$ups->populate_rates($order_weight, $source_zip, $country,
                        $postal_code, $tmparray);
ob_end_clean();            
foreach( $ups->shipment as $key => $value ) {                                 
   $serviceName = $value['ServiceName'];
   $cost = $value['TransportationCharges'];
        echo $serviceName.": ".$cost;
}

I've used this for two things:

1. showing approximate shipping charges before checkout
2. getting the shipping cost for Google Checkout's callback

It would be nice if all the other shipping modules could operate in a similar fashion.

(Note: I just got a message saying the upload folder was full, so I'll try to upload again later.)

Simon A.

Attached is the ups.php file

[attachment cleanup by admin]

outlawr1

Ok exactly how can I impliment this, also, on orders that I am recieving a 0.00 shipping charge how can I make it pull the cost form the ETA results beside it an populate the shipping charge with that....
Thomas Reddin
Extreme Gamerz Hosting
"Ride the the Event= $24
Nice Camo Gear= $600
BMP 50=$1250
Getting Pawned= SUCKS"