I'd like to initiate a discussion about further development with potential users of the module. I have ported the module to Drupal 7 and I have it ready on my computer but I haven't uploaded it to the repository yet because of the following questions that came up:
Unfortunately for us, Drupal has no direct callback to ask modules about selected shipment quotes, that would allow those modules to have a say whether they want to disable any method or not. In the D6 version and in my original port to D7, this problem was solved by introducing such a new callback. But for the callback to be actually called, other shipping quote modules (Fedex, USPS, European counterparts, whatever the admin has on the site), have to be patched to include this call.
Although this works on individual sites, it isn't the proper solution. Patching other contrib modules is not the Drupal way of solving things and cannot be relied upon. Theoretically, shipping quote module developers can catch on and include this hook in their modules but as the hook is not something mandated by Drupal itself, chances are pretty slim—also considering the seemingly low interest in this Ubercart Product Quote module—to expect that all other module developers will automatically include a callback in all existing and future modules.
Besides, during my work with the module, I realized there could be another angle of attack. What we want to accomplish with this module is already easily solvable using UC conditional actions. For each shipping method installed, the admin can add a CA that limits its availability to specific products or product classes. As CAs obviously have the proper callback mechanism in Ubercart, this solution works perfectly without patching anything.
This partly obviates the need for our module, although not entirely. It can be argued justly that the user interface provided by CA is clumsy for a simple task like this and works the other way around: instead of having an UI directly on the product edit page, to select shipments, one has to edit CAs of the specific shipments and keep them current when new products are added.
So, the question arises: which way should we follow? Leave the current patching, with all its consequences, or turn the module into a mere frontend for the UC CA system, so that it will be easier to administer but will essentially use conditional actions in the background, doing nothing on its own?