here's some critical feedback on the ratequote module, but also on the shipping API in general, and how it could work better. this is based on our experience implementing the shipping quotes feature for SCW, who have an existing set of options used by customers ordering through their catalog.
DISCLAIMER: the following patch is a one-off solution to the requirements of the client we built this site for! DO NOT apply this patch unless you understand how to subsequently modify the relevant code to apply to your site! Also note that the patch was rolled after the one above which adds percentage-based rates, so you may have to tweak it manually if you are not using that patch.
the ratequote module posted above did most of what we needed, except for the option of calculating percentage-based rates for certain ranges, and also offering multiple shipping options, including Rush/Overnight as well as different rates for Canada and International shipping addresses. The final thing we needed was integration with the discounts module.
to accomplish this, i added elements to the array of 'accessorials' provided by the module (see hook_shipping_method, one for each available shipping option. then in the "quote" callback, we determine which methods apply (based on the country of the delivery address), and return an array of quotes based on these.
the quotes themselves are all based on the table rates defined by the module, but all the "nonstandard" options have a fixed rate added to this (+$15 for Rush, +$30 for Overnight, +$12 for Canada, +$40 for Int'l). in the case of US-based shipping, customers are provided 3 different options, whereas Canada/International don't have rush/overnight options.
important to note here is that the new per-country functionality implemented in the alpha7c updates to the shipping methods API/UI was not so useful to us, since it did not allow us to define a group of countries as "other" for the International shipping rates (ie. anything that's not Canada/US). also, the geoshipping module looks promising, but didn't provide the core "table rate" functionality we needed from this module.
ideally, this would be accomplished in a more elegant/abstract way, so that the administrator could define the different 'accessorial' options, and their effect. at base, being able to add a fixed amount to the table rate would be good; being able to define different table rates per option would be better. also, the admin should be able to define "regions" and then map these different options onto them at the more fine-grained level, rather than at the level of the entire quote module.
finally, the attached patch adds a bit of code to calculate the shipping rate on the order total *after* discounts are applied. again, this is a specific requirement of the SCW site, and should probably be a configurable weight/ordering feature, if the discounts module is enabled. this bit of code was stolen from here, and seems to work nicely so far.
anyway, we hope this proves useful to somebody, and welcome feedback, especially in terms of alternative approaches or ways to integrate these ideas into ubercart/uc_ratequote going forward. i noticed as i was writing this that there's a new worldquotes module released which appears to do some of what we wanted here- the question still seems to be integrating the two (apparently) different methods in the way we've accomplished here. 
| Attachment | Size |
|---|---|
| uc_ratequote.ubercart.diff | 3.46 KB |

