Adjusting Ubercart package weight I've got an e-shop for which I'm getting pretty accurate shipping rates from Australia Post eDRC (uc_auspost_2).

The problem is that sometimes I get overcharged because of the weight of the packaging material, envelope and a bunch of business cards I chuck into each package. On the other hand, I want to avoid overcharging customers by raising product weights.

Is it possible to automatically add say 200 grams to the weight of each package before requesting shipping rates? There is the Shipping rate markup configuration, but that only adjusts the rate after it has been received for a particular package weight.
There doesn't seem to be an "elegant" way to do this. All that Ubercart provides for shipping modules is a hook to register callback functions. The hard work of dividing products into individual packages is left on the modules. Which kind of makes sense, but also makes the system absolutely "unhookable".

Thus, to add an initial weight to each package, you would have to hack every shipping quote module and initialize each new package's weight before the individual products' weights are added up.

This is what I ended up doing with my UC Auspost module:

--- uc_auspost.module.orig      2011-08-15 08:59:46.000000000 +1000
+++ uc_auspost.module   2011-08-15 09:04:04.000000000 +1000
@@ -562,6 +562,7 @@ function _uc_auspost_package_products($p
           $addresses[++$last_key] = $address;
           $key = $last_key;
           $packages[$key][0] = new stdClass();
+          $packages[$key][0]-&gt;weight = 200;
         }
       }
       $packages[$key][0]-&gt;weight += $product-&gt;weight * $product-&gt;qty * uc_weight_conversion($product-&gt;weight_units, 'g');