arbeit Posted April 28, 2004 Share Posted April 28, 2004 (edited) 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. Edited April 28, 2004 by arbeit Quote Link to comment Share on other sites More sharing options...
arbeit Posted April 28, 2004 Author Share Posted April 28, 2004 (edited) Ok, so I made another discovery... I know the installed modules are contained within this: MODULE_SHIPPING_INSTALLED I figured, by using this information, some where in the the shipping function in the shipping.php class is where I need to alter the code, but I'm a bit hesitant to mess with it without some guidance from osC elders. I'm still coming up (???)... :huh: Edited April 28, 2004 by arbeit Quote Link to comment Share on other sites More sharing options...
arbeit Posted April 28, 2004 Author Share Posted April 28, 2004 And for the second reply to my own post: Looks like I need to alter quote() in the shipping class... // get all available shipping quotes $quotes = $shipping_modules->quote(); Does anyone know where the shipping() function in the shipping class actually gets used? That might clue me in on something I haven't realized yet as well. Don't need a definitive answer, y'all. Just need some help with the class/object stuff going on in the checkout_shipping.php page. Thanks in advance... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.