guinness28_fr Posted October 6, 2006 Posted October 6, 2006 Hi, I installed french modules colissimo and letter and I have two problems : 1) that deosn't work, I'm stuck on the shipping page, and I can't go on the paiement page. that seems to bug somewhere, is it a known error ? 2) I wan't to align my icons and I can't manage ! Here is my screenshot. Thanks for your help. Quote
Barbie Posted October 6, 2006 Posted October 6, 2006 Hi, I installed french modules colissimo and letter and I have two problems : 1) that deosn't work, I'm stuck on the shipping page, and I can't go on the paiement page. that seems to bug somewhere, is it a known error ? 2) I wan't to align my icons and I can't manage ! Here is my screenshot. Thanks for your help. Hello Alexandre, The colissimo module works for me... what files did you install and I'll see how they compare to mine. There was one module that didn't work and maybe I'm using another. Quote
guinness28_fr Posted October 6, 2006 Author Posted October 6, 2006 Here is the content os colissimo module under module/shipping : <?php/* $Id: colissimo.php,v 1.3 2003/01/05 09:24:47 jpcivade Exp $ The Exchange Project - Community Made Shopping! http://www.theexchangeproject.org Copyright © 2000,2001 The Exchange Project Released under the GNU General Public License adaptation St?phane GUIBOUD-RIBAUD <[email protected]> xaglo <[email protected]> mise a jour v1.4.2 by fram 2003/05/10 MAJ v1.5 by lepoissonrouge 19/06/2005 MAJ v1.5.2 by lepoissonrouge 20/11/2005 www.oscommerce-fr.info */ class colissimo { var $code, $title, $description, $icon, $enabled; // class constructor function colissimo() { $this->code = 'colissimo'; $this->title = MODULE_SHIPPING_COLISSIMO_TEXT_TITLE; $this->description = MODULE_SHIPPING_COLISSIMO_TEXT_DESCRIPTION; $this->sort_order = MODULE_SHIPPING_COLISSIMO_SORT_ORDER; $this->icon = DIR_WS_ICONS . 'colissimo.gif'; // ou shipping_laposte.gif au choix $this->tax_class = MODULE_SHIPPING_COLISSIMO_TAX_CLASS; $this->enabled = MODULE_SHIPPING_COLISSIMO_STATUS; } // class methods function quote($method = '') { global $order, $cart, $shipping_weight; $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_COLISSIMO_TEXT_TITLE, 'methods' => array()); if (tep_not_null($this->icon)) $this->quotes['icon'] = tep_image($this->icon, $this->title); $dest_country = $order->delivery['country']['iso_code_2']; if (($dest_country != 'FR') && ($dest_country != 'FX')) { $this->quotes['error'] = MODULE_SHIPPING_COLISSIMO_INVALID_ZONE; return $this->quotes; } $cost = constant('MODULE_SHIPPING_COLISSIMO_NATIONAL'); $table = split("[:,]" , $cost); for ($i = 0; $i < sizeof($table); $i+=2) { if ($shipping_weight > $table[$i]) continue; $this->quotes['methods'][] = array('id' => $this->code, #'title' => $shipping_weight . ' ' . MODULE_SHIPPING_COLISSIMO_TEXT_UNITS, 'cost' => $table[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING); if ($this->tax_class > 0) { $this->quotes['tax'] = tep_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']); } return $this->quotes; } $this->quotes['error'] = MODULE_SHIPPING_COLISSIMO_TOO_HEAVY; return $this->quotes; } function check() { $check = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_COLISSIMO_STATUS'"); $check = tep_db_num_rows($check); return $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 ('Valider Colissimo', 'MODULE_SHIPPING_COLISSIMO_STATUS', 'True', 'Activer / D?sactiver Colissimo sans perdre les valeurs changées', '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 ('Colissimo national', 'MODULE_SHIPPING_COLISSIMO_NATIONAL', '0.500:5.10, 1:6.15, 2:6.95, 3:7.55, 5:8.80, 7:9.60, 10:11.45, 15:13.30, 30:18.05', 'Port basé sur le poids total des produits, tarif national TTC. Exemple: 1:6.15, 2:6.95, etc. Jusqu\'? 1 Kg factur? 6.15, jusqu\'? 2 Kg , 6.95, etc', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Frais fixes', 'MODULE_SHIPPING_COLISSIMO_HANDLING', '0', 'Frais fixes (emballage) pour colissimo', '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 ('Classe de taxe', 'MODULE_SHIPPING_COLISSIMO_TAX_CLASS', '0', 'Appliquer le taux de taxe suivant sur les frais de livraison.', '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, date_added) values ('Code postal', 'MODULE_SHIPPING_COLISSIMO_STORE_POSTCODE', '75000', 'Code postal de la boutique', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Ordre de tri', 'MODULE_SHIPPING_COLISSIMO_SORT_ORDER', '0', 'Ordre de tri pour l\'affichage (Le plus petit nombre est montré en premier).', '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_COLISSIMO_STATUS', 'MODULE_SHIPPING_COLISSIMO_NATIONAL', 'MODULE_SHIPPING_COLISSIMO_HANDLING', 'MODULE_SHIPPING_COLISSIMO_STORE_POSTCODE', 'MODULE_SHIPPING_COLISSIMO_TAX_CLASS', 'MODULE_SHIPPING_COLISSIMO_SORT_ORDER'); } } ?> Here is the content of colissimo.php under languages/french/module/shipping : <?php/* $Id: colissimo.php,v 1.3 2003/01/05 The Exchange Project - Community Made Shopping! http://www.theexchangeproject.org Copyright © 2003 The Exchange Project Released under the GNU General Public License */ define('MODULE_SHIPPING_COLISSIMO_TEXT_TITLE', 'Colissimo suivi'); define('MODULE_SHIPPING_COLISSIMO_TEXT_DESCRIPTION', 'Tarif Colissimo suivi<br><b>Attention!</b> la désactivation de ce module rétablira les valeurs par défaut'); define('MODULE_SHIPPING_COLISSIMO_TEXT_WAY', 'Optimum'); define('MODULE_SHIPPING_COLISSIMO_TEXT_WEIGHT', 'Poids'); define('MODULE_SHIPPING_COLISSIMO_TEXT_UNITS', ''); define('MODULE_SHIPPING_COLISSIMO_INVALID_ZONE', 'Cette zone n\'est pas couverte'); define('MODULE_SHIPPING_COLISSIMO_TOO_HEAVY', 'Colis trop lourd pour cette méthode de livraison'); ?> Thanks a lot if you can help me. Quote
Barbie Posted October 6, 2006 Posted October 6, 2006 Here is the content os colissimo module under module/shipping :Here is the content of colissimo.php under languages/french/module/shipping : Thanks a lot if you can help me. Found the errors in both files. In the first there is code missing and in the second the weight in _TEXT_UNITS was not defined (I use kg so it is in kilos). Here are the good ones (complete to make it easier to correct). Be sure to uninstall your current module and reinstall it after the changes. Note as well that the prices with the French post office may have to be updated as they changed again recently and the changes are reflected not in this file but directly in the admin section. In includes/modules/shipping/colissimo.php : ________________________________________________________________________________ _____ <?php /* $Id: colissimo.php,v 1.3 2003/01/05 09:24:47 jpcivade Exp $ The Exchange Project - Community Made Shopping! http://www.theexchangeproject.org Copyright © 2000,2001 The Exchange Project Released under the GNU General Public License adaptation St?phane GUIBOUD-RIBAUD <[email protected]> xaglo <[email protected]> mise a jour v1.4.2 by fram 2003/05/10 www.oscommerce-fr.info */ class colissimo { var $code, $title, $description, $icon, $enabled; // class constructor function colissimo() { $this->code = 'colissimo'; $this->title = MODULE_SHIPPING_COLISSIMO_TEXT_TITLE; $this->description = MODULE_SHIPPING_COLISSIMO_TEXT_DESCRIPTION; $this->sort_order = MODULE_SHIPPING_COLISSIMO_SORT_ORDER; $this->icon = DIR_WS_ICONS . 'colissimo.gif'; // ou shipping_laposte.gif au choix $this->tax_class = MODULE_SHIPPING_COLISSIMO_TAX_CLASS; $this->enabled = MODULE_SHIPPING_COLISSIMO_STATUS; } // class methods function quote($method = '') { global $order, $cart, $shipping_weight; $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_COLISSIMO_TEXT_TITLE, 'methods' => array()); if (tep_not_null($this->icon)) $this->quotes['icon'] = tep_image($this->icon, $this->title); $dest_country = $order->delivery['country']['iso_code_2']; if (($dest_country != 'FR') && ($dest_country != 'FX')) { $this->quotes['error'] = MODULE_SHIPPING_COLISSIMO_INVALID_ZONE; return $this->quotes; } if (substr($order->delivery['postcode'], 0, 2) == substr(MODULE_SHIPPING_COLISSIMO_STORE_POSTCODE, 0, 2)) { $cost = constant('MODULE_SHIPPING_COLISSIMO_INTRA'); } else { $cost = constant('MODULE_SHIPPING_COLISSIMO_EXTRA'); } $table = split("[:,]" , $cost); for ($i = 0; $i < sizeof($table); $i+=2) { if ($shipping_weight > $table[$i]) continue; $this->quotes['methods'][] = array('id' => $this->code, 'title' => $shipping_weight . ' ' . MODULE_SHIPPING_COLISSIMO_TEXT_UNITS, 'cost' => $table[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING); if ($this->tax_class > 0) { $this->quotes['tax'] = tep_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']); } return $this->quotes; } $this->quotes['error'] = MODULE_SHIPPING_COLISSIMO_TOO_HEAVY; return $this->quotes; } function check() { $check = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_COLISSIMO_STATUS'"); $check = tep_db_num_rows($check); return $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 ('Valider Colissimo', 'MODULE_SHIPPING_COLISSIMO_STATUS', 'True', 'Activer / D?sactiver Colissimo sans perdre les valeurs chang?es', '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 ('Colissimo intrad?partement', 'MODULE_SHIPPING_COLISSIMO_INTRA', '0.250:4.35, 0.5:5.25, 0.75:5.85, 1:6.25, 1.5:6.70, 2:7.10, 3:7.65, 4:8.30, 5:9.00, 6:9.60, 7:10.00, 10:11.05, 15:12.85, 30:17.65', '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())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Colissimo extrad?partement', 'MODULE_SHIPPING_COLISSIMO_EXTRA', '0.250:5.05, 0.5:5.95, 0.75:6.55, 1:6.95, 1.5:7.40, 2:7.80, 3:8.35, 4:9.00, 5:9.70, 6:10.30, 7:10.70, 10:11.75, 15:13.55, 30:18.35', '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())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Frais fixes', 'MODULE_SHIPPING_COLISSIMO_HANDLING', '0', 'Frais fixes (emballage) pour colissimo', '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 ('Classe de taxe', 'MODULE_SHIPPING_COLISSIMO_TAX_CLASS', '2', 'Appliquer le taux de taxe suivant sur les frais de livraison.', '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, date_added) values ('Code postal', 'MODULE_SHIPPING_COLISSIMO_STORE_POSTCODE', '06300', 'Code postal de la boutique', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Ordre de tri', 'MODULE_SHIPPING_COLISSIMO_SORT_ORDER', '0', 'Ordre de tri pour l\'affichage (Le plus petit nombre est montr? en premier).', '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_COLISSIMO_STATUS', 'MODULE_SHIPPING_COLISSIMO_INTRA', 'MODULE_SHIPPING_COLISSIMO_EXTRA', 'MODULE_SHIPPING_COLISSIMO_HANDLING', 'MODULE_SHIPPING_COLISSIMO_STORE_POSTCODE', 'MODULE_SHIPPING_COLISSIMO_TAX_CLASS','MODULE_SHIPPING_COLISSIMO_SORT_ORDER'); } } ?> ________________________________________________________________________________ _____ In includes/languages/french/modules/shipping/colissimo.php : _______________________________________________________________________________ <?php /* $Id: colissimo.php,v 1.3 2003/01/05 The Exchange Project - Community Made Shopping! http://www.theexchangeproject.org Copyright © 2003 The Exchange Project Released under the GNU General Public License */ define('MODULE_SHIPPING_COLISSIMO_TEXT_TITLE', 'Colissimo suivi ( Remise contre signature + Assurance int?gr?e )'); define('MODULE_SHIPPING_COLISSIMO_TEXT_DESCRIPTION', 'Tarif Colissimo<br><b>Attention!</b> la d?sactivation de ce module r?tablira les valeurs par d?faut'); define('MODULE_SHIPPING_COLISSIMO_TEXT_WAY', 'Optimum'); define('MODULE_SHIPPING_COLISSIMO_TEXT_WEIGHT', 'Poids'); define('MODULE_SHIPPING_COLISSIMO_TEXT_UNITS', 'kg'); // define your weight here define('MODULE_SHIPPING_COLISSIMO_INVALID_ZONE', 'Cette zone n\'est pas couverte'); define('MODULE_SHIPPING_COLISSIMO_TOO_HEAVY', 'Colis trop lourd pour cette m?thode de livraison'); ?> ________________________________________________________________________________ __ One last note : if you ship internationally I have a Colissimo international module that works great as well, as the above is for national only. The international looks for country codes and adapts charges accordingly. Hope this helps. Quote
guinness28_fr Posted October 6, 2006 Author Posted October 6, 2006 I'm very interested in the international. Can you send it to me in MP ? thanks Alex Quote
guinness28_fr Posted October 6, 2006 Author Posted October 6, 2006 and maybe you can have a look to my letter module. here is the code for languages/french/module/shipping/lettre.php <?php/* $Id: lettre.php,v 1.2 2001/10/15 07:07:45 mabosch Exp $ The Exchange Project - Community Made Shopping! http://www.theexchangeproject.org Copyright © 2000,2001 The Exchange Project Released under the GNU General Public License */ define('MODULE_SHIPPING_LETTRE_TEXT_TITLE', 'Tarif lettre'); define('MODULE_SHIPPING_LETTRE_TEXT_DESCRIPTION', 'Tarif lettre<br><b>Attention!</b> la d?sactivation de ce module r?tablira les valeurs par d?faut'); define('MODULE_SHIPPING_LETTRE_TEXT_WAY', 'Destination:'); define('MODULE_SHIPPING_LETTRE_TEXT_UNITS', ''); define('MODULE_SHIPPING_LETTRE_INVALID_ZONE', 'Pas de livraison pr?vue pour ce pays'); define('MODULE_SHIPPING_LETTRE_TOO_HEAVY', 'Colis trop lourd'); define('MODULE_SHIPPING_LETTRE_TOO_HEAVY_MORE', 'faire plusieurs commandes pour utiliser cette méthode de livraison'); ?> and here is the code for module/shipping/lettre.php <?php/* $Id: lettre.php,v 1.2 2003 osC 2.2MS1 osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License Adapte de zones.php 1.16 xaglo mise a jour 1.2 xaglo */ class lettre { var $code, $title, $description, $enabled, $num_lettre; // class constructor function lettre() { global $order; $this->code = 'lettre'; $this->title = MODULE_SHIPPING_LETTRE_TEXT_TITLE; $this->description = MODULE_SHIPPING_LETTRE_TEXT_DESCRIPTION; $this->sort_order = MODULE_SHIPPING_LETTRE_SORT_ORDER; $this->icon = DIR_WS_ICONS . 'laposte.gif'; $this->num_lettre = 1; //nb zones $this->enabled = ((MODULE_SHIPPING_LETTRE_STATUS == 'True') ? true : false); if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_LETTRE_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_LETTRE_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, $shipping_weight; $dest_country = $order->delivery['country']['iso_code_2']; $dest_country_full = $order->delivery['country']['title']; $dest_zone = 0; $error = false; for ($i=1; $i<=$this->num_lettre; $i++) { $countries_table = constant('MODULE_SHIPPING_LETTRE_COUNTRIES_' . $i); $country_lettre = split("[,]", $countries_table); if (in_array($dest_country, $country_lettre)) { $dest_zone = $i; break; } } if ($dest_zone == 0) { if (MODULE_SHIPPING_LETTRE_DISPLAY == 'False') return; else $error = true; } else { $shipping = -1; $lettre_cost = constant('MODULE_SHIPPING_LETTRE_COST_' . $i); $lettre_table = split("[:,]" , $lettre_cost); $size = sizeof($lettre_table); for ($i=0; $i<$size; $i+=2) { if ($shipping_weight <= $lettre_table[$i]) { $shipping = $lettre_table[$i+1]; // $shipping_method = $dest_country_full . '-' . $shipping_weight . MODULE_SHIPPING_LETTRE_TEXT_UNITS; break; } } if ($shipping == -1) { if (MODULE_SHIPPING_LETTRE_DISPLAY == 'False') return; else { $this->quotes = array('module' => MODULE_SHIPPING_LETTRE_TEXT_TITLE, 'error' => MODULE_SHIPPING_LETTRE_TOO_HEAVY . ' (' . $shipping_weight . MODULE_SHIPPING_LETTRE_TEXT_UNITS .') ' . MODULE_SHIPPING_LETTRE_TOO_HEAVY_MORE); return $this->quotes; } } else { $shipping_cost = ($shipping + MODULE_SHIPPING_LETTRE_HANDLING + SHIPPING_HANDLING); } } $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_LETTRE_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => $shipping_method, 'cost' => $shipping_cost))); if (tep_not_null($this->icon)) $this->quotes['icon'] = tep_image($this->icon, $this->title); if ($error == true) $this->quotes['error'] = MODULE_SHIPPING_LETTRE_INVALID_ZONE . ' (' . $dest_country . ') '; 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_LETTRE_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 ('Valider le Tarif Lettre', 'MODULE_SHIPPING_LETTRE_STATUS', 'True', 'Activer les frais de livraison par zones / Désactiver sans perdre les valeurs changées', '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 ('Affichage', 'MODULE_SHIPPING_LETTRE_SORT_ORDER', '0', 'Ordre d\'affichage.', '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 ('Affichage permanent', 'MODULE_SHIPPING_LETTRE_DISPLAY', 'True', 'Permettre l\'affichage du texte d\'erreur même si la méthode n\'est pas possible', '6', '7', '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, use_function, set_function, date_added) values ('Zone autorisée', 'MODULE_SHIPPING_LETTRE_ZONE', '0', 'Si une zone est choisie, la méthode de livraison ne sera proposée QUE pour cette 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 ('Frais fixe', 'MODULE_SHIPPING_LETTRE_HANDLING', '0', 'Frais d\'emballage ajouté pour cette méthode', '6', '0', now())"); for ($i = 1; $i <= $this->num_lettre; $i++) { $default_countries = ''; if ($i == 1) { $default_countries = 'FR'; $shipping_table = '0.100:1.11, 0.250:1.90, 0.500:2.65, 1.000:3.48, 2.000:4.64, 3.000:5.47'; } if ($i == 2) { $default_countries = 'GP,GF,MQ,YT,RE,PM'; $shipping_table = '0.100:1.61, 0.150:2.65, 0.200:2.90, 0.250:3.15, 0.300:4.15, 0.350:4.40, 0.400:4.65, 0.500:5.15, 0.600:6.48, 0.700:6.98, 0.800:7.48, 0.900:7.98, 1.000:8.48, 1.200:10.64, 1.400:11.67, 1.600:12.64, 1.800:13.64, 2.000:14.64, 2.200:16,47, 2.400:17.47, 2.600:18.47, 2.800:19.47, 3.000:20.47'; } //DOM if ($i == 3) { $default_countries = 'NC,PF,TF,FX,WF'; $shipping_table = '0.100:2.21, 0.150:3.55, 0.200:4.10, 0.250:4.65, 0.300:5.95, 0.350:6.50, 0.400:7.05, 0.500:8.15, 0.600:10.08, 0.700:11.18, 0.800:12.28, 0.900:13.38, 1.000:14.48, 1.200:17.84, 1.400:20,04, 1.600:22.24, 1.800:24.44, 2.000:26.64, 2.200:29.67, 2.400:31.87, 2.600:34.07, 2.800:36.27, 3.000:38.47'; } //TOM if ($i == 4) { $default_countries = 'DE,AT,BE,DK,ES,GI,GB,GR,IE,IT,LI,LU,NL,PT,SM,CH,VA'; $shipping_table = '0.100:1.75, 0.200:3.50, 0.300:5.40, 0.400:6.00, 0.500:6.30, 0.750:8.00, 1.000:9.00, 1.250:10.00, 1.500:11.00, 1.750:12.00, 2.000:12.50'; } // ZoneA if ($i == 5) { $default_countries = 'DZ,MA,TN,AL,AD,BY,BA,BG,HR,EE,FO,FI,GL,HU,IS,LV,LT,MK,MT,MD,MC,NO,PL,RO,RU,S K,SI,SE,UA,YU,CZ,SJ,ZA,AO,BJ,BW,BF,BI,CM,CV,CF,KM,CG,CI,DJ,ER,ET,GA,GM,GH,GN,GW,K E,LS,LR,LY,MG,MW,ML,MR,MZ,NA,NE,NG,RW,ST,SN,SC,SL,SO,SD,SZ,TZ,TD,TG,UG,ZM,ZW,SH,G Q,ZR,EH,MU,TP'; $shipping_table = '0.100:2.40, 0.200:4.10, 0.300:5.80, 0.400:6.40, 0.500:6.8, 0.750:8.5, 1.000:10, 1.250:11, 1.5:12, 1.750:13, 2.000:14'; } // ZoneB if ($i == 6) { $default_countries = 'CA,US,AF,BH,AE,IR,KW,OM,PK,QA,TR,YE,CY,EG,IL,IQ,JO,LB,SY,SA,VI,KZ,KG,TJ,TM,U Z,MX,AR,BZ,BO,BR,CL,CO,CR,EC,FK,GT,GY,HN,NI,PA,PY,PE,SR,UY,VE,AI,AG,AW,BS,BB,BM,K Y,CU,DM,DO,GD,HT,JM,MS,PR,KN,LC,VC,TT,TC,VG,AM,AZ,BD,BT,BN,KH,CN,GE,HK,IN,ID,JP,L A,MO,MY,MV,MM,MN,NP,SG,LK,TW,TH,VN,AN,KP,KR,IO,CX,CC,SV,GU,AU,FJ,KI,MH,FM,NR,NZ,P W,PG,PH,PN,SB,WS,TO,TV,VU,AS,CK,NF,NU,MP,TK'; $shipping_table = '0.100:3.20, 0.200:5.20, 0.300:7.20, 0.400:8.20, 0.500:8.60, 0.750:10.50, 1.000:12.80, 1.250:15.80, 1.500:18.10, 1.750:19.50, 2.000:20.50'; } // ZoneC tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Zone " . $i ." Pays', 'MODULE_SHIPPING_LETTRE_COUNTRIES_" . $i ."', '" . $default_countries . "', 'La virgule sépare la liste des codes ISO des pays de la zone " . $i . ". Atttention, ne pas mettre d\'espaces', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Zone " . $i ." Table Tarifs', 'MODULE_SHIPPING_LETTRE_COST_" . $i ."', '" . $shipping_table . "', 'Tarifs d\'envoi ? la Zone " . $i . " basés sur un poids maximum. Exemple: 3:8.50, 7:10.50,... Un poids inférieur ou égal ? 3 coutera 8.50 pour la Zone " . $i . ".', '6', '0', now())"); } } function remove() { $keys = ''; $keys_array = $this->keys(); for ($i=0; $i<sizeof($keys_array); $i++) { $keys .= "'" . $keys_array[$i] . "',"; } $keys = substr($keys, 0, -1); tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in (" . $keys . ")"); } function keys() { $keys = array( 'MODULE_SHIPPING_LETTRE_STATUS', 'MODULE_SHIPPING_LETTRE_SORT_ORDER', 'MODULE_SHIPPING_LETTRE_DISPLAY', 'MODULE_SHIPPING_LETTRE_HANDLING', 'MODULE_SHIPPING_LETTRE_ZONE' ); for ($i=1; $i<=$this->num_lettre; $i++) { $keys[] = 'MODULE_SHIPPING_LETTRE_COUNTRIES_' . $i; $keys[] = 'MODULE_SHIPPING_LETTRE_COST_' . $i; } return $keys; } } ?> Thanks by advance. Quote
Barbie Posted October 6, 2006 Posted October 6, 2006 and maybe you can have a look to my letter module. here is the code for languages/french/module/shipping/lettre.php and here is the code for module/shipping/lettre.php Thanks by advance. OK Alex, Do you want me to put them in a zip file and send directly by e-mail or post them here (both lettre and international)? Or post here? Quote
guinness28_fr Posted October 6, 2006 Author Posted October 6, 2006 as you want, the most simple for you. thanks. A. Quote
Barbie Posted October 6, 2006 Posted October 6, 2006 as you want, the most simple for you.thanks. A. Just e-mailed you with mine to get mail to which to send the zip. Included all the French methods ready to upload. Did the colissimo work for you? Quote
guinness28_fr Posted October 6, 2006 Author Posted October 6, 2006 yes, the colissimo worked ! by the way, I posted in the french oscommerce site a question about design, because I wanted the colissimo and la poste icons aligned, but nobody couldn't answer properly. do you have a website with colissimo available ? I'd like to have a look if yours looks like mine. The icons are not in a very nice place, stuck to the text ! Quote
Barbie Posted October 6, 2006 Posted October 6, 2006 yes, the colissimo worked ! by the way, I posted in the french oscommerce site a question about design, because I wanted the colissimo and la poste icons aligned, but nobody couldn't answer properly. do you have a website with colissimo available ? I'd like to have a look if yours looks like mine. The icons are not in a very nice place, stuck to the text ! Did you get my email Alexandre? See this site for the shipping: www.annyblatt-aiguillesdor.com Don't know where to send you the zip file with the other modules. No I can't line the images up either and lord know I tried! They seem to be linked to the text in the files. Quote
guinness28_fr Posted October 6, 2006 Author Posted October 6, 2006 Just emailed you my email adress. Thanks Alex Quote
wahren Posted October 11, 2006 Posted October 11, 2006 Hi, I had the same diagnostic you described at the top of this section, but it seems to appear for another reason. I solved the problem just by correcting the name of the php files : I removed the '_' (underscore character) from the filenames. for example, the problem was solved after renaming my file lettre_s.php to lettres.php. 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.