Ok. Tried to figure this out on my own, but it seems this is beyond my understanding...
First the problem:
To begin with, my client needs to be able to allow UPS shipping for the US, Canada and a handful of other countries. If a person from a country outside of this list orders from the site, then I need it to prevent the UPS module from loading (even in UPS does ship to that country) and only allow the Flat Rate module to appear.
So far I've figured out how to use the order's delivery information to tell if the country is in my list, and I've created the if statement to check the country name/code. However, the problem I'm running into is where exactly to place this code to solve said problem.
I saw this bit of code in checkout_shipping.php:
// load all enabled shipping modules
require(DIR_WS_CLASSES . 'shipping.php');
$shipping_modules = new shipping;
That lead me to the shipping.php class. Though, I'm only 60% certain that the code I need to modify is in there.
I know Zone based shipping would solve the problem, but I need the real-time rates from UPS if that module is allowed to be quoted. So, in effect, I need a combination of the Zone and UPS modules for the shipping options to display correctly.
Whew - a lot, I know. But, anyone have any ideas or advice on the direction to head in. I'm really just having a problem deciphering where exactly all the module information gets routed before it's spit out on checkout_shipping.php.