News:

Support the VirtueMart project and become a member

Main Menu

[SHIPPING MODULE] UPS - BugFix & Enhanced by deneb!

Started by deneb, May 02, 2006, 00:26:34 AM

Previous topic - Next topic

Simon A.

Is the checkout page not displaying when the weight is >100 pounds?

I think you can just change the area around 323 to read
if ($order_weight>100) {
$shipment[$i]["TransportationCharges"] = $shipment[$i]["TransportationCharges"]->getText();
}

mckayc

Genius.  Thanks Chroma.  I did not think to do an if statement there.  I changed it to "if ($order_weight<100)"

Thanks for the help.  I don't get the broken checkout page anymore, but I sill have a bit of a problem.  I have two shipping methods as of now.  The first is the standard shipping method (this will be used for all heavy items that UPS cannot ship).  The second method is UPS. 

Now when I go to the checkout page, it lists both methods for shipping. By default, it will go to shipping method 1 but it also lists the UPS shipping method (with each option now set for $0). 

Is there a way I can set it to something to the effect of

if ( $order_weight>100) {
use only shipping method one
}
else {
$shipment[$i]["TransportationCharges"] = $shipment[$i]["TransportationCharges"]->getText();
}

What would be the code for that.  I am totally clueless when it comes to arrays.

Simon A.

I guess I got the > and < mixed up, good catch.

Anyway, if you never want to use UPS for orders more than 100 pounds, just add the following to ups.php's list_rates:

if ($order_weight>100) {
return;
}

the rest of the list_rates function will then not execute and the UPS options won't display at all.

mckayc

Sweet beans!  It worked!  Thanks for the code chroma.

John


hi, i need some help here with this code, i have some products with shipping > 100 pounds is there away for the ups calculator to calculate all products > 100lbs as 90lbs? this is what i tried in ups.php:

         // BEGIN CUSTOM CODE - added by deneb
         if( $order_weight < 1 ) {
            $order_weight = 1;
         }
         // END CUSTOM CODE - added by deneb

         if( $order_weight > 150.00 ) {
            $order_weight = 90.00;
         }
but its not working every time i try to checkout with a product > 100lbs i get a broken checkout page.

VirtueMart 1.0.15



Thanks.

John


John

i have also tried the following code but still getting the same broken checkout page.

if ($order_weight>100) {
$shipment[$i]["TransportationCharges"] = $shipment[$i]["TransportationCharges"]->getText();
}

can i disable UPS calculator for orders > 100lbs and use the      Standard Shipping module with individual configured carriers and rates?

Thanks.