View Single Post
  #14  
Old 03-24-2005, 11:24 PM
 
PremiumPonyParts PremiumPonyParts is offline
 

Senior Member
  
Join Date: Dec 2004
Posts: 114
 

Default

IMO, this mod is greate. But shouldnt be used on any live site until it calculates if it does indeed need to use the over 150 weight limit mod. Otherwise, it can bump up your shipping cost 100%. I tested an order that i shipped. It shipped at $14 for a 2 lb package (2 lbs items in the same box). This mod, made it two 1lb packages, so it was like $26 to ship. Thats outragoues. That was for UPS 3 day. For regular ground it went up about $5. For me, my shipping prices are already high because of my suppliers dropship and minimum order charges, so I need to keep shipping down.

If you dont mind the extra bumps in shipping, use it. Works great and is the only alternative out there.


Here is a soultion.
Code:
//<? //only in here to make code look nicer in php editor..doesn't affect anything global $cart; $upsmxwt = "150"; if ($UPS_weight >= $upsmxwt) { foreach($cart['products'] as $prodKey => $prodArray) { for( $quantity=0; $quantity<$prodArray['amount'];$quantity++) { $UPS_weight = $prodArray['weight']; $query .=<<<EOT <Package> <PackagingType> <Code>$packaging_type</Code> </PackagingType> <PackageWeight> <UnitOfMeasurement> <Code>$UPS_wunit</Code> </UnitOfMeasurement> <Weight>$UPS_weight</Weight> </PackageWeight> $dimensions_query $pkgparams </Package> EOT; } } } else { $query .=<<<EOT <Package> <PackagingType> <Code>$packaging_type</Code> </PackagingType> <PackageWeight> <UnitOfMeasurement> <Code>$UPS_wunit</Code> </UnitOfMeasurement> <Weight>$UPS_weight</Weight> </PackageWeight> $dimensions_query $pkgparams </Package> EOT; } $query .=<<<EOT </Shipment> </RatingServiceSelectionRequest>

It works good for unders under 150 pounds. But once over, it does it by individual boxes once again. Hope it helps someone. Thanks to Nick for the beginning code.
__________________
Version 4.0.8
Reply With Quote