Latest News: (loading..)

damdamletouffu

Members
  • Content count

    14
  • Joined

  • Last visited

About damdamletouffu

  • Birthday 06/18/1981

Profile Information

  1. I finally manage it by myself, but i've got a limit on the second list. Some categories are not shown in the list, because of the number of subcategories ( >9) I've not solve this problem yet. Maybe someone had the same problem before?
  2. Hello, Did you manage to do something like you wanted? I've got the same thing to do but it seems to be harder than i thought. Does anyone know about an issue?
  3. Hi, Just to say i've installed old version and now the new one.... Thank you very much... It works as well as we hoped!
  4. Another request... Is there anybody installed a multipickup module for MVS? I'd really like to use it...
  5. Sorry for my previous reply. In fact, I was wrong with all my module. I just have to get a modified zones module. However, i'd like to know how to hardly write my default modules... for ($i = 1; $i <= $this->num_zones($vendors_id); $i++) { $default_countries = ''; if ($i == 1) { $default_countries = 'US,CA'; } I 'd like to have my others input for different zones... And how could i put my table prices above this? tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (vendors_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('" . $vendors_id . "', 'Zone " . $i ." Shipping Table', 'MODULE_SHIPPING_ZONES_COST_" . $vendors_id . "_" . $i . "', '3:8.50,7:10.50,99:20.00', 'Shipping rates to Zone " . $i . " destinations based on a group of maximum order weights. Example: 3:8.50,7:10.50,... Weights less than or equal to 3 would cost 8.50 for Zone " . $i . " destinations.', '6', '0', now())");
  6. Hi I 've added a new modue for French Shipping: Colissimo MVS I m trying to build the International Version... I need some help. My Install function (at the end of the module) have to be like this: function install($vendors_id='1') { $vID = $vendors_id; //multi vendor add 'vendors_id' to field names and '" . $vID . "', to values tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, vendors_id) values ('Activer Colissimo international', 'MODULE_SHIPPING_INTERNATIONAL_STATUS_" . $vendors_id . "', 'True', 'Vous souhaitez activer l\'expédition via colissimo international? (0=non, 1=oui)', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('INTERNATIONAL Zone 1 (pays)', 'MODULE_SHIPPING_INTERNATIONAL_COUNTRIES_1_" . $vendors_id . "', 'DE,BE,NL', 'Insérer une virgule entre 2 codes ISO de pays qui font partie de la même zone', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('INTERNATIONAL Zone 1 (poids:tarifs)', 'MODULE_SHIPPING_INTERNATIONAL_COST_1_" . $vendors_id . "', '1:11.00,2:11.50,3:12.00,4:12.50,5:13.00,6:13.50,7:14.00,8:14.50,9:15.00,10:15.50,15:18.00,20:20.50,25:23.00,30:25.50', 'Tarifs Colissimo international pour les destinations de la Zone 1. ', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('INTERNATIONAL Zone 2 (pays)', 'MODULE_SHIPPING_INTERNATIONAL_COUNTRIES_2_" . $vendors_id . "', 'GB,IT,ES', 'Insérer une virgule entre 2 codes ISO de pays qui font partie de la même zone', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('INTERNATIONAL Zone 2 (poids:tarifs)', 'MODULE_SHIPPING_INTERNATIONAL_COST_2_" . $vendors_id . "', '1:13.30,2:13.90,3:14.50,4:12.50,5:13.00,6:13.50,7:14.00,8:14.50,9:15.00,10:15.50,15:18.00,20:20.50,25:23.00,30:25.50', 'Tarifs Colissimo international pour les destinations de la Zone 2. ', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('INTERNATIONAL Zone 3 (pays)', 'MODULE_SHIPPING_INTERNATIONAL_COUNTRIES_3_" . $vendors_id . "', 'AT,DK,IE,PT', 'Insérer une virgule entre 2 codes ISO de pays qui font partie de la même zone', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('INTERNATIONAL Zone 3 (poids:tarifs)', 'MODULE_SHIPPING_INTERNATIONAL_COST_3_" . $vendors_id . "', '1:13.70,2:14.80,3:15.90,4:17.00,5:18.10,6:19.20,7:20.30,8:21.40,9:22.50,10:23.60,15:29.10,20:34.60,25:40.10,30:45.60', 'Tarifs Colissimo international pour les destinations de la Zone 3. ', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('INTERNATIONAL Zone 4 (pays)', 'MODULE_SHIPPING_INTERNATIONAL_COUNTRIES_4_" . $vendors_id . "', 'FI,NO,SE,CH', 'Insérer une virgule entre 2 codes ISO de pays qui font partie de la même zone', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('INTERNATIONAL Zone 4 (poids:tarifs)', 'MODULE_SHIPPING_INTERNATIONAL_COST_4_" . $vendors_id . "', '1:17.70,2:18.70,3:19.70,4:20.70,5:21.70,6:22.70,7:23.70,8:24.70,9:25.70,10:26.70,15:31.70,20:36.70,25:41.70,30:46.70', 'Tarifs Colissimo international pour les destinations de la Zone 4. ', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('INTERNATIONAL Zone 5 (pays)', 'MODULE_SHIPPING_INTERNATIONAL_COUNTRIES_5_" . $vendors_id . "', 'GR,IS,PL', 'Insérer une virgule entre 2 codes ISO de pays qui font partie de la même zone', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('INTERNATIONAL Zone 5 (poids:tarifs)', 'MODULE_SHIPPING_INTERNATIONAL_COST_5_" . $vendors_id . "', '1:18.00,2:21.30,3:24.60,4:27.90,5:31.20,6:34.50,7:37.80,8:41.10,9:44.40,10:47.70,15:59.70,20:71.70,25:83.70,30:95.70', 'Tarifs Colissimo international pour les destinations de la Zone 5. ', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('INTERNATIONAL Zone 6 (pays)', 'MODULE_SHIPPING_INTERNATIONAL_COUNTRIES_6_" . $vendors_id . "', 'US,CA', 'Insérer une virgule entre 2 codes ISO de pays qui font partie de la même zone', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('INTERNATIONAL Zone 6 (poids:tarifs)', 'MODULE_SHIPPING_INTERNATIONAL_COST_6_" . $vendors_id . "', '1:22.00,2:29.00,3:36.00,4:43.00,5:50.00,6:57.00,7:64.00,8:71.00,9:78.00,10:85.00,15:110.00,20:135.00,25:160.00,30:185.00', 'Tarifs Colissimo international pour les destinations de la Zone 6. ', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added, vendors_id) values ('Shipping Zone', 'MODULE_SHIPPING_INTERNATIONAL_ZONE_" . $vendors_id . "', '0', 'If a zone is selected, only enable Store Pickup for that zone.', '6', '0', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('Frais d\'emballage', 'MODULE_SHIPPING_INTERNATIONAL_HANDLING_" . $vendors_id . "', '0', 'Définir le cout fixe d\'emballage', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added, vendors_id) values ('Code TVA', 'MODULE_SHIPPING_INTERNATIONAL_TAX_CLASS_" . $vendors_id . "', '0', 'Choisir le code TVA en fonction du taux', '6', '0', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('Ordre de tri', 'MODULE_SHIPPING_INTERNATIONAL_SORT_ORDER_" . $vendors_id . "', '0', 'Définir l\'ordre d\'affichage', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('Descriptif au choix', 'MODULE_SHIPPING_INTERNATIONAL_SHIP_TEXT_" . $vendors_id . "', 'Vous recevrez par mail votre numéro de suivi de colis', 'Le client pourra voir ce descriptif', '6', '0', now(), '" . $vendors_id . "')"); } In order to have those lines... I get a code in my key function: function keys($vendors_id) { return array('MODULE_SHIPPING_INTERNATIONAL_STATUS_' . $vendors_id, 'MODULE_SHIPPING_INTERNATIONAL_COUNTRIES_' . $i . $vendors_id, 'MODULE_SHIPPING_INTERNATIONAL_COST_' . $i . $vendors_id, 'MODULE_SHIPPING_INTERNATIONAL_ZONE_' . $vendors_id, 'MODULE_SHIPPING_INTERNATIONAL_HANDLING_' . $vendors_id, 'MODULE_SHIPPING_INTERNATIONAL_TAX_CLASS_' . $vendors_id, 'MODULE_SHIPPING_INTERNATIONAL_STORE_POSTCODE_' . $vendors_id, 'MODULE_SHIPPING_INTERNATIONAL_SORT_ORDER_' . $vendors_id, 'MODULE_SHIPPING_INTERNATIONAL_SHIP_TEXT_' . $vendors_id); It doesn't work like this... I don't have any table in my Vendor Manager it appears to be this: . $i . Where should it be placed to get the rights numbers...? Then i'm trying to split table in my main function: $dest_country = $order->delivery['country']['iso_code_2']; $error = false; for ($i = 1; $i <= $this->num_international; $i ++) { $countries_tables = constant('MODULE_SHIPPING_INTERNATIONAL_COUNTRIES_' . $i . $vendors_id); $country = split("[,]", $countries_tables); if ( in_array($dest_country, $country ) ) { $dest_zone = $i; break; } } if ($dest_country == 0) { $this->quotes['error'] = MODULE_SHIPPING_INTERNATIONAL_INVALID_ZONE; } $international_cost = constant('MODULE_SHIPPING_INTERNATIONAL_COST_' . $vendors_id); // International MVS End $international_table = split("[:,]" , $international_cost . $dest_zones); $shipping = -1; $size = sizeof($international_table); for ($i=0; $i<$size; $i+=2) { if ($shipping_weight <= $international_table[$i]) { $shipping = $international_table[$i+1]; $shipping_method = MODULE_SHIPPING_INTERNATIONAL_TEXT_WAY . ' : ' . $shipping_weight . ' ' . MODULE_SHIPPING_INTERNATIONAL_TEXT_UNITS; //MVS Start $vendors_data_query = tep_db_query("select handling_charge from " . TABLE_VENDORS . " where vendors_id = '" . (int)$vendors_id . "'" ); $vendors_data = tep_db_fetch_array($vendors_data_query); //Set handling to the handling per box times number of boxes, or handling charge if it is larger $handling = $vendors_data['handling_charge']; //Set handling to the module's handling charge if it is larger $module_handling = constant('MODULE_SHIPPING_INTERNATIONAL_HANDLING_' . $vendors_id); if ($module_handling > $handling) { $handling = $module_handling; } } $shipping_cost = $shipping + $handling; //MVS End } $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_INTERNATIONAL_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => $shipping_method, 'cost' => $shipping_cost))); So, I can't split correctly if i don't have the good keys. Maybe Jim could help me, or anyone else. At the end, in order to check a simple syntax error, i let you see the complet code source: <?php /* $Id: international.php,v 1.0 05/02/2008 12:00:00 damdamletouffu $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2008 osCommerce MS2.2 Released under the GNU General Public License Premiere version pour Multi Vendor Shipping 1.1 */ class international { var $code, $title, $description, $enabled, $icon, $vendors_id; //multi vendor // class constructor function international() { //MVS $this->vendors_id = ($products['vendors_id'] <= 0) ? 1 : $products['vendors_id']; $this->code = 'international'; $this->description = MODULE_SHIPPING_INTERNATIONAL_TEXT_DESCRIPTION; $this->title = MODULE_SHIPPING_INTERNATIONAL_TEXT_TITLE; $this->description = MODULE_SHIPPING_INTERNATIONAL_TEXT_DESCRIPTION; $this->icon = DIR_WS_ICONS . 'international.gif'; // ou shipping_laposte.gif au choix // CUSTOMIZE THIS SETTING FOR THE NUMBER OF international NEEDED $this->num_international = 6; //NBen je remplace 1 par 10 } //MVS Start function zones($vendors_id='1') { if ( ($this->enabled == true) && ((int)constant('MODULE_SHIPPING_INTERNATIONAL_ZONE_' . $vendors_id) > 0) ) { $check_flag = false; $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . (int)constant('MODULE_SHIPPING_INTERNATIONAL_ZONE_' . $vendors_id) . "' 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 }//while if ($check_flag == false) { $this->enabled = false; }//if }//if return $this->enabled; }//function function sort_order($vendors_id='1') { $sort_order = @constant ('MODULE_SHIPPING_INTERNATIONAL_SORT_ORDER_' . $vendors_id); if (isset ($sort_order)) { $this->sort_order = $sort_order; } else { $this->sort_order = '-'; } return $this->sort_order; } function tax_class($vendors_id='1') { $this->tax_class = constant('MODULE_SHIPPING_INTERNATIONAL_TAX_CLASS_' . $vendors_id); return $this->tax_class; } function enabled($vendors_id='1') { $this->enabled = false; $status = @constant('MODULE_SHIPPING_INTERNATIONAL_STATUS_' . $vendors_id); if (isset ($status) && $status != '') { $this->enabled = (($status == 'True') ? true : false); } return $this->enabled; } //Set the number of zones used for this vendor function num_zones($vendors_id='1') { $vendors_data_query = tep_db_query("select zones from " . TABLE_VENDORS . " where vendors_id = '" . (int)$vendors_id . "'" ); $vendors_data = tep_db_fetch_array($vendors_data_query); $this->num_zones = $vendors_data['international']; return $this->num_zones; } //MVS End //Get a quote function quote($method = '', $module = '', $vendors_id = '1') { global $order, $cart, $shipping_weight, $shipping_num_boxes; //MVS Start //return an error if the module is not enabled for this vendor if ($this->enabled($vendors_id) < 1) { $this->quotes['error'] = MODULE_SHIPPING_ZONES_INVALID_ZONE; return $this->quotes; } //MVS End $dest_country = $order->delivery['country']['iso_code_2']; $error = false; for ($i = 1; $i <= $this->num_international; $i ++) { $countries_tables = constant('MODULE_SHIPPING_INTERNATIONAL_COUNTRIES_' . $i . $vendors_id); $country = split("[,]", $countries_tables); if ( in_array($dest_country, $country ) ) { $dest_zone = $i; break; } } if ($dest_country == 0) { $this->quotes['error'] = MODULE_SHIPPING_INTERNATIONAL_INVALID_ZONE; } $international_cost = constant('MODULE_SHIPPING_INTERNATIONAL_COST_' . $vendors_id); // International MVS End $international_table = split("[:,]" , $international_cost . $dest_zones); $shipping = -1; $size = sizeof($international_table); for ($i=0; $i<$size; $i+=2) { if ($shipping_weight <= $international_table[$i]) { $shipping = $international_table[$i+1]; $shipping_method = MODULE_SHIPPING_INTERNATIONAL_TEXT_WAY . ' : ' . $shipping_weight . ' ' . MODULE_SHIPPING_INTERNATIONAL_TEXT_UNITS; //MVS Start $vendors_data_query = tep_db_query("select handling_charge from " . TABLE_VENDORS . " where vendors_id = '" . (int)$vendors_id . "'" ); $vendors_data = tep_db_fetch_array($vendors_data_query); //Set handling to the handling per box times number of boxes, or handling charge if it is larger $handling = $vendors_data['handling_charge']; //Set handling to the module's handling charge if it is larger $module_handling = constant('MODULE_SHIPPING_INTERNATIONAL_HANDLING_' . $vendors_id); if ($module_handling > $handling) { $handling = $module_handling; } } $shipping_cost = $shipping + $handling; //MVS End } $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_INTERNATIONAL_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => $shipping_method, 'cost' => $shipping_cost))); if ($shipping = 0) { $shipping_cost = 350000; return $this->quotes; } // Pas possible de livrer if ($shipping_weight > 30) { $this->quotes['error'] = MODULE_SHIPPING_INTERNATIONAL_TOO_HEAVY; return $this->quotes; } //$this->tax_class = constant('MODULE_SHIPPING_INTERNATIONAL_TAX_CLASS_' . $vendors_id); if ($this->tax_class($vendors_id) > 0) { $this->quotes['tax'] = tep_get_tax_rate($this->tax_class($vendors_id), $order->delivery['country']['id'], $order->delivery['zone_id']); } if ($error == true) $this->quotes['error'] = MODULE_SHIPPING_INTERNATIONAL_INVALID_ZONE; return $this->quotes; } function check($vendors_id='1') { if (!isset($this->_check)) { $check_query = tep_db_query("select configuration_value from " . TABLE_VENDOR_CONFIGURATION . " where vendors_id = '". $vendors_id ."' and configuration_key = 'MODULE_SHIPPING_INTERNATIONAL_STATUS_" . $vendors_id . "'"); $this->_check = tep_db_num_rows($check_query); } return $this->_check; } function install($vendors_id='1') { $vID = $vendors_id; //multi vendor add 'vendors_id' to field names and '" . $vID . "', to values tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, vendors_id) values ('Activer Colissimo international', 'MODULE_SHIPPING_INTERNATIONAL_STATUS_" . $vendors_id . "', 'True', 'Vous souhaitez activer l\'expédition via colissimo international? (0=non, 1=oui)', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('INTERNATIONAL Zone 1 (pays)', 'MODULE_SHIPPING_INTERNATIONAL_COUNTRIES_1_" . $vendors_id . "', 'DE,BE,NL', 'Insérer une virgule entre 2 codes ISO de pays qui font partie de la même zone', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('INTERNATIONAL Zone 1 (poids:tarifs)', 'MODULE_SHIPPING_INTERNATIONAL_COST_1_" . $vendors_id . "', '1:11.00,2:11.50,3:12.00,4:12.50,5:13.00,6:13.50,7:14.00,8:14.50,9:15.00,10:15.50,15:18.00,20:20.50,25:23.00,30:25.50', 'Tarifs Colissimo international pour les destinations de la Zone 1. ', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('INTERNATIONAL Zone 2 (pays)', 'MODULE_SHIPPING_INTERNATIONAL_COUNTRIES_2_" . $vendors_id . "', 'GB,IT,ES', 'Insérer une virgule entre 2 codes ISO de pays qui font partie de la même zone', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('INTERNATIONAL Zone 2 (poids:tarifs)', 'MODULE_SHIPPING_INTERNATIONAL_COST_2_" . $vendors_id . "', '1:13.30,2:13.90,3:14.50,4:12.50,5:13.00,6:13.50,7:14.00,8:14.50,9:15.00,10:15.50,15:18.00,20:20.50,25:23.00,30:25.50', 'Tarifs Colissimo international pour les destinations de la Zone 2. ', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('INTERNATIONAL Zone 3 (pays)', 'MODULE_SHIPPING_INTERNATIONAL_COUNTRIES_3_" . $vendors_id . "', 'AT,DK,IE,PT', 'Insérer une virgule entre 2 codes ISO de pays qui font partie de la même zone', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('INTERNATIONAL Zone 3 (poids:tarifs)', 'MODULE_SHIPPING_INTERNATIONAL_COST_3_" . $vendors_id . "', '1:13.70,2:14.80,3:15.90,4:17.00,5:18.10,6:19.20,7:20.30,8:21.40,9:22.50,10:23.60,15:29.10,20:34.60,25:40.10,30:45.60', 'Tarifs Colissimo international pour les destinations de la Zone 3. ', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('INTERNATIONAL Zone 4 (pays)', 'MODULE_SHIPPING_INTERNATIONAL_COUNTRIES_4_" . $vendors_id . "', 'FI,NO,SE,CH', 'Insérer une virgule entre 2 codes ISO de pays qui font partie de la même zone', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('INTERNATIONAL Zone 4 (poids:tarifs)', 'MODULE_SHIPPING_INTERNATIONAL_COST_4_" . $vendors_id . "', '1:17.70,2:18.70,3:19.70,4:20.70,5:21.70,6:22.70,7:23.70,8:24.70,9:25.70,10:26.70,15:31.70,20:36.70,25:41.70,30:46.70', 'Tarifs Colissimo international pour les destinations de la Zone 4. ', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('INTERNATIONAL Zone 5 (pays)', 'MODULE_SHIPPING_INTERNATIONAL_COUNTRIES_5_" . $vendors_id . "', 'GR,IS,PL', 'Insérer une virgule entre 2 codes ISO de pays qui font partie de la même zone', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('INTERNATIONAL Zone 5 (poids:tarifs)', 'MODULE_SHIPPING_INTERNATIONAL_COST_5_" . $vendors_id . "', '1:18.00,2:21.30,3:24.60,4:27.90,5:31.20,6:34.50,7:37.80,8:41.10,9:44.40,10:47.70,15:59.70,20:71.70,25:83.70,30:95.70', 'Tarifs Colissimo international pour les destinations de la Zone 5. ', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('INTERNATIONAL Zone 6 (pays)', 'MODULE_SHIPPING_INTERNATIONAL_COUNTRIES_6_" . $vendors_id . "', 'US,CA', 'Insérer une virgule entre 2 codes ISO de pays qui font partie de la même zone', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('INTERNATIONAL Zone 6 (poids:tarifs)', 'MODULE_SHIPPING_INTERNATIONAL_COST_6_" . $vendors_id . "', '1:22.00,2:29.00,3:36.00,4:43.00,5:50.00,6:57.00,7:64.00,8:71.00,9:78.00,10:85.00,15:110.00,20:135.00,25:160.00,30:185.00', 'Tarifs Colissimo international pour les destinations de la Zone 6. ', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added, vendors_id) values ('Shipping Zone', 'MODULE_SHIPPING_INTERNATIONAL_ZONE_" . $vendors_id . "', '0', 'If a zone is selected, only enable Store Pickup for that zone.', '6', '0', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('Frais d\'emballage', 'MODULE_SHIPPING_INTERNATIONAL_HANDLING_" . $vendors_id . "', '0', 'Définir le cout fixe d\'emballage', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added, vendors_id) values ('Code TVA', 'MODULE_SHIPPING_INTERNATIONAL_TAX_CLASS_" . $vendors_id . "', '0', 'Choisir le code TVA en fonction du taux', '6', '0', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('Ordre de tri', 'MODULE_SHIPPING_INTERNATIONAL_SORT_ORDER_" . $vendors_id . "', '0', 'Définir l\'ordre d\'affichage', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('Descriptif au choix', 'MODULE_SHIPPING_INTERNATIONAL_SHIP_TEXT_" . $vendors_id . "', 'Vous recevrez par mail votre numéro de suivi de colis', 'Le client pourra voir ce descriptif', '6', '0', now(), '" . $vendors_id . "')"); } function remove($vendors_id) { tep_db_query("delete from " . TABLE_VENDOR_CONFIGURATION . " where vendors_id = '". $vendors_id ."' and configuration_key in ('" . implode("', '", $this->keys($vendors_id)) . "')"); } function keys($vendors_id) { return array('MODULE_SHIPPING_INTERNATIONAL_STATUS_' . $vendors_id, 'MODULE_SHIPPING_INTERNATIONAL_COUNTRIES_' . $i . $vendors_id, 'MODULE_SHIPPING_INTERNATIONAL_COST_' . $i . $vendors_id, 'MODULE_SHIPPING_INTERNATIONAL_ZONE_' . $vendors_id, 'MODULE_SHIPPING_INTERNATIONAL_HANDLING_' . $vendors_id, 'MODULE_SHIPPING_INTERNATIONAL_TAX_CLASS_' . $vendors_id, 'MODULE_SHIPPING_INTERNATIONAL_STORE_POSTCODE_' . $vendors_id, 'MODULE_SHIPPING_INTERNATIONAL_SORT_ORDER_' . $vendors_id, 'MODULE_SHIPPING_INTERNATIONAL_SHIP_TEXT_' . $vendors_id); //MVS End } } ?> Thanks Damien
  7. Thank u for reply. How can I trace a Tax Value? I've never did it...
  8. I have still an error with taxes now... They are not included in chechout_shipping.php While my code seems to be correct: $this->tax_class = constant('MODULE_SHIPPING_COLISSIMO_TAX_CLASS_' . $vendors_id); if ($this->tax_class($vendors_id) > 0) { $this->quotes['tax'] = tep_get_tax_rate($this->tax_class($vendors_id), $order->delivery['country']['id'], $order->delivery['zone_id']); } if ($error == true) $this->quotes['error'] = MODULE_SHIPPING_COLISSIMO_INVALID_ZONE; return $this->quotes; } and in function install: tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added, vendors_id) values ('Code TVA', 'MODULE_SHIPPING_COLISSIMO_TAX_CLASS_" . $vendors_id . "', '0', 'Choisir le code TVA en fonction du taux', '6', '0', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now(), '" . $vendors_id . "')"); In admin panel, it's ok. I can set Taxes. So what's wrong ?
  9. OK! you were right! Thank you Jim It finally works... i'll make some tests and add it to contributions. I just wonder... Is there a windows software working with MVS? Something like "Store Manager" for Oscomerce.
  10. I still need help! I'm trying to modifiy my shipping module for MVS... It must work... but no. :huh: So, i keep working on it but if someone could have a glimpse on it.... Error: everything is displayed except the right price. It keep displaying 0.00 >_< First, I give you the entire code <?php class colissimo { var $code, $title, $description, $enabled, $icon, $vendors_id; //multi vendor // class constructor function colissimo() { //MVS $this->vendors_id = ($products['vendors_id'] <= 0) ? 1 : $products['vendors_id']; $this->code = 'colissimo'; $this->description = MODULE_SHIPPING_COLISSIMO_TEXT_DESCRIPTION; $this->title = MODULE_SHIPPING_COLISSIMO_TEXT_TITLE; $this->description = MODULE_SHIPPING_COLISSIMO_TEXT_DESCRIPTION; $this->icon = DIR_WS_ICONS . 'colissimo.gif'; // ou shipping_laposte.gif au choix } //MVS Start function zones($vendors_id='1') { if ( ($this->enabled == true) && ((int)constant('MODULE_SHIPPING_COLISSIMO_ZONE_' . $vendors_id) > 0) ) { $check_flag = false; $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . (int)constant('MODULE_SHIPPING_COLISSIMO_ZONE_' . $vendors_id) . "' 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 }//while if ($check_flag == false) { $this->enabled = false; }//if }//if return $this->enabled; }//function function sort_order($vendors_id='1') { $sort_order = @constant ('MODULE_SHIPPING_COLISSIMO_SORT_ORDER_' . $vendors_id); if (isset ($sort_order)) { $this->sort_order = $sort_order; } else { $this->sort_order = '-'; } return $this->sort_order; } function tax_class($vendors_id='1') { $this->tax_class = constant('MODULE_SHIPPING_COLISSIMO_TAX_CLASS_' . $vendors_id); return $this->tax_class; } function enabled($vendors_id='1') { $this->enabled = false; $status = @constant('MODULE_SHIPPING_COLISSIMO_STATUS_' . $vendors_id); if (isset ($status) && $status != '') { $this->enabled = (($status == 'True') ? true : false); } return $this->enabled; } //Set the number of zones used for this vendor function num_zones($vendors_id='1') { $vendors_data_query = tep_db_query("select zones from " . TABLE_VENDORS . " where vendors_id = '" . (int)$vendors_id . "'" ); $vendors_data = tep_db_fetch_array($vendors_data_query); $this->num_zones = $vendors_data['colissimo']; return $this->num_zones; } //MVS End //Get a quote function quote($method = '', $module = '', $vendors_id = '1') { global $order, $cart, $shipping_weight, $shipping_num_boxes; //MVS Start //return an error if the module is not enabled for this vendor if ($this->enabled($vendors_id) < 1) { $this->quotes['error'] = MODULE_SHIPPING_ZONES_INVALID_ZONE; return $this->quotes; } //MVS End $dest_country = $order->delivery['country']['iso_code_2']; $postcode = $order->delivery['postcode']; $store_postcode = constant('MODULE_SHIPPING_COLISSIMO_STORE_POSTCODE'); $error = false; if (($dest_country != 'FR') && ($dest_country != 'FX')) { $this->quotes['error'] = MODULE_SHIPPING_COLISSIMO_INVALID_ZONE; } else { // Colissimo MVS Start $vendors_data_query = tep_db_query("select vendors_zipcode from " . TABLE_VENDORS . " where vendors_id = '" . (int)$vendors_id . "'" ); $vendors_data = tep_db_fetch_array($vendors_data_query); //Choisir entre Colissimo Intra ou Extra $colissimo_cost = $vendors_data['vendors_zipcode']; if (substr($postcode, 0, 2) == substr($store_postcode, 0, 2)) { $colissimo_cost = constant('MODULE_SHIPPING_COLISSIMO_INTRA_' . $vendors_id); } else { $colissimo_cost = constant('MODULE_SHIPPING_COLISSIMO_EXTRA_' . $vendors_id); } // Colissimo MVS End $colissimo_table = split("[:,]" , $colissimo_cost); $size = sizeof($colissimo_table); for ($i=0; $i<$size; $i+=2) { if ($shipping_weight <= $colissimo_table[$i]) { $shipping = $colissimo_tables[$i+1]; $shipping_method = MODULE_SHIPPING_COLISSIMO_TEXT_WAY . ' : ' . $shipping_weight . ' ' . MODULE_SHIPPING_COLISSIMO_TEXT_UNITS; //MVS Start $vendors_data_query = tep_db_query("select handling_charge from " . TABLE_VENDORS . " where vendors_id = '" . (int)$vendors_id . "'" ); $vendors_data = tep_db_fetch_array($vendors_data_query); //Set handling to the handling per box times number of boxes, or handling charge if it is larger $handling_charge = $vendors_data['handling_charge']; //Set handling to the module's handling charge if it is larger $module_handling = constant('MODULE_SHIPPING_COLISSIMO_HANDLING_' . $vendors_id); if ($module_handling > $handling) { $handling = $module_handling; } $shipping_cost = $shipping + $handling; } //MVS End } } $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_COLISSIMO_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => $shipping_method, 'cost' => $shipping_cost))); if ($shipping = 0) { $shipping_cost = 350000; return $this->quotes; } // Pas possible de livrer if ($shipping_weight > 30) { $this->quotes['error'] = MODULE_SHIPPING_COLISSIMO_TOO_HEAVY; return $this->quotes; } $this->tax_class = constant('MODULE_SHIPPING_COLISSIMO_TAX_CLASS_' . $vendors_id); if ($this->tax_class($vendors_id) > 0) { $this->quotes['tax'] = tep_get_tax_rate($this->tax_class($vendors_id), $order->delivery['country']['id'], $order->delivery['zone_id']); } if ($error == true) $this->quotes['error'] = MODULE_SHIPPING_COLISSIMO_INVALID_ZONE; return $this->quotes; } function check($vendors_id='1') { if (!isset($this->_check)) { $check_query = tep_db_query("select configuration_value from " . TABLE_VENDOR_CONFIGURATION . " where vendors_id = '". $vendors_id ."' and configuration_key = 'MODULE_SHIPPING_COLISSIMO_STATUS_" . $vendors_id . "'"); $this->_check = tep_db_num_rows($check_query); } return $this->_check; } function install($vendors_id='1') { $vID = $vendors_id; //multi vendor add 'vendors_id' to field names and '" . $vID . "', to values tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, vendors_id) values ('Valider Colissimo', 'MODULE_SHIPPING_COLISSIMO_STATUS_" . $vendors_id . "', 'True', 'Activer / Désactiver Colissimo sans perdre les valeurs changées', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('Colissimo intradépartement', 'MODULE_SHIPPING_COLISSIMO_INTRA_" . $vendors_id . "', '0.250:5.15, 0.5:5.90, 0.75:6.55, 1:7.05, 1.5:7.70, 2:7.70, 3:8.30, 4:8.90, 5:9.50, 6:10.10, 7:10.70, 8:11.30, 9:11.90, 10:12.50, 15:14.30, 30:19.10', 'Port basé sur le poids total des produits, tarif intradépartemental. Exemple: 1:3.50,2:5.50,etc.. Jusqu\'à 1 Kg facturé 3.50, jusqu\'à 2 Kg, 5.50, etc', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('Colissimo extradépartement', 'MODULE_SHIPPING_COLISSIMO_EXTRA_" . $vendors_id . "', '0.250:5.35, 0.5:6.10, 0.75:6.75, 1:7.25, 1.5:7.90, 2:7.90, 3:8.50, 4:9.10, 5:9.70, 6:10.30, 7:10.90, 8:11.50, 9:12.10, 10:12.70, 15:14.50, 30:19.30', 'Port basé sur le poids total des produits, tarif extradépartemental. Exemple: 1:4.50, 2:6.50, etc. Jusqu\'à 1 Kg facturé 4.50, jusqu\'à 2 Kg , 6.50, etc', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added, vendors_id) values ('Shipping Zone', 'MODULE_SHIPPING_COLISSIMO_ZONE_" . $vendors_id . "', '0', 'If a zone is selected, only enable Store Pickup for that zone.', '6', '0', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('Frais d\'emballage', 'MODULE_SHIPPING_COLISSIMO_HANDLING_" . $vendors_id . "', '0', 'Définir le cout fixe d\'emballage', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added, vendors_id) values ('Code TVA', 'MODULE_SHIPPING_COLISSIMO_TAX_CLASS_" . $vendors_id . "', '0', 'Choisir le code TVA en fonction du taux', '6', '0', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('Code postal', 'MODULE_SHIPPING_COLISSIMO_STORE_POSTCODE_" . $vendors_id . "', '78100', 'Code postal de la boutique', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('Ordre de tri', 'MODULE_SHIPPING_COLISSIMO_SORT_ORDER_" . $vendors_id . "', '0', 'Définir l\'ordre d\'affichage', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('Descriptif au choix', 'MODULE_SHIPPING_COLISSIMO_SHIP_TEXT_" . $vendors_id . "', 'Vous recevrez par mail votre numéro de suivi de colis', 'Le client pourra voir ce descriptif', '6', '0', now(), '" . $vendors_id . "')"); } function remove($vendors_id) { tep_db_query("delete from " . TABLE_VENDOR_CONFIGURATION . " where vendors_id = '". $vendors_id ."' and configuration_key in ('" . implode("', '", $this->keys($vendors_id)) . "')"); } function keys($vendors_id) { return array('MODULE_SHIPPING_COLISSIMO_STATUS_' . $vendors_id, 'MODULE_SHIPPING_COLISSIMO_INTRA_' . $vendors_id, 'MODULE_SHIPPING_COLISSIMO_EXTRA_' . $vendors_id, 'MODULE_SHIPPING_COLISSIMO_ZONE_' . $vendors_id, 'MODULE_SHIPPING_COLISSIMO_HANDLING_' . $vendors_id, 'MODULE_SHIPPING_COLISSIMO_TAX_CLASS_' . $vendors_id, 'MODULE_SHIPPING_COLISSIMO_STORE_POSTCODE_' . $vendors_id, 'MODULE_SHIPPING_COLISSIMO_SORT_ORDER_' . $vendors_id, 'MODULE_SHIPPING_COLISSIMO_SHIP_TEXT_' . $vendors_id); //MVS End } } ?> Then, here is the concerned code (i guess): $dest_country = $order->delivery['country']['iso_code_2']; $postcode = $order->delivery['postcode']; $store_postcode = constant('MODULE_SHIPPING_COLISSIMO_STORE_POSTCODE'); $error = false; if (($dest_country != 'FR') && ($dest_country != 'FX')) { $this->quotes['error'] = MODULE_SHIPPING_COLISSIMO_INVALID_ZONE; } else { // Colissimo MVS Start $vendors_data_query = tep_db_query("select vendors_zipcode from " . TABLE_VENDORS . " where vendors_id = '" . (int)$vendors_id . "'" ); $vendors_data = tep_db_fetch_array($vendors_data_query); //Choisir entre Colissimo Intra ou Extra $colissimo_cost = $vendors_data['vendors_zipcode']; if (substr($postcode, 0, 2) == substr($store_postcode, 0, 2)) { $colissimo_cost = constant('MODULE_SHIPPING_COLISSIMO_INTRA_' . $vendors_id); } else { $colissimo_cost = constant('MODULE_SHIPPING_COLISSIMO_EXTRA_' . $vendors_id); } // Colissimo MVS End $colissimo_table = split("[:,]" , $colissimo_cost); $size = sizeof($colissimo_table); for ($i=0; $i<$size; $i+=2) { if ($shipping_weight <= $colissimo_table[$i]) { $shipping = $colissimo_tables[$i+1]; $shipping_method = MODULE_SHIPPING_COLISSIMO_TEXT_WAY . ' : ' . $shipping_weight . ' ' . MODULE_SHIPPING_COLISSIMO_TEXT_UNITS; //MVS Start $vendors_data_query = tep_db_query("select handling_charge from " . TABLE_VENDORS . " where vendors_id = '" . (int)$vendors_id . "'" ); $vendors_data = tep_db_fetch_array($vendors_data_query); //Set handling to the handling per box times number of boxes, or handling charge if it is larger $handling_charge = $vendors_data['handling_charge']; //Set handling to the module's handling charge if it is larger $module_handling = constant('MODULE_SHIPPING_COLISSIMO_HANDLING_' . $vendors_id); if ($module_handling > $handling) { $handling = $module_handling; } $shipping_cost = $shipping + $handling; } //MVS End } } $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_COLISSIMO_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => $shipping_method, 'cost' => $shipping_cost))); I intend to add this mod to the contrib (if it works of course). Most of french users use this one but nobody has modified it ! Just tell me if something is hardly wrong in this code. Thanks!
  11. Sorry, i 've just seen that i have to adapt My files for MVS... :blush:
  12. Hi I m installing this contrib... It seems to work... But I can't add my own shipping modules... Here's the error message: It appears when i add my modified zones.php This code seems to be a problem: function zones() { $this->code = 'zones'; $this->title = MODULE_SHIPPING_ZONES_TEXT_TITLE; $this->description = MODULE_SHIPPING_ZONES_TEXT_DESCRIPTION; $this->sort_order = MODULE_SHIPPING_ZONES_SORT_ORDER; $this->icon = ''; $this->tax_class = MODULE_SHIPPING_ZONES_TAX_CLASS; $this->enabled = ((MODULE_SHIPPING_ZONES_STATUS == 'True') ? true : false); // CUSTOMIZE THIS SETTING FOR THE NUMBER OF ZONES NEEDED $this->num_zones = 50; } I tried to set the code like that: function sort_order($vendors_id='1') { $sort_order = 'MODULE_SHIPPING_ZONES_SORT_ORDER_' . $vendors_id; if (defined($sort_order)) { $this->sort_order = constant($sort_order); } else { $this->sort_order = '-'; } return $this->sort_order; } But it doesn't work... It's the same with my other modified shipping files.
  13. Is someone fixed the weight problem? I m french and i 'd like to use Kg, but State based rates send a wrong value to the Shipping process. exemple: for a 190 Kg product, i have 45 Kg and the wrong price....