cannon_eer17 Posted April 26, 2006 Posted April 26, 2006 When using the zone shipping module, Is it possible to have more than 1 zone, and to have a shipping table for each of these zones? How do I add more zones? Quote
smithveg Posted April 30, 2006 Posted April 30, 2006 When using the zone shipping module,Is it possible to have more than 1 zone, and to have a shipping table for each of these zones? How do I add more zones? yeah...i also wan to do this...but don't know... seems nobody reply to help you... hehe... i dun't know what you wan to achiece... i jus know a little bit... for me... i have Zone A, B, C , D, E, F, G, H how could i set the Zone Rates to have different calculation for different zone? somebody need such things?...somebody know such things? thank your help... smith Quote **** Hello World! ^.^ I'm a Internet naive. Browse my working profile Malaysia Web Services - OPerion Website Marketing System
dittones Posted April 30, 2006 Posted April 30, 2006 Dear Cannon eer17, The quickest and easiest way to do this is making copies of zone.php to zone_1.php, zone_2.php, zone_3.php and so on for the number of zones that you want... This is the first step...next you must rename the zone reference in the program to the zone_?? accordingly...last and rename these variables so they are different from each other. $this->code = 'zones_1'; $this->title = MODULE_SHIPPING_ZONES_TEXT_TITLE_1; $this->description = MODULE_SHIPPING_ZONES_TEXT_DESCRIPTION_1; $this->sort_order = MODULE_SHIPPING_ZONES_SORT_ORDER_1; $this->icon = ''; $this->tax_class = MODULE_SHIPPING_ZONES_TAX_CLASS_1; $this->enabled = ((MODULE_SHIPPING_ZONES_STATUS_1 == 'True') ? true : false); change all occurances of these in the program. I hope this helps, dittone.com Roman Quote
Maggilove Posted April 30, 2006 Posted April 30, 2006 Look in the contributions section... there are several multi zone modules :) Quote
feinhorn Posted August 29, 2006 Posted August 29, 2006 (edited) Look in the contributions section... there are several multi zone modules :) Hi everyone I installed a contribution today to do this... but when the price gived by the zone shipping is not the one that corresponds to that weight... Please review this code! <?php /* $Id: table.php,v 1.27 2003/02/05 22:41:52 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ class table10 { var $code, $title, $description, $icon, $enabled; // class constructor function table10() { global $order; $this->code = 'table10'; $this->title = MODULE_SHIPPING_TABLE10_TEXT_TITLE; $this->description = MODULE_SHIPPING_TABLE10_TEXT_DESCRIPTION; $this->sort_order = MODULE_SHIPPING_TABLE10_SORT_ORDER; $this->icon = ''; $this->tax_class = MODULE_SHIPPING_TABLE10_TAX_CLASS; $this->enabled = ((MODULE_SHIPPING_TABLE10_STATUS == 'True') ? true : false); if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_TABLE10_ZONE > 0) ) { $check_flag = false; $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_TABLE10_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id"); while ($check = tep_db_fetch_array($check_query)) { if ($check['zone_id'] < 1) { $check_flag = true; break; } elseif ($check['zone_id'] == $order->delivery['zone_id']) { $check_flag = true; break; } } if ($check_flag == false) { $this->enabled = false; } } } // class methods function quote($method = '') { global $order, $cart, $shipping_weight, $shipping_num_boxes; if (MODULE_SHIPPING_TABLE10_MODE == 'price') { $order_total = $cart->show_total(); } else { $order_total = $shipping_weight; } $table_cost = split("[:,]" , MODULE_SHIPPING_TABLE10_COST); $size = sizeof($table_cost); for ($i=0, $n=$size; $i<$n; $i+=2) { if ($order_total <= $table_cost[$i]) { $shipping = $table_cost[$i+1]; break; } } if (MODULE_SHIPPING_TABLE10_MODE == 'weight') { $shipping = $shipping * $shipping_num_boxes; } $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_TABLE10_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => MODULE_SHIPPING_TABLE10_TEXT_WAY, 'cost' => $shipping + MODULE_SHIPPING_TABLE10_HANDLING))); if ($this->tax_class > 0) { $this->quotes['tax'] = tep_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']); } if (tep_not_null($this->icon)) $this->quotes['icon'] = tep_image($this->icon, $this->title); return $this->quotes; } function check() { if (!isset($this->_check)) { $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_TABLE10_STATUS'"); $this->_check = tep_db_num_rows($check_query); } return $this->_check; } function install() { tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Enable Table Method', 'MODULE_SHIPPING_TABLE10_STATUS', 'True', 'Do you want to offer table rate shipping?', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Shipping Table', 'MODULE_SHIPPING_TABLE10_COST', '25:8.50,50:5.50,10000:0.00', 'The shipping cost is based on the total cost or weight of items. Example: 25:8.50,50:5.50,etc.. Up to 25 charge 8.50, from there to 50 charge 5.50, etc', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Table Method', 'MODULE_SHIPPING_TABLE10_MODE', 'weight', 'The shipping cost is based on the order total or the total weight of the items ordered.', '6', '0', 'tep_cfg_select_option(array(\'weight\', \'price\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Handling Fee', 'MODULE_SHIPPING_TABLE10_HANDLING', '0', 'Handling fee for this shipping method.', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Tax Class', 'MODULE_SHIPPING_TABLE10_TAX_CLASS', '0', 'Use the following tax class on the shipping fee.', '6', '0', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Shipping Zone', 'MODULE_SHIPPING_TABLE10_ZONE', '0', 'If a zone is selected, only enable this shipping method for that zone.', '6', '0', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_SHIPPING_TABLE10_SORT_ORDER', '0', 'Sort order of display.', '6', '0', now())"); } function remove() { tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { return array('MODULE_SHIPPING_TABLE10_STATUS', 'MODULE_SHIPPING_TABLE10_COST', 'MODULE_SHIPPING_TABLE10_MODE', 'MODULE_SHIPPING_TABLE10_HANDLING', 'MODULE_SHIPPING_TABLE10_TAX_CLASS', 'MODULE_SHIPPING_TABLE10_ZONE', 'MODULE_SHIPPING_TABLE10_SORT_ORDER'); } } ?> and the tables looks like this: 1:1.00,2:2.00,3:2.50,5:5.00,10:10.00,20:20.00,50:50.00,100:60.00,1000:0.00 Please help meee!! Thank youuuu Edited August 29, 2006 by feinhorn Quote
Maggilove Posted August 29, 2006 Posted August 29, 2006 You haven't given any examples of the discrepancy, so it is difficult to diagnose the problem. Addressing the obvious first... do you have tare weight and percentage increase for larger packages set to zero in admin > configuration > shipping/packaging? If not, the shipping will be calculated on product weight + tare weight. Quote
feinhorn Posted August 30, 2006 Posted August 30, 2006 You haven't given any examples of the discrepancy, so it is difficult to diagnose the problem. Addressing the obvious first... do you have tare weight and percentage increase for larger packages set to zero in admin > configuration > shipping/packaging? If not, the shipping will be calculated on product weight + tare weight. Well Maggilove!! Thank you for your answer... Yesterday after my post I seacrh more and more and found that NO, I didn't check the Shipping / Packaging config... so after making the adjustments works perfect! Thanks for your help!! Fede Quote
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.
Note: Your post will require moderator approval before it will be visible.