Guest Posted August 18, 2006 Share Posted August 18, 2006 Hi Mark, sorry for calling you out by name, but you have helped me out something rotten so far with this shipping contrib. I have created an overseas shipping module with 2 zones, first zone is for European Countries with all ISO codes listed, the second zone is a bucket zone, if not listed in Zone 1 it will be entered in Zone 2. The problem I have, is that since its an overseas shipping contrib, my country GB is always shown up in Zone 2. How would I go about excluding my country GB from being added to Zone 2. Here is the zones.php file if needed (zip file) Once again, really sorry for calling you out by name, I know how busy you are, the amount of time you spend helping out others is unreal. Thank you once again. Link to comment Share on other sites More sharing options...
Guest Posted August 18, 2006 Share Posted August 18, 2006 yes it's not going to work like this, you need to add some code in the constructor of the module to enable/disable the module based on zones. See how the usps is done. Once you have the code in you assign the zone to the shipping module. I use the active countries so I can make any combination I want for the various zones instantly. And the I would assign the tax zone to the module. This will work for either payment or shipping modules. Link to comment Share on other sites More sharing options...
Guest Posted August 18, 2006 Share Posted August 18, 2006 I tried this code and it seems to work // class constructor function airmail() { global $order; $this->code = 'airmail'; $this->title = MODULE_SHIPPING_AIRMAIL_TEXT_TITLE; $this->description = MODULE_SHIPPING_AIRMAIL_TEXT_DESCRIPTION; $this->sort_order = MODULE_SHIPPING_AIRMAIL_SORT_ORDER; $this->icon = DIR_WS_ICONS . 'shipping_airmail.gif'; // upload icon to catalog/images/icon directory $this->tax_class = MODULE_SHIPPING_AIRMAIL_TAX_CLASS; $this->enabled = ((MODULE_SHIPPING_AIRMAIL_STATUS == 'True') ? true : false); if ($order->delivery['country']['iso_code_2'] == 'GB') { $this->enabled = false; } Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.