osCommerce France : Accueil Forum Portail osCommerce France Réponses aux questions Foire aux contributions

Bienvenue invité ( Connexion | Inscription )

4 Pages V   1 2 3 > »   
Reply to this topicStart new topic
> [Résolu] Méthode d'expédition dépendant du produit, Lettre ou Colissimo
maxcdr
posté 16 Aug 2005, 16:09
Message #1


Ceinture verte OSC
Icône de groupe

Groupe : Membres
Messages : 754
Inscrit : 10-April 05
Lieu : Haute-Savoie
Membre no 5449



Bonjour,

Je souhaite mettre en place ceci :

1. Si le client commande le produit A : méthode d'expédition = tarif lettre de La Poste
2. Si le client commande le produit B : méthode d'expédition = Colissimo
3. Si le client commande le produit A ET le produit B : méthode d'expédition = Colissimo

Les 2 premiers points se font facilement avec un contrib. C'est le 3e point que me pose problème... confused.gif

Une idée ?

Merci d'avance !


--------------------
Go to the top of the page
 
Phocea
posté 17 Aug 2005, 12:45
Message #2


Ceinture marron OSC
Icône de groupe

Groupe : Membres
Messages : 1448
Inscrit : 12-March 05
Lieu : Chuiche
Membre no 5120



j utilise exactement cette methode sur mon site .. voila les demarche que j ai faite:

Ajout d une colonne : Produit_encombrant dans la table product (afin d identifier les produits qui doivent etre envoye par colis et non pas lettre.

Il faut tout d abord ajouter une fonction dans shopping_cart.php afin de pouvoir compter les articles encombrants dans le panier:
CODE

   function calculate() {
     $this->total_virtual = 0; // ICW Gift Voucher System
     $this->total = 0;
     $this->weight = 0;
// AJOUT ENCOMBRANT
    $this->oversized = 0;
// AJOUT ENCOMBRANT

     if (!is_array($this->contents)) return 0;

     reset($this->contents);
     while (list($products_id, ) = each($this->contents)) {
       $qty = $this->contents[$products_id]['qty'];

// products price
// AJOUT ENCOMBRANT
//        $product_query = tep_db_query("select products_id, products_price, products_cost, products_tax_class_id, products_weight from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'");

       $product_query = tep_db_query("select products_id, products_price, products_cost, products_tax_class_id, products_weight, products_oversize from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'");
// AJOUT ENCOMBRANT

       if ($product = tep_db_fetch_array($product_query)) {
// ICW ORDER TOTAL CREDIT CLASS Start Amendment
         $no_count = 1;
         $gv_query = tep_db_query("select products_model from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'");
         $gv_result = tep_db_fetch_array($gv_query);
         if (ereg('^GIFT', $gv_result['products_model'])) {
           $no_count = 0;
         }
// ICW ORDER TOTAL  CREDIT CLASS End Amendment
         $prid = $product['products_id'];
         $products_tax = tep_get_tax_rate($product['products_tax_class_id']);
         $products_price = $product['products_price'];
         $products_cost = $product['products_cost'];
         $products_weight = $product['products_weight'];
// AJOUT ENCOMBRANT
         $products_oversize = $product['products_oversize'];
// AJOUT ENCOMBRANT
         $special_price = tep_get_products_special_price($prid);
         if ($special_price) {
           $products_price = $special_price;
         }
         $this->total_virtual += tep_add_tax($products_price, $products_tax) * $qty * $no_count;// ICW CREDIT CLASS;
         $this->weight_virtual += ($qty * $products_weight) * $no_count;// ICW CREDIT CLASS;
         $this->total += tep_add_tax($products_price, $products_tax) * $qty;
         $this->weight += ($qty * $products_weight);
// AJOUT ENCOMBRANT
         $this->oversized += $products_oversize;
// AJOUT ENCOMBRANT
       }

// attributes price
       if (isset($this->contents[$products_id]['attributes'])) {
         reset($this->contents[$products_id]['attributes']);
         while (list($option, $value) = each($this->contents[$products_id]['attributes'])) {
           $attribute_price_query = tep_db_query("select options_values_price, price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$prid . "' and options_id = '" . (int)$option . "' and options_values_id = '" . (int)$value . "'");
           $attribute_price = tep_db_fetch_array($attribute_price_query);
           if ($attribute_price['price_prefix'] == '+') {
             $this->total += $qty * tep_add_tax($attribute_price['options_values_price'], $products_tax);
           } else {
             $this->total -= $qty * tep_add_tax($attribute_price['options_values_price'], $products_tax);
           }
         }
       }
     }
   }

// AJOUT ENCOMBRANT
function show_oversized() {
     $this->calculate();

     return $this->oversized;
   }
// AJOUT ENCOMBRANT


Ensuite c est tout simple, il suffit d ajouter une cle de config dans chaque module de shipping, de la sorte:

CODE
     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 Oversized', 'MODULE_SHIPPING_FRL_OVERSIZE', 'True', 'Does this method handle oversized items', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");


en debut de specification de la classe il faut ajouter:

CODE
$this->oversized_module = ((MODULE_SHIPPING_FRL_OVERSIZE == 'True') ? true : false);


puis apres les initialisations:

CODE
     if (is_object($cart)) {$OversizedProducts = $cart->show_oversized();}
     if ($this->oversized_module == true) {
      if ( $OversizedProducts == 0 ) {$this->enabled = false;}
     } else {
      if ( $OversizedProducts > 0 ) {$this->enabled = false;}
     }


qui se charge d autorise la methode ou pas.

De ce fait, des qu un encombrant est dans le panier, seul les methodes qui savent sans charger sont dispo .. si il n y en a pas, seul les methodes comme lettre le sont ...
Go to the top of the page
 
E-Micky
posté 22 Aug 2005, 10:15
Message #3


Ceinture jaune OSC
Icône de groupe

Groupe : Membres
Messages : 51
Inscrit : 31-May 05
Membre no 6034



Ta méthode m'interesserait Phocea mais pourrais tu détaillé un peu plus la démarche parce que dit comme ça j'ai aboutit à un rien hormis des erreurs mellow.gif

Merci biggrin.gif


--------------------
osCommerce 2.2-MS2Fr
Show Category Names in Product Pages v.1.0 - Accept privacy popup v.1+ - Send order html email v.5.4 - Down For Maint v2.1 for MS2 - Column Product Listing 2.3 MS2 - Colissimo v.1.5.1 - French letter v1.1 - Free Shipping w/ Minimum Amount v.3.3.1 - TVA Intracommunautaire v4.4+ - InfoBox Admin v2.23 - Batch Print Center v.3.1 - Login box v.5.5 - Login and Return to same page v.1.2.1 - Auto logon v.1.08 - PWA v.0.82 - PayPal Shopping Cart IPN v3.1.5+ - CCGV v.5.14 - CCGV treeview v.1 - QT Pro v.4.2a - Country-State Selector v.1.2.1 - Center Shop v.3 - No stock, no checkout v1.1 - UltraPics v1.0 - Administration Access Level Accounts v.2.3 - WYSIWYG TinyMCE MS2 - CSS Buttons+ - Site Map MS2-2.2 - N° facture par blancheneige - Order number prefixe v1.3et ma griffe perso
Go to the top of the page
 
maxcdr
posté 22 Aug 2005, 11:28
Message #4


Ceinture verte OSC
Icône de groupe

Groupe : Membres
Messages : 754
Inscrit : 10-April 05
Lieu : Haute-Savoie
Membre no 5449



QUOTE (E-Micky @ 22 aoû 2005, 05:15)
Ta méthode m'interesserait Phocea mais pourrais tu détaillé un peu plus la démarche parce que dit comme ça j'ai aboutit à un rien hormis des erreurs mellow.gif

Merci biggrin.gif

Pareil confused.gif


--------------------
Go to the top of the page
 
Phocea
posté 28 Aug 2005, 08:44
Message #5


Ceinture marron OSC
Icône de groupe

Groupe : Membres
Messages : 1448
Inscrit : 12-March 05
Lieu : Chuiche
Membre no 5120



Bon je reprend de 0.

Etape 1: Ajout d'un parametre sur les produits:
Ce parametre sert a decider si un produits donné est encombrant ou pas (ie. si il doit etre expedie en mode colis)

QUOTE
ALTER TABLE products ADD products_oversize INT DEFAULT 0 NOT NULL;


In catalogue/admin/categories.php:

Find

CODE
$sql_data_array = array('products_quantity' => tep_db_prepare_input($HTTP_POST_VARS['products_quantity']),
                                 'products_model' => tep_db_prepare_input($HTTP_POST_VARS['products_model']),
                                 'products_price' => tep_db_prepare_input($HTTP_POST_VARS['products_price']),
                                 'products_date_available' => $products_date_available,
                                 'products_weight' => tep_db_prepare_input($HTTP_POST_VARS['products_weight']),
                                 'products_status' => tep_db_prepare_input($HTTP_POST_VARS['products_status']),
                                 'products_tax_class_id' => tep_db_prepare_input($HTTP_POST_VARS['products_tax_class_id']),
                                 'manufacturers_id' => tep_db_prepare_input($HTTP_POST_VARS['manufacturers_id']));


Replace with

QUOTE
$sql_data_array = array('products_quantity' => tep_db_prepare_input($HTTP_POST_VARS['products_quantity']),
                                  'products_model' => tep_db_prepare_input($HTTP_POST_VARS['products_model']),
                                  'products_price' => tep_db_prepare_input($HTTP_POST_VARS['products_price']),
                                  'products_cost' => tep_db_prepare_input($HTTP_POST_VARS['products_cost']),
                                  'products_date_available' => $products_date_available,
                                  'products_weight' => tep_db_prepare_input($HTTP_POST_VARS['products_weight']),
                                  'products_oversize' => tep_db_prepare_input($HTTP_POST_VARS['products_oversize']),
                                  'products_status' => tep_db_prepare_input($HTTP_POST_VARS['products_status']),
                                  'products_tax_class_id' => tep_db_prepare_input($HTTP_POST_VARS['products_tax_class_id']),
                                  'manufacturers_id' => tep_db_prepare_input($HTTP_POST_VARS['manufacturers_id']));


Find

CODE
// BOF MaxiDVD: Modified For Ultimate Images Pack!
           $product_query = tep_db_query("select products_quantity, products_model, products_image, products_image_med, products_image_lrg, products_image_sm_1, products_image_xl_1, products_image_sm_2, products_image_xl_2, products_image_sm_3, products_image_xl_3, products_image_sm_4, products_image_xl_4, products_image_sm_5, products_image_xl_5, products_image_sm_6, products_image_xl_6, products_price, products_date_available, products_weight, products_tax_class_id, manufacturers_id from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'");
$product = tep_db_fetch_array($product_query);

tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, products_model, products_image, products_image_med, products_image_lrg, products_image_sm_1, products_image_xl_1, products_image_sm_2, products_image_xl_2, products_image_sm_3, products_image_xl_3, products_image_sm_4, products_image_xl_4, products_image_sm_5, products_image_xl_5, products_image_sm_6, products_image_xl_6, products_price, products_date_added, products_date_available, products_weight, products_oversize, products_status, products_tax_class_id, manufacturers_id) values ('" . tep_db_input($product['products_quantity']) . "', '" . tep_db_input($product['products_model']) . "', '" . tep_db_input($product['products_image']) . "', '" . tep_db_input($product['products_image_med']) . "', '" . tep_db_input($product['products_image_lrg']) . "', '" . tep_db_input($product['products_image_sm_1']) . "', '" . tep_db_input($product['products_image_xl_1']) . "', '" . tep_db_input($product['products_image_sm_2']) . "',
            '" . tep_db_input($product['products_image_xl_2']) . "', '" . tep_db_input($product['products_image_sm_3']) . "', '" . tep_db_input($product['products_image_xl_3']) . "', '" . tep_db_input($product['products_image_sm_4']) . "', '" . tep_db_input($product['products_image_xl_4']) . "', '" . tep_db_input($product['products_image_sm_5']) . "', '" . tep_db_input($product['products_image_xl_5']) . "', '" . tep_db_input($product['products_image_sm_6']) . "', '" . tep_db_input($product['products_image_xl_6']) . "', '" . tep_db_input($product['products_price']) .  "', '" . tep_db_input($product['products_cost']) . "',  now(), '" . tep_db_input($product['products_date_available']) . "', '" . tep_db_input($product['products_weight']) . "',  '0', '" . (int)$product['products_tax_class_id'] . "', '" . (int)$product['manufacturers_id'] . "')");
// BOF MaxiDVD: Modified For Ultimate Images Pack!


Replace with

CODE
// BOF MaxiDVD: Modified For Ultimate Images Pack!
           $product_query = tep_db_query("select products_quantity, products_model, products_image, products_image_med, products_image_lrg, products_image_sm_1, products_image_xl_1, products_image_sm_2, products_image_xl_2, products_image_sm_3, products_image_xl_3, products_image_sm_4, products_image_xl_4, products_image_sm_5, products_image_xl_5, products_image_sm_6, products_image_xl_6, products_price, products_date_available, products_weight, products_oversize, products_tax_class_id, manufacturers_id from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'");

$product = tep_db_fetch_array($product_query);
           tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, products_model, products_image, products_image_med, products_image_lrg, products_image_sm_1, products_image_xl_1, products_image_sm_2, products_image_xl_2, products_image_sm_3, products_image_xl_3, products_image_sm_4, products_image_xl_4, products_image_sm_5, products_image_xl_5, products_image_sm_6, products_image_xl_6, products_price, products_date_added, products_date_available, products_weight, products_oversize, products_status, products_tax_class_id, manufacturers_id) values ('" . tep_db_input($product['products_quantity']) . "', '" . tep_db_input($product['products_model']) . "', '" . tep_db_input($product['products_image']) . "', '" . tep_db_input($product['products_image_med']) . "', '" . tep_db_input($product['products_image_lrg']) . "', '" . tep_db_input($product['products_image_sm_1']) . "', '" . tep_db_input($product['products_image_xl_1']) . "', '" . tep_db_input($product['products_image_sm_2']) . "',
            '" . tep_db_input($product['products_image_xl_2']) . "', '" . tep_db_input($product['products_image_sm_3']) . "', '" . tep_db_input($product['products_image_xl_3']) . "', '" . tep_db_input($product['products_image_sm_4']) . "', '" . tep_db_input($product['products_image_xl_4']) . "', '" . tep_db_input($product['products_image_sm_5']) . "', '" . tep_db_input($product['products_image_xl_5']) . "', '" . tep_db_input($product['products_image_sm_6']) . "', '" . tep_db_input($product['products_image_xl_6']) . "', '" . tep_db_input($product['products_price']) .  "', '" . tep_db_input($product['products_cost']) . "',  now(), '" . tep_db_input($product['products_date_available']) . "', '" . tep_db_input($product['products_weight']) . "', '" . tep_db_input($product['products_oversize']) . "', '0', '" . (int)$product['products_tax_class_id'] . "', '" . (int)$product['manufacturers_id'] . "')");
// BOF MaxiDVD: Modified For Ultimate Images Pack!


Find
CODE

         <tr>
           <td class="main"><?php echo TEXT_PRODUCTS_WEIGHT; ?></td>
           <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . tep_draw_input_field('products_weight', $pInfo->products_weight); ?></td>
         </tr>


Just after add:
CODE
<tr>
           <td class="main"><?php echo TEXT_PRODUCTS_OVERSIZE; ?></td>
           <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . tep_draw_input_field('products_oversize', $pInfo->products_oversize); ?></td>
         </tr>


Find
CODE
   } else {
// BOF MaxiDVD: Modified For Ultimate Images Pack!
     $product_query = tep_db_query("select p.products_id, pd.language_id, pd.products_name, pd.products_description, pd.products_head_title_tag, pd.products_head_desc_tag, pd.products_head_keywords_tag, pd.products_url, p.products_quantity, p.products_model, p.products_image, p.products_image_med, p.products_image_lrg, p.products_image_sm_1, p.products_image_xl_1, p.products_image_sm_2, p.products_image_xl_2, p.products_image_sm_3, p.products_image_xl_3, p.products_image_sm_4, p.products_image_xl_4, p.products_image_sm_5, p.products_image_xl_5, p.products_image_sm_6, p.products_image_xl_6, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.manufacturers_id  from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "'");
// EOF MaxiDVD: Modified For Ultimate Images Pack!
     $product = tep_db_fetch_array($product_query);


Replace with
CODE

   } else {
// BOF MaxiDVD: Modified For Ultimate Images Pack!
     $product_query = tep_db_query("select p.products_id, pd.language_id, pd.products_name, pd.products_description, pd.products_head_title_tag, pd.products_head_desc_tag, pd.products_head_keywords_tag, pd.products_url, p.products_quantity, p.products_model, p.products_image, p.products_image_med, p.products_image_lrg, p.products_image_sm_1, p.products_image_xl_1, p.products_image_sm_2, p.products_image_xl_2, p.products_image_sm_3, p.products_image_xl_3, p.products_image_sm_4, p.products_image_xl_4, p.products_image_sm_5, p.products_image_xl_5, p.products_image_sm_6, p.products_image_xl_6, p.products_price, p.products_weight, p.products_oversize, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.manufacturers_id  from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "'");
// EOF MaxiDVD: Modified For Ultimate Images Pack!
     $product = tep_db_fetch_array($product_query);


Dans catalogue/admin/includes/languages/french/categories.php

Ajouter avant ?>
CODE
define('TEXT_PRODUCTS_OVERSIZE', 'Produit Encombrant:');


Apres ces modifs vous devriez avoir une case Produits Encombrant sur la page d edition des produits, en bas juste apres le poid
Go to the top of the page
 
Phocea
posté 28 Aug 2005, 08:52
Message #6


Ceinture marron OSC
Icône de groupe

Groupe : Membres
Messages : 1448
Inscrit : 12-March 05
Lieu : Chuiche
Membre no 5120



LA suite ...

Etape 2: Ajout d'une fonction dans la classe shopping_cart qui verifie si une commande contient des produits encombrants ou pas.

Dans catalogue/includes/classes/shopping_cart.php

Dans la fonction function calculate() {

Trouver
CODE
     $this->weight = 0;

Ajouter juste apres
CODE
     $this->oversized = 0;


Trouver:
// products price
CODE
       $product_query = tep_db_query("select products_id, products_price, products_tax_class_id, products_weight from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'");


Changer par
// products price
CODE
       $product_query = tep_db_query("select products_id, products_price,  products_tax_class_id, products_weight, products_oversize from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'");


Trouve un poil plus bas

CODE
         $products_weight = $product['products_weight'];


Ajouter juste apres

CODE
         $products_oversize = $product['products_oversize'];


Puis
CODE
        $this->weight += ($qty * $products_weight);

Ajouter apres
CODE
         $this->oversized += $products_oversize;


Finalement ajouter avant ?>

CODE
   function show_oversized() {
     $this->calculate();

     return $this->oversized;
   }
Go to the top of the page
 
Phocea
posté 28 Aug 2005, 09:05
Message #7


Ceinture marron OSC
Icône de groupe

Groupe : Membres
Messages : 1448
Inscrit : 12-March 05
Lieu : Chuiche
Membre no 5120



Etape 3: On ajoute les module shipping eux meme

Creer unb fichier colis.php comme suit:

CODE
<?php
/*
 $Id: colis.php,v 1.00 2005/03/07 10:37:00 Phocea $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2002 - 2003 osCommerce

 Released under the GNU General Public License
*/
/********************************************************************
* Copyright (C) 2001 - 2003 TheMedia, Dipl.-Ing Thomas Plänkers
*       http://www.themedia.at & http://www.oscommerce.at
*
*                    All rights reserved
*
* This program is free software licensed under the GNU General Public License (GPL).
*
*    This program is free software; you can redistribute it and/or modify
*    it under the terms of the GNU General Public License as published by
*    the Free Software Foundation; either version 2 of the License, or
*    (at your option) any later version.
*
*    This program is distributed in the hope that it will be useful,
*    but WITHOUT ANY WARRANTY; without even the implied warranty of
*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
*    GNU General Public License for more details.
*
*    You should have received a copy of the GNU General Public License
*    along with this program; if not, write to the Free Software
*    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
*    USA
*
*********************************************************************/

 class colis {
   var $code, $title, $description, $icon, $enabled, $num_frc, $types;

// class constructor
   function colis() {
     global $order, $cart;

     $this->code = 'colis';
     $this->title = MODULE_SHIPPING_FRC_TEXT_TITLE;
     $this->description = MODULE_SHIPPING_FRC_TEXT_DESCRIPTION;
     $this->sort_order = MODULE_SHIPPING_FRC_SORT_ORDER;
     $this->icon = DIR_WS_ICONS . 'shipping_frc.gif';
     $this->tax_class = MODULE_SHIPPING_FRC_TAX_CLASS;
     $this->oversized_module = ((MODULE_SHIPPING_FRC_OVERSIZE == 'True') ? true : false);
     $this->enabled = ((MODULE_SHIPPING_FRC_STATUS == 'True') ? true : false);
     
     if (is_object($cart)) {$OversizedProducts = $cart->show_oversized();}
     if ($this->oversized_module == true) {
      if ( $OversizedProducts == 0 ) {$this->enabled = false;}
     } else {
      if ( $OversizedProducts > 0 ) {$this->enabled = false;}
     }


     if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_FRC_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_FRC_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;
       }
     }

     $this->types = array('ECO' => MODULE_SHIPPING_FRC_ECONOMY,
                          'INS' => MODULE_SHIPPING_FRC_INSURANCE,
                          'URG' => MODULE_SHIPPING_FRC_URGENT,
                          'URGINS' => MODULE_SHIPPING_FRC_URGENT_INSURANCE,);

     // CUSTOMIZE THIS SETTING FOR THE NUMBER OF ZONES NEEDED
     $this->num_frc = 7;
   }

// class methods
   function quote($method = '') {
     global $HTTP_POST_VARS, $order, $shipping_weight, $cart, $shipping_num_boxes;

     $dest_country = $order->delivery['country']['iso_code_2'];
     $dest_cp = substr( $order->delivery['postcode'], 0, 2 );
     $dest_zone = 0;
     $error = false;

    if ( ($dest_country == 'FR') || ($dest_country == 'FX') ) {// Par défaut le destinataire est en France métropole
      // Par défaut le destinataire est en France métropole
      $dest_country = 'FR';
      // Le code postal du destinataire est dans les DOM
      if ($dest_cp == '97')  $dest_country = 'DOM';
      // Le code postal du destinataire est dans les TOM
      if ($dest_cp == '98')  $dest_country = 'TOM';
   } elseif ( ($dest_country == 'YT') || ($dest_country == 'PM') || ($dest_country == 'GF') || ($dest_country == 'GP') || ($dest_country == 'MQ') || ($dest_country == 'RE')) {
   $dest_country = 'DOM';
} elseif ( ($dest_country == 'NC') || ($dest_country == 'PF') || ($dest_country == 'WF') || ($dest_country == 'TF')) {
  $dest_country = 'TOM';
    }
   
     for ($j=1; $j<=$this->num_frc; $j++) {
       $countries_table = constant('MODULE_SHIPPING_FRC_COUNTRIES_' . $j);
       $country_zones = split("[,]", $countries_table);
       if (in_array($dest_country, $country_zones)) {
         $dest_zone = $j;
         break;
       } else {
        $dest_zone = 0; // Other destinations
       }
     }
     $OversizedProducts = $cart->show_oversized();
     if (MODULE_SHIPPING_FRC_OVERSIZE == 'True') {
      if ( $OversizedProducts == 0 ) {
       if ( $shipping_weight <= 2) {
         $dest_zone = 0;
         }
      }
     }
     else {
      if ( $OversizedProducts > 0 ) {
       $dest_zone = 0;
      }
     }
     if ($dest_zone == 0) {
       $error = true;
     } else {
       $shipping = -1;
       $frc_cost_eco = @constant('MODULE_SHIPPING_FRC_COST_ECO_' . $j);
       $frc_cost_ins = @constant('MODULE_SHIPPING_FRC_COST_INS_' . $j);
       $frc_cost_urg = @constant('MODULE_SHIPPING_FRC_COST_URG_' . $j);
       $frc_cost_urg_ins = @constant('MODULE_SHIPPING_FRC_COST_URG_INS_' . $j);

       $methods = array();

       if ($frc_cost_eco != '') {
         $frc_table_eco = split("[:,]" , $frc_cost_eco);

         for ($i=0; $i<sizeof($frc_table_eco); $i+=2) {
           if ($shipping_weight <= $frc_table_eco[$i]) {
             $shipping_eco = $frc_table_eco[$i+1];
             break;
           }
         }

         if ($shipping_eco == -1) {
           $shipping_cost = 0;
           $shipping_method = MODULE_SHIPPING_FRC_UNDEFINED_RATE;
         } else {
           $shipping_cost_1 = ($shipping_eco + MODULE_SHIPPING_FRC_HANDLING);
         }

         if ($shipping_eco != 0) {
           $ship_cost = 0;
      $total_items = 0;
           $total_items = $cart->count_contents();
           $ship_cost = ($shipping_cost_1 * $shipping_num_boxes); //- $total_items;
           if  ($ship_cost < 0) { $ship_cost = 0; };
           $methods[] = array('id' => 'ECO',
                              'title' => MODULE_SHIPPING_FRC_ECONOMY,
                              'cost' => $ship_cost);           }
       }

       if ($frc_cost_ins != '') {
         $frc_table_ins = split("[:,]" , $frc_cost_ins);

         for ($i=0; $i<sizeof($frc_table_ins); $i+=2) {
           if ($shipping_weight <= $frc_table_ins[$i]) {
             $shipping_ins = $frc_table_ins[$i+1];
             break;
           }
         }

         if ($shipping_ins == -1) {
           $shipping_cost = 0;
           $shipping_method = MODULE_SHIPPING_FRC_UNDEFINED_RATE;
         } else {
           $shipping_cost_2 = ($shipping_ins + MODULE_SHIPPING_FRC_HANDLING);
         }

        if ($shipping_ins != 0) {
           $ship_cost = 0;
      $total_items = 0;
           $total_items = $cart->count_contents();
           $ship_cost = ($shipping_cost_2 * $shipping_num_boxes); //- $total_items;
           if  ($ship_cost < 0) { $ship_cost = 0; };
           $methods[] = array('id' => 'INS',
                              'title' => MODULE_SHIPPING_FRC_INSURANCE,
                              'cost' => $ship_cost); //$shipping_cost_2 * $shipping_num_boxes);
         }
       }  

       if ($frc_cost_urg != '') {
         $frc_table_urg = split("[:,]" , $frc_cost_urg);

         for ($i=0; $i<sizeof($frc_table_urg); $i+=2) {
           if ($shipping_weight <= $frc_table_urg[$i]) {
             $shipping_urg = $frc_table_urg[$i+1];
             break;
           }
         }

         if ($shipping_urg == -1) {
           $shipping_cost = 0;
           $shipping_method = MODULE_SHIPPING_FRC_UNDEFINED_RATE;
         } else {
           $shipping_cost_3 = ($shipping_urg + MODULE_SHIPPING_FRC_HANDLING);
         }

         if ($shipping_urg != 0) {
           $ship_cost = 0;
      $total_items = 0;
           $total_items = $cart->count_contents();
           $ship_cost = ($shipping_cost_3 * $shipping_num_boxes); //- $total_items;
           if  ($ship_cost < 0) { $ship_cost = 0; };
           $methods[] = array('id' => 'URG',
                              'title' => MODULE_SHIPPING_FRC_URGENT,
                              'cost' =>  $ship_cost); //$shipping_cost_3 * $shipping_num_boxes);
         }
       }
       if ($frc_cost_urg_ins != '') {
         $frc_table_urg_ins = split("[:,]" , $frc_cost_urg_ins);

         for ($i=0; $i<sizeof($frc_table_urg_ins); $i+=2) {
           if ($shipping_weight <= $frc_table_urg_ins[$i]) {
             $shipping_urg_ins = $frc_table_urg_ins[$i+1];
             break;
           }
         }

         if ($shipping_urg_ins == -1) {
           $shipping_cost = 0;
           $shipping_method = MODULE_SHIPPING_FRC_UNDEFINED_RATE;
         } else {
           $shipping_cost_3 = ($shipping_urg_ins + MODULE_SHIPPING_FRC_HANDLING);
         }

         if ($shipping_urg_ins != 0) {
           $ship_cost = 0;
          $total_items = 0;
           $total_items = $cart->count_contents();
           $ship_cost = ($shipping_cost_3 * $shipping_num_boxes); //- $total_items;
           if  ($ship_cost < 0) { $ship_cost = 0; };
           $methods[] = array('id' => 'URGINS',
                              'title' => MODULE_SHIPPING_FRC_URGENT_INS,
                              'cost' =>  $ship_cost); //$shipping_cost_3 * $shipping_num_boxes);
         }
       }

     }

     $this->quotes = array('id' => $this->code,
                           'module' => $this->title . ' (' . $shipping_num_boxes . ' x ' . $shipping_weight . ' ' . MODULE_SHIPPING_FRC_TEXT_UNITS .')');
     $this->quotes['methods'] = $methods;

     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);

     if ($error == true) $this->quotes['error'] = MODULE_SHIPPING_FRC_INVALID_ZONE;

     if ( (tep_not_null($method)) && (isset($this->types[$method])) ) {

       for ($i=0; $i<sizeof($methods); $i++) {
         if ($method == $methods[$i]['id']) {
           $methodsc = array();
           $methodsc[] = array('id' => $methods[$i]['id'],
                               'title' => $methods[$i]['title'],
                               'cost' => $methods[$i]['cost']);
           break;
         }
       }
       $this->quotes['methods'] = $methodsc;
     }

     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_FRC_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 ('French PostOffice - Letter', 'MODULE_SHIPPING_FRC_STATUS', 'True', 'Do you want to offer the dispatch over the French post office for letters?', '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 ('Handling Fee', 'MODULE_SHIPPING_FRC_HANDLING', '0', 'Handling charge for this mode of shipment', '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', 'MODULE_SHIPPING_FRC_TAX_CLASS', '0', 'Select the VAT set for this mode of shipment.', '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 ('Zone', 'MODULE_SHIPPING_FRC_ZONE', '0', 'If you select a zone, this mode of shipment is offered only in this 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_FRC_SORT_ORDER', '0', 'Lowest one is first indicated.', '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 ('Enable Oversized', 'MODULE_SHIPPING_FRC_OVERSIZE', 'True', 'Does this method handle oversized items', '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 ('Tarifs for France', 'MODULE_SHIPPING_FRC_COUNTRIES_1', 'FR', 'France', '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 ('Tarifs for Zone FR for Colieco', 'MODULE_SHIPPING_FRC_COST_ECO_1', '0.5:4.50,1:5.5,2:6.40,3:7.00,5:8.30,7:9.00,10:10.90,15:12.70,30:17.50', 'Tarif Table for the France Zone in <b>\'ECO\'</b> up to 3 kg.', '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 ('Tarifs for Zone FR for Colieco + Ins', 'MODULE_SHIPPING_FRC_COST_INS_1', '0.5:8.50,1:9.5,2:10.40,3:11.00,5:12.30,7:13.00,10:14.90,15:16.70,30:21.50', 'Tarif Table for the France Zone in <b>\'INS\'</b> up to 1 kg.', '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 ('Tarifs for Zone FR for Express Collissimo', 'MODULE_SHIPPING_FRC_COST_URG_1', '0.5:5.50,1:6.5,2:7.00,3:8.00,5:9.00,7:10.00,10:11.70,15:13.70,30:19.00', 'Tarif Table for the France Zone in <b>\'URG\'</b> up to 30 kg.', '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 ('Tarifs for Zone FR for Express Collissimo + Ins.', 'MODULE_SHIPPING_FRC_COST_URG_INS_1', '0.5:8.50,1:9.50,2:10.00,3:11.00,5:12.20,7:13.00,10:14.80,15:16.90,30:21.50', 'Tarif Table for the France Zone in <b>\'URGINS\'</b> up to 30 kg.', '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 ('Tarifs for DOM', 'MODULE_SHIPPING_FRC_COUNTRIES_2', 'DOM', 'DOM', '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 ('Tarifs for DOM for Colieco', 'MODULE_SHIPPING_FRC_COST_ECO_2', '0.5:7.60, 1:11.40, 2:15.70, 3:20.00', 'Tarif Table for the DOM Zone in <b>\'ECO\'</b> up to 3 kg.', '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 ('Tarifs for DOM for Colieco Ins.', 'MODULE_SHIPPING_FRC_COST_INS_2', '0.5:10.70,1:12.60,2:13.10,3:14.10', 'Tarif Table for the DOM Zone in <b>\'INS\'</b> up to 3 kg.', '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 ('Tarifs for TOM', 'MODULE_SHIPPING_FRC_COUNTRIES_3', 'TOM', 'TOM', '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 ('Tarifs for TOM for Colieco', 'MODULE_SHIPPING_FRC_COST_ECO_3', '0.5:8.70, 1:13.90, 2:25.30, 3:36.70', 'Tarif Table for the TOM Zone in <b>\'ECO\'</b> up to 3 kg.', '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 ('Tarifs for TOM for Colieco + Ins.', 'MODULE_SHIPPING_FRC_COST_INS_3', '0.5:11.80,1:18.00,2:28.40,3:39.80', 'Tarif Table for the TOM Zone in <b>\'INS\'</b> up to 3 kg.', '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 ('Tarifs for Zone A - Europe de l\'ouest et CEE, Gibraltar,SanMarin, Vatican', 'MODULE_SHIPPING_FRC_COUNTRIES_4', 'NO,MC,GB,DE,IE,ES,IT,BE,PT,NL,AT,AD,CY,DK,EE,FI,GI,GR,HU,LV,LT,LU,MT,VA,PL,CZ,SK,SI,SE,SM', 'Liste des pays faisant partie de la zone A', '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 ('Tarifs for Zone A for Colieco', 'MODULE_SHIPPING_FRC_COST_ECO_4', '1:14.80,2:16.30,3:19.30', 'Tarif Table for the Zone A in <b>\'ECO\'</b> up to 3 kg.', '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 ('Tarifs for Zone A for Colieco + Ins', 'MODULE_SHIPPING_FRC_COST_INS_4', '1:18.80,2:20.30,3:23.30', 'Tarif Table for the Zone A in <b>\'INS\'</b> up to 3 kg.', '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 ('Tarifs for Zone B - Pays Zone B - Europe de l\'Est, Maroc, Tunisie, Algérie', 'MODULE_SHIPPING_FRC_COUNTRIES_5', 'AL,AM,AZ,BY,BG,HR,YU,RU,GE,MD,MK,RO,TR,UA,DZ,MA,TN', 'Comma separated list of two character ISO country codes that are part of Zone B.', '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 ('Tarifs for Zone C for Colieco', 'MODULE_SHIPPING_FRC_COST_ECO_5', '1:17.80,2:19.60,3:23.80', 'Tarif Table for Zone B, in <b>\'ECO\'</b> up to 3Kg.', '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 ('Tarifs for Zone B for Colieco + Ins', 'MODULE_SHIPPING_FRC_COST_INS_5', '1:21.80,2:23.60,3:27.80', 'Tarif Table for Zone B, in <b>\'INS\'</b> up to 3Kg.', '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 ('Tarifs for Zone C - Afrique,USA,Proche-Orient,Moyen-Orient', 'MODULE_SHIPPING_FRC_COUNTRIES_6', 'ZA,AO,BJ,BW,BF,BI,CM,CV,CF,KM,CG,CI,DJ,ET,GA,GM,GH,GN,GW,MU,KE,LS,LR,LY,MG,MW,MR,YT,MZ,NA,NE,NG,RW,EH,ST,SH,SC,SN,SL,SO,SD,SZ,TZ,TD,TG,ZR,ZM,ZW,US,CA,SA,BH,BN,EG,AE,ER,IQ,IR,IL,JO,KW,LB,OM,QA,SY,YE', 'Comma separated list of two character ISO country codes that are part of Zone C.', '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 ('Tarifs for Zone C for Colieco', 'MODULE_SHIPPING_FRC_COST_ECO_6', '1:20.50,2:27.00,3:36.00', 'Tarif Table for Zone C, in <b>\'ECO\'</b> up to 3Kg.', '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 ('Tarifs for Zone C for Colieco + Ins', 'MODULE_SHIPPING_FRC_COST_INS_6', '1:24.50,2:31.00,3:40.00', 'Tarif Table for Zone C, in <b>\'INS\'</b> up to 3Kg.', '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 ('Tarifs for Zone D - Autres destinations', 'MODULE_SHIPPING_FRC_COUNTRIES_7', 'OT', 'Comma separated list of two character ISO country codes that are part of Zone C.', '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 ('Tarifs for Zone D for Colieco', 'MODULE_SHIPPING_FRC_COST_ECO_7', '1:23.70,2:35.70,3:47.70', 'Tarif Table for Zone C, in <b>\'ECO\'</b> up to 3Kg.', '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 ('Tarifs for Zone D for Colieco + Ins', 'MODULE_SHIPPING_FRC_COST_INS_7', '1:27.70,2:39.70,3:51.70', 'Tarif Table for Zone C, in <b>\'INS\'</b> up to 3Kg.', '6', '0', now())");
   }

   function remove() {
     tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
   }

   function keys() {
     $keys = array('MODULE_SHIPPING_FRC_STATUS', 'MODULE_SHIPPING_FRC_HANDLING', 'MODULE_SHIPPING_FRC_TAX_CLASS', 'MODULE_SHIPPING_FRC_ZONE', 'MODULE_SHIPPING_FRC_SORT_ORDER', 'MODULE_SHIPPING_FRC_OVERSIZE');

     for ($i=1; $i <= $this->num_frc; $i++) {
       $keys[count($keys)] = 'MODULE_SHIPPING_FRC_COUNTRIES_' . $i;
       $keys[count($keys)] = 'MODULE_SHIPPING_FRC_COST_ECO_' . $i;
       $keys[count($keys)] = 'MODULE_SHIPPING_FRC_COST_INS_' . $i;
       $keys[count($keys)] = 'MODULE_SHIPPING_FRC_COST_URG_' . $i;
       $keys[count($keys)] = 'MODULE_SHIPPING_FRC_COST_URG_INS_' . $i;
     }

     return $keys;
   }
 }
?>


Et son fichier de localisation a mettre dans /catalogue/includes/languages/french/modules/shipping/

CODE
<?php
/*
 $Id: colis.php,v 1.01 2003/02/18 03:33:00 Phocea $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2002 - 2003 osCommerce

 Released under the GNU General Public License
*/
/********************************************************************
* Copyright (C) 2002 - 2003 TheMedia, Dipl.-Ing Thomas Plänkers
*       http://www.themedia.at & http://www.oscommerce.at
*
*                    All rights reserved
*
* This program is free software licensed under the GNU General Public License (GPL).
*
*    This program is free software; you can redistribute it and/or modify
*    it under the terms of the GNU General Public License as published by
*    the Free Software Foundation; either version 2 of the License, or
*    (at your option) any later version.
*
*    This program is distributed in the hope that it will be useful,
*    but WITHOUT ANY WARRANTY; without even the implied warranty of
*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
*    GNU General Public License for more details.
*
*    You should have received a copy of the GNU General Public License
*    along with this program; if not, write to the Free Software
*    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
*    USA
*
*********************************************************************/

define('MODULE_SHIPPING_FRC_TEXT_TITLE', 'Colis de La Poste (Large)');
define('MODULE_SHIPPING_FRC_TEXT_DESCRIPTION', 'Colis de La Poste (Large)');
define('MODULE_SHIPPING_FRC_TEXT_WAY', 'Délivrer a');
define('MODULE_SHIPPING_FRC_TEXT_UNITS', 'kg');
define('MODULE_SHIPPING_FRC_INVALID_ZONE', 'Malheureusement nous ne pouvons pas délivrer dans ce pays');
define('MODULE_SHIPPING_FRC_INVALID_TYPE', 'Cette méthode de livraison ne s\'applique pas pour votre commande');
define('MODULE_SHIPPING_FRC_UNDEFINED_RATE', 'Le cout de livraison ne peuvent pas etre calculer pour le moment');
define('MODULE_SHIPPING_FRC_ECONOMY', 'Colis économique, j+5 max');
define('MODULE_SHIPPING_FRC_INSURANCE', 'Colis économique avec Assurance, j+5 max');
define('MODULE_SHIPPING_FRC_URGENT', 'Colissimo, j+2 max');
define('MODULE_SHIPPING_FRC_URGENT_INS', 'Colissimo avec Assurance, j+2 max');


?>
Go to the top of the page
 
Phocea
posté 28 Aug 2005, 09:15
Message #8


Ceinture marron OSC
Icône de groupe

Groupe : Membres
Messages : 1448
Inscrit : 12-March 05
Lieu : Chuiche
Membre no 5120



Creer un fichier letter.php comme suit:

CODE
<?php
/*
 $Id: letter.php,v 1.00 2005/03/07 10:37:00 Phocea $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2002 - 2003 osCommerce

 Released under the GNU General Public License
*/
/********************************************************************
* Copyright (C) 2001 - 2003 TheMedia, Dipl.-Ing Thomas Plänkers
*       http://www.themedia.at & http://www.oscommerce.at
*
*                    All rights reserved
*
* This program is free software licensed under the GNU General Public License (GPL).
*
*    This program is free software; you can redistribute it and/or modify
*    it under the terms of the GNU General Public License as published by
*    the Free Software Foundation; either version 2 of the License, or
*    (at your option) any later version.
*
*    This program is distributed in the hope that it will be useful,
*    but WITHOUT ANY WARRANTY; without even the implied warranty of
*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
*    GNU General Public License for more details.
*
*    You should have received a copy of the GNU General Public License
*    along with this program; if not, write to the Free Software
*    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
*    USA
*
*********************************************************************/

 class letter {
   var $code, $title, $description, $icon, $enabled, $num_frl, $types;

// class constructor
   function letter() {
     global $order, $cart;

     $this->code = 'letter';
     $this->title = MODULE_SHIPPING_FRL_TEXT_TITLE;
     $this->description = MODULE_SHIPPING_FRL_TEXT_DESCRIPTION;
     $this->sort_order = MODULE_SHIPPING_FRL_SORT_ORDER;
     $this->icon = DIR_WS_ICONS . 'shipping_frl.gif';
     $this->tax_class = MODULE_SHIPPING_FRL_TAX_CLASS;
     $this->oversized_module = ((MODULE_SHIPPING_FRL_OVERSIZE == 'True') ? true : false);
     $this->enabled = ((MODULE_SHIPPING_FRL_STATUS == 'True') ? true : false);
     
     if (is_object($cart)) {$OversizedProducts = $cart->show_oversized();}
     if ($this->oversized_module == true) {
      if ( $OversizedProducts == 0 ) {$this->enabled = false;}
     } else {
      if ( $OversizedProducts > 0 ) {$this->enabled = false;}
     }

     if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_FRL_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_FRL_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;
       }
     }
     
     $this->types = array('ECO' => MODULE_SHIPPING_FRL_ECONOMY,
                          'INS' => MODULE_SHIPPING_FRL_INSURANCE,
                          'URG' => MODULE_SHIPPING_FRL_URGENT,
                          'URGINS' => MODULE_SHIPPING_FRL_URGENT_INSURANCE,);

     // CUSTOMIZE THIS SETTING FOR THE NUMBER OF ZONES NEEDED
     $this->num_frl = 7;
   }

// class methods
   function quote($method = '') {
     global $HTTP_POST_VARS, $order, $shipping_weight, $cart, $shipping_num_boxes;

     $dest_country = $order->delivery['country']['iso_code_2'];
     $dest_cp = substr( $order->delivery['postcode'], 0, 2 );
     $dest_zone = 0;
     $error = false;

    if ( ($dest_country == 'FR') || ($dest_country == 'FX') ) {// Par défaut le destinataire est en France métropole
      // Par défaut le destinataire est en France métropole
      $dest_country = 'FR';
      // Le code postal du destinataire est dans les DOM
      if ($dest_cp == '97')  $dest_country = 'DOM';
      // Le code postal du destinataire est dans les TOM
      if ($dest_cp == '98')  $dest_country = 'TOM';
   } elseif ( ($dest_country == 'YT') || ($dest_country == 'PM') || ($dest_country == 'GF') || ($dest_country == 'GP') || ($dest_country == 'MQ') || ($dest_country == 'RE')) {
   $dest_country = 'DOM';
} elseif ( ($dest_country == 'NC') || ($dest_country == 'PF') || ($dest_country == 'WF') || ($dest_country == 'TF')) {
   $dest_country = 'TOM';
    }
   
     $dest_zone = 7; // Other destinations
     for ($j=1; $j<=$this->num_frl; $j++) {
       $countries_table = constant('MODULE_SHIPPING_FRL_COUNTRIES_' . $j);
       $country_zones = split("[,]", $countries_table);
       if (in_array($dest_country, $country_zones)) {
         $dest_zone = $j;
         break;
       } else {
        $dest_zone = 0; // Other destinations
       }
     }

     
     $OversizedProducts = $cart->show_oversized();
     if (MODULE_SHIPPING_FRL_OVERSIZE == 'True') {
      if ( $OversizedProducts == 0 ) {
       if ( $shipping_weight <= 2) {
         $dest_zone = 0;
         }
      }
     }
     else {
      if ( $OversizedProducts > 0 ) {
       $dest_zone = 0;
      }
     }
     if ($dest_zone == 0) {
       $error = true;
     } else {
       $shipping = -1;
       $frl_cost_eco = @constant('MODULE_SHIPPING_FRL_COST_ECO_' . $j);
       $frl_cost_ins = @constant('MODULE_SHIPPING_FRL_COST_INS_' . $j);
       $frl_cost_urg = @constant('MODULE_SHIPPING_FRL_COST_URG_' . $j);
       $frl_cost_urg_ins = @constant('MODULE_SHIPPING_FRL_COST_URG_INS_' . $j);

       $methods = array();

       if ($frl_cost_eco != '') {
         $frl_table_eco = split("[:,]" , $frl_cost_eco);

         for ($i=0; $i<sizeof($frl_table_eco); $i+=2) {
           if ($shipping_weight <= $frl_table_eco[$i]) {
             $shipping_eco = $frl_table_eco[$i+1];
             break;
           }
         }

         if ($shipping_eco == -1) {
           $shipping_cost = 0;
           $shipping_method = MODULE_SHIPPING_FRL_UNDEFINED_RATE;
         } else {
           $shipping_cost_1 = ($shipping_eco + MODULE_SHIPPING_FRL_HANDLING);
         }

         if ($shipping_eco != 0) {
           $ship_cost = 0;
          $total_items = 0;
           $total_items = $cart->count_contents();
           $ship_cost = ($shipping_cost_1 * $shipping_num_boxes);// - $total_items;
           if ($ship_cost < 0) { $ship_cost = 0; };
           $methods[] = array('id' => 'ECO',
                              'title' => MODULE_SHIPPING_FRL_ECONOMY,
                              'cost' => $ship_cost); //($shipping_cost_1 * $shipping_num_boxes) - $OversizedProducts * 2 );
         }
       }

       if ($frl_cost_ins != '') {
         $frl_table_ins = split("[:,]" , $frl_cost_ins);

         for ($i=0; $i<sizeof($frl_table_ins); $i+=2) {
           if ($shipping_weight <= $frl_table_ins[$i]) {
             $shipping_ins = $frl_table_ins[$i+1];
             break;
           }
         }

         if ($shipping_ins == -1) {
           $shipping_cost = 0;
           $shipping_method = MODULE_SHIPPING_FRL_UNDEFINED_RATE;
         } else {
           $shipping_cost_2 = ($shipping_ins + MODULE_SHIPPING_FRL_HANDLING);
         }

        if ($shipping_ins != 0) {
           $ship_cost = 0;
      $total_items = 0;
           $total_items = $cart->count_contents();
           $ship_cost = ($shipping_cost_2 * $shipping_num_boxes);// - $total_items;
           if  ($ship_cost < 0) { $ship_cost = 0; };
           $methods[] = array('id' => 'INS',
                              'title' => MODULE_SHIPPING_FRL_INSURANCE,
                              'cost' => $ship_cost); //$shipping_cost_2 * $shipping_num_boxes);
         }
       }  

       if ($frl_cost_urg != '') {
         $frl_table_urg = split("[:,]" , $frl_cost_urg);

         for ($i=0; $i<sizeof($frl_table_urg); $i+=2) {
           if ($shipping_weight <= $frl_table_urg[$i]) {
             $shipping_urg = $frl_table_urg[$i+1];
             break;
           }
         }

         if ($shipping_urg == -1) {
           $shipping_cost = 0;
           $shipping_method = MODULE_SHIPPING_FRL_UNDEFINED_RATE;
         } else {
           $shipping_cost_3 = ($shipping_urg + MODULE_SHIPPING_FRL_HANDLING);
         }

         if ($shipping_urg != 0) {
           $ship_cost = 0;
      $total_items = 0;
           $total_items = $cart->count_contents();
           $ship_cost = ($shipping_cost_3 * $shipping_num_boxes);// - $total_items;
           if  ($ship_cost < 0) { $ship_cost = 0; };
           $methods[] = array('id' => 'URG',
                              'title' => MODULE_SHIPPING_FRL_URGENT,
                              'cost' =>  $ship_cost); //$shipping_cost_3 * $shipping_num_boxes);
         }
       }
       if ($frl_cost_urg_ins != '') {
         $frl_table_urg_ins = split("[:,]" , $frl_cost_urg_ins);

         for ($i=0; $i<sizeof($frl_table_urg_ins); $i+=2) {
           if ($shipping_weight <= $frl_table_urg_ins[$i]) {
             $shipping_urg_ins = $frl_table_urg_ins[$i+1];
             break;
           }
         }

         if ($shipping_urg_ins == -1) {
           $shipping_cost = 0;
           $shipping_method = MODULE_SHIPPING_FRL_UNDEFINED_RATE;
         } else {
           $shipping_cost_3 = ($shipping_urg_ins + MODULE_SHIPPING_FRL_HANDLING);
         }

         if ($shipping_urg_ins != 0) {
           $ship_cost = 0;
          $total_items = 0;
           $total_items = $cart->count_contents();
           $ship_cost = ($shipping_cost_3 * $shipping_num_boxes);// - $total_items;
           if  ($ship_cost < 0) { $ship_cost = 0; };
           $methods[] = array('id' => 'URGINS',
                              'title' => MODULE_SHIPPING_FRL_URGENT_INS,
                              'cost' =>  $ship_cost); //$shipping_cost_3 * $shipping_num_boxes);
         }
       }

     }

     $this->quotes = array('id' => $this->code,
                           'module' => $this->title . ' (' . $shipping_num_boxes . ' x ' . $shipping_weight . ' ' . MODULE_SHIPPING_FRL_TEXT_UNITS .')');
     $this->quotes['methods'] = $methods;

     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);

     if ($error == true) $this->quotes['error'] = MODULE_SHIPPING_FRL_INVALID_ZONE;

     if ( (tep_not_null($method)) && (isset($this->types[$method])) ) {

       for ($i=0; $i<sizeof($methods); $i++) {
         if ($method == $methods[$i]['id']) {
           $methodsc = array();
           $methodsc[] = array('id' => $methods[$i]['id'],
                               'title' => $methods[$i]['title'],
                               'cost' => $methods[$i]['cost']);
           break;
         }
       }
       $this->quotes['methods'] = $methodsc;
     }

     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_FRL_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 ('French PostOffice - Letter', 'MODULE_SHIPPING_FRL_STATUS', 'True', 'Do you want to offer the dispatch over the French post office for letters?', '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 ('Handling Fee', 'MODULE_SHIPPING_FRL_HANDLING', '0', 'Handling charge for this mode of shipment', '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', 'MODULE_SHIPPING_FRL_TAX_CLASS', '0', 'Select the VAT set for this mode of shipment.', '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 ('Zone', 'MODULE_SHIPPING_FRL_ZONE', '0', 'If you select a zone, this mode of shipment is offered only in this 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_FRL_SORT_ORDER', '0', 'Lowest one is first indicated.', '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 ('Enable Oversized', 'MODULE_SHIPPING_FRL_OVERSIZE', 'True', 'Does this method handle oversized items', '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 ('Tarifs for France', 'MODULE_SHIPPING_FRL_COUNTRIES_1', 'FR', 'France', '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 ('Tarifs for Zone FR for Free Shipping', 'MODULE_SHIPPING_FRL_COST_ECO_1', '3:1.00', 'Tarif Table for the France Zone in <b>\'ECO\'</b> up to 3 kg.', '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 ('Tarifs for Zone FR for Insurance', 'MODULE_SHIPPING_FRL_COST_INS_1', '0.02:3.10,0.05:4.00,0.1:4.50,0.25:5.10,0.5:5.90,1:6.80,2:8.00,3:8.80', 'Tarif Table for the France Zone in <b>\'INS\'</b> up to 1 kg.', '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 ('Tarifs for Zone FR for Express Collissimo', 'MODULE_SHIPPING_FRL_COST_URG_1', '0.5:5.50,1:6.5,2:7.00,3:8.00', 'Tarif Table for the France Zone in <b>\'URG\'</b> up to 3 kg.', '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 ('Tarifs for Zone FR for Express Collissimo + Ins.', 'MODULE_SHIPPING_FRL_COST_URG_INS_1', '0.5:8.50,1:9.50,2:10.00,3:11.00', 'Tarif Table for the France Zone in <b>\'URGINS\'</b> up to 3 kg.', '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 ('Tarifs for DOM', 'MODULE_SHIPPING_FRL_COUNTRIES_2', 'DOM', 'DOM', '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 ('Tarifs for DOM for Free Shipping', 'MODULE_SHIPPING_FRL_COST_ECO_2', '3:1.00', 'Tarif Table for the DOM Zone in <b>\'ECO\'</b> up to 3 kg.', '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 ('Tarifs for DOM for Insurance', 'MODULE_SHIPPING_FRL_COST_INS_2', '0.02:3.30,0.05:4.20,0.1:4.60,0.25:5.30,0.5:6.10,1:7.00,2:8.20,3:9.00', 'Tarif Table for the DOM Zone in <b>\'INS\'</b> up to 1 kg.', '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 ('Tarifs for DOM for Express Collissimo', 'MODULE_SHIPPING_FRL_COST_URG_2', '0.5:7.60, 1:11.40, 2:15.70, 3:20.00', 'Tarif Table for the DOM Zone in <b>\'URG\'</b> up to 3 kg.', '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 ('Tarifs for DOM for Express Collissimo + Ins.', 'MODULE_SHIPPING_FRL_COST_URG_INS_2', '0.5:10.70,1:12.60,2:13.10,3:14.10', 'Tarif Table for the DOM Zone in <b>\'URGINS\'</b> up to 3 kg.', '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 ('Tarifs for TOM', 'MODULE_SHIPPING_FRL_COUNTRIES_3', 'TOM', 'TOM', '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 ('Tarifs for TOM for Free Shipping', 'MODULE_SHIPPING_FRL_COST_ECO_3', '3:1.00', 'Tarif Table for the TOM Zone in <b>\'ECO\'</b> up to 3 kg.', '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 ('Tarifs for TOM for Insurance', 'MODULE_SHIPPING_FRL_COST_INS_3', '0.02:3.10,0.05:4.00,0.1:4.50,0.25:5.10,0.5:5.90,1:6.80,2:8.00,3:8.80', 'Tarif Table for the TOM Zone in <b>\'INS\'</b> up to 1 kg.', '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 ('Tarifs for TOM for Express Collissimo', 'MODULE_SHIPPING_FRL_COST_URG_3', '0.5:8.70, 1:13.90, 2:25.30, 3:36.70', 'Tarif Table for the TOM Zone in <b>\'URG\'</b> up to 3 kg.', '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 ('Tarifs for TOM for Express Collissimo + Ins.', 'MODULE_SHIPPING_FRL_COST_URG_INS_3', '0.5:11.80,1:18.00,2:28.40,3:39.80', 'Tarif Table for the TOM Zone in <b>\'URGINS\'</b> up to 3 kg.', '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 ('Tarifs for Zone A - Europe de l\'ouest et CEE, Gibraltar,SanMarin, Vatican', 'MODULE_SHIPPING_FRL_COUNTRIES_4', 'NO,MC,GB,DE,IE,ES,IT,BE,PT,NL,AT,AD,CY,DK,EE,FI,GI,GR,HU,LV,LT,LU,MT,VA,PL,CZ,SK,SI,SE,SM', 'Liste des pays faisant partie de la zone A', '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 ('Tarifs for Zone A for Free Shipping', 'MODULE_SHIPPING_FRL_COST_ECO_4', '2:1.00', 'Tarif Table for the Zone A in <b>\'ECO\'</b> up to 2 kg.', '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 ('Tarifs for Zone A for Insurance', 'MODULE_SHIPPING_FRL_COST_INS_4', '0.02:4.55,0.04:5.00,0.06:5.20,0.08:5.45,0.1:5.75,0.2:7.5,0.3:9.40,0.4:10.00,0.5:10.30,0.75:12.00,1:13.00,1.25:14.00,1.5:15.00,1.75:16.00,2:16.50', 'Tarif Table for the Zone A in <b>\'INS\'</b> up to 2 kg.', '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 ('Tarifs for Zone A for Express Collissimo', 'MODULE_SHIPPING_FRL_COST_URG_4', '1:14.80,2:16.30,3:19.30', 'Tarif Table for the Zone A in <b>\'URG\'</b> up to 3 kg.', '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 ('Tarifs for Zone A for Express Collissimo + Ins', 'MODULE_SHIPPING_FRL_COST_URG_INS_4', '1:18.80,2:20.30,3:23.30', 'Tarif Table for the Zone A in <b>\'URGINS\'</b> up to 3 kg.', '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 ('Tarifs for Zone B - Pays Zone B - Europe de l\'Est, Maroc, Tunisie, Algérie', 'MODULE_SHIPPING_FRL_COUNTRIES_5', 'AL,AM,AZ,BY,BG,HR,YU,RU,GE,MD,MK,RO,TR,UA,DZ,MA,TN', 'Comma separated list of two character ISO country codes that are part of Zone B.', '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 ('Tarifs for Zone B for Parcel ECO', 'MODULE_SHIPPING_FRL_COST_ECO_5', '0.02:0.75,0.04:1.60,0.06:1.95,0.08:2.15,0.1:2.40,0.2:4.1,0.3:5.80,0.4:6.40,0.5:6.80,0.75:8.50,1:10.00,1.25:11.00,1.5:12.00,1.75:13.00,2:14.00,2.5:20.00,3:26.00', 'Tarif Table for Zone B, in <b>\'ECO\'</b> up to 3Kg Letter.', '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 ('Tarifs for Zone B for Parcel ECO + Ins', 'MODULE_SHIPPING_FRL_COST_INS_5', '0.02:4.75,0.04:5.60,0.06:5.95,0.08:6.15,0.1:6.40,0.2:8.1,0.3:9.80,0.4:10.40,0.5:10.80,0.75:12.50,1:14.00,1.25:15.00,1.5:16.00,1.75:17.00,2:18.00,2.5:24.00,3:30.00', 'Tarif Table for Zone B, in <b>\'INS\'</b> up to 3Kg Letter.', '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 ('Tarifs for Zone B for Express Collissimo', 'MODULE_SHIPPING_FRL_COST_URG_5', '1:17.80,2:19.60,3:23.80', 'Tarif Table for Zone B, in <b>\'INS\'</b> up to 3Kg.', '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 ('Tarifs for Zone B for Express Collissimo + Ins', 'MODULE_SHIPPING_FRL_COST_URG_INS_5', '1:21.80,2:23.60,3:27.80', 'Tarif Table for Zone B, in <b>\'URGINS\'</b> up to 3Kg.', '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 ('Tarifs for Zone C - Afrique,USA,Proche-Orient,Moyen-Orient', 'MODULE_SHIPPING_FRL_COUNTRIES_6', 'ZA,AO,BJ,BW,BF,BI,CM,CV,CF,KM,CG,CI,DJ,ET,GA,GM,GH,GN,GW,MU,KE,LS,LR,LY,MG,MW,MR,YT,MZ,NA,NE,NG,RW,EH,ST,SH,SC,SN,SL,SO,SD,SZ,TZ,TD,TG,ZR,ZM,ZW,US,CA,SA,BH,BN,EG,AE,ER,IQ,IR,IL,JO,KW,LB,OM,QA,SY,YE', 'Comma separated list of two character ISO country codes that are part of Zone C.', '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 ('Tarifs for Zone C for Parcel ECO', 'MODULE_SHIPPING_FRL_COST_ECO_6', '0.02:0.90,0.04:1.80,0.06:2.40,0.08:2.80,0.1:3.20,0.2:5.2,0.3:7.20,0.4:8.20,0.5:8.60,0.75:10.50,1:12.80,1.25:15.80,1.5:18.10,1.75:19.50,2:20.50', 'Tarif Table for Zone C, in <b>\'ECO\'</b> up to 3Kg Letter.', '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 ('Tarifs for Zone C for Parcel ECO + Ins', 'MODULE_SHIPPING_FRL_COST_INS_6', '0.02:4.90,0.04:5.80,0.06:6.40,0.08:6.80,0.1:7.20,0.2:9.2,0.3:11.20,0.4:12.20,0.5:12.60,0.75:14.50,1:16.80,1.25:19.80,1.5:22.10,1.75:23.50,2:24.50', 'Tarif Table for Zone C, in <b>\'INS\'</b> up to 3Kg Letter.', '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 ('Tarifs for Zone C for Express Collissimo', 'MODULE_SHIPPING_FRL_COST_URG_6', '1:20.50,2:27.00,3:36.00', 'Tarif Table for Zone C, in <b>\'INS\'</b> up to 3Kg.', '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 ('Tarifs for Zone C for Express Collissimo + Ins', 'MODULE_SHIPPING_FRL_COST_URG_INS_6', '1:24.50,2:31.00,3:40.00', 'Tarif Table for Zone C, in <b>\'URGINS\'</b> up to 3Kg.', '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 ('Tarifs for Zone D - Autres destinations', 'MODULE_SHIPPING_FRL_COUNTRIES_7', 'OTHERS', 'Comma separated list of two character ISO country codes that are part of Zone C.', '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 ('Tarifs for Zone D for Parcel ECO', 'MODULE_SHIPPING_FRL_COST_ECO_7', '0.02:0.90,0.04:1.80,0.06:2.40,0.08:2.80,0.1:3.20,0.2:5.2,0.3:7.20,0.4:8.20,0.5:8.60,0.75:10.50,1:12.80,1.25:15.80,1.5:18.10,1.75:19.50,2:20.50', 'Tarif Table for Zone C, in <b>\'ECO\'</b> up to 3Kg Letter.', '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 ('Tarifs for Zone D for Parcel ECO + Ins', 'MODULE_SHIPPING_FRL_COST_INS_7', '0.02:4.90,0.04:5.80,0.06:6.40,0.08:6.80,0.1:7.20,0.2:9.2,0.3:11.20,0.4:12.20,0.5:12.60,0.75:14.50,1:16.80,1.25:19.80,1.5:22.10,1.75:23.50,2:24.50', 'Tarif Table for Zone C, in <b>\'INS\'</b> up to 3Kg Letter.', '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 ('Tarifs for Zone D for Express Collissimo', 'MODULE_SHIPPING_FRL_COST_URG_7', '1:23.70,2:35.70,3:47.70', 'Tarif Table for Zone C, in <b>\'INS\'</b> up to 3Kg.', '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 ('Tarifs for Zone D for Express Collissimo + Ins', 'MODULE_SHIPPING_FRL_COST_URG_INS_7', '1:27.70,2:39.70,3:51.70', 'Tarif Table for Zone C, in <b>\'URGINS\'</b> up to 3Kg.', '6', '0', now())");
   }

   function remove() {
     tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
   }

   function keys() {
     $keys = array('MODULE_SHIPPING_FRL_STATUS', 'MODULE_SHIPPING_FRL_HANDLING', 'MODULE_SHIPPING_FRL_TAX_CLASS', 'MODULE_SHIPPING_FRL_ZONE', 'MODULE_SHIPPING_FRL_SORT_ORDER', 'MODULE_SHIPPING_FRL_OVERSIZE');

     for ($i=1; $i <= $this->num_frl; $i++) {
       $keys[count($keys)] = 'MODULE_SHIPPING_FRL_COUNTRIES_' . $i;
       $keys[count($keys)] = 'MODULE_SHIPPING_FRL_COST_ECO_' . $i;
       $keys[count($keys)] = 'MODULE_SHIPPING_FRL_COST_INS_' . $i;
       $keys[count($keys)] = 'MODULE_SHIPPING_FRL_COST_URG_' . $i;
       $keys[count($keys)] = 'MODULE_SHIPPING_FRL_COST_URG_INS_' . $i;
     }

     return $keys;
   }
 }
?>


Le fichier de locaisation
CODE
<?php
/*
 $Id: letter.php,v 1.01 2003/02/18 03:33:00 Phocea $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2002 - 2003 osCommerce

 Released under the GNU General Public License
*/
/********************************************************************
* Copyright (C) 2002 - 2003 TheMedia, Dipl.-Ing Thomas Plänkers
*       http://www.themedia.at & http://www.oscommerce.at
*
*                    All rights reserved
*
* This program is free software licensed under the GNU General Public License (GPL).
*
*    This program is free software; you can redistribute it and/or modify
*    it under the terms of the GNU General Public License as published by
*    the Free Software Foundation; either version 2 of the License, or
*    (at your option) any later version.
*
*    This program is distributed in the hope that it will be useful,
*    but WITHOUT ANY WARRANTY; without even the implied warranty of
*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
*    GNU General Public License for more details.
*
*    You should have received a copy of the GNU General Public License
*    along with this program; if not, write to the Free Software
*    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
*    USA
*
*********************************************************************/

define('MODULE_SHIPPING_FRL_TEXT_TITLE', 'Colis de La Poste');
define('MODULE_SHIPPING_FRL_TEXT_DESCRIPTION', 'Colis de La Poste');
define('MODULE_SHIPPING_FRL_TEXT_WAY', 'Délivrer a');
define('MODULE_SHIPPING_FRL_TEXT_UNITS', 'kg');
define('MODULE_SHIPPING_FRL_INVALID_ZONE', 'Malheureusement nous ne pouvons pas délivrer dans ce pays');
define('MODULE_SHIPPING_FRL_INVALID_TYPE', 'Cette méthode de livraison ne s\'applique pas pour votre commande');
define('MODULE_SHIPPING_FRL_UNDEFINED_RATE', 'Le cout de livraison ne peuvent pas etre calculer pour le moment');
define('MODULE_SHIPPING_FRL_ECONOMY', 'Envoi économique, j+5 max');
define('MODULE_SHIPPING_FRL_INSURANCE', 'Envoi économique avec Assurance, j+5 max');
define('MODULE_SHIPPING_FRL_URGENT', 'Colissimo, j+3 max');
define('MODULE_SHIPPING_FRL_URGENT_INS', 'Colissimo avec Assurance, j+3 max');

?>


Et voila reste juste a configurer tout ca dans l admin. Au parametre "'Does this method handle oversized items'" repondre oui pour colis.php et non pour letter.php.

Faites aussi bien attention aux valeurs poid/tarif indiqeus de base. Je suis parti des tarifs lettre et colis de La Poste que j ai adapte selon les besoins de notre boutique (en y incluant les frais d emballage par exemple).

Notez aussi les lignes du style

CODE
           $ship_cost = ($shipping_cost_3 * $shipping_num_boxes);// - $total_items;


Le - $total_items mis en commentaire sert a offrir un rabais de 1Euro par article dans la commande. Cette ligne peut etre utiliser pour offrir un tarifs reduit a certain client, vous pourriez tres l utiliser pour offrir un rabais selon le montant de la commande ..libre a vous
Go to the top of the page
 
Phocea
posté 28 Aug 2005, 09:22
Message #9


Ceinture marron OSC
Icône de groupe

Groupe : Membres
Messages : 1448
Inscrit : 12-March 05
Lieu : Chuiche
Membre no 5120



Dernieres recommendations, je ne pense pas que ceci soit une solution clef en main pour la plupart entre vous.
Mes modules ont ete assez personalise pour nos besoins specifique, il vous faudra surement jouer avec les clef de configration dans chaque module.

Par contre le mecanisme pour verifier si un produit doit utiliser l envoi par lettre ou colis reste le meme.

Sur notre boutique, le resultat est le suivant:

Pour une commande ou il n y a QUE des produits non encombrant, le client se voit offert les options suivantes:

Colis de La Poste (1 x 0.37 kg)
- Envoi économique, j+5 max 0.00€
- Envoi économique avec Assurance, j+5 max 4.90€
- Colissimo, j+3 max 4.50€
- Colissimo avec Assurance, j+3 max 7.50€

Pour une commande avec au moins 1 produit encombrant:

Colis de La Poste (Large) (1 x 0.72 kg)
- Colis économique, j+5 max 3.50€
- Colis économique avec Assurance, j+5 max 7.50€
- Colissimo, j+2 max 4.50€
- Colissimo avec Assurance, j+2 max 7.50€

Ce ci explique pourquoi le module lettre s'appelle Colis de La Poste dans l admin et sur les options, car j ai choisi d'offrir le tarif lettre aux clients, mais ils peuvent toutefois choisir une option plus couteuse ou plus rapide si ils le souhaitent.

Pour info, depuis l installation de cette contribution, environ 70% des commandes sont passés en colissimo, meme lorsque le port tarif lettre est offert ...







Go to the top of the page
 
maxcdr
posté 11 Sep 2005, 13:48
Message #10


Ceinture verte OSC
Icône de groupe

Groupe : Membres
Messages : 754
Inscrit : 10-April 05
Lieu : Haute-Savoie
Membre no 5449



Salut,

J'ai encore une petite question blush.gif :
Comment faire pour imposer le colis aux destinations hors France métropolitaine et DOM ?
En gros :
1. Destination France métropolitaine ou DOM :
Produit A : tarif lettre
Produit B : tarif colis
2. Destinations autres :
Produit A : tarif colis
Produit B : tarif colis

Merci !


--------------------
Go to the top of the page
 
Phocea
posté 23 Sep 2005, 08:26
Message #11


Ceinture marron OSC
Icône de groupe

Groupe : Membres
Messages : 1448
Inscrit : 12-March 05
Lieu : Chuiche
Membre no 5120



Petit addendum a cette contrib.
Je me suis appercu que la tare que l on peut rentrer dans le menu de configuration n'etait pas tres apte a cohabite avec 2 methodes d'expedition, letter ou colis.

En effet, en mettant par exemple une tare de 0.350g, ceci correspond a peu pres au poid d'une boite pour un colis mais ne reflete pas vraiment le poid d'une enveloppe a bulle.
Il faut donc apporter les changements suivants:

Ajouter dans la base:

CODE
INSERT INTO `configuration` ( `configuration_id` , `configuration_title` , `configuration_key` , `configuration_value` , `configuration_description` , `configuration_group_id` , `sort_order` , `last_modified` , `date_added` , `use_function` , `set_function` )
VALUES (
'', 'Letter Tare Weight', 'SHIPPING_LETTER_WEIGHT', '0.150', 'What is the weight of typical packaging for letter shipping', '7', '5', NULL , '0000-00-00 00:00:00', NULL , NULL
);


Ceci rajoutera une cle de config, a vous de mettre le poid desire.

Ensuite dans includes/classes/shipping.php

Remplacer:

CODE
       if (SHIPPING_BOX_WEIGHT >= $shipping_weight*SHIPPING_BOX_PADDING/100) {
         $shipping_weight = $shipping_weight+SHIPPING_BOX_WEIGHT;
       } else {
         $shipping_weight = $shipping_weight + ($shipping_weight*SHIPPING_BOX_PADDING/100);
       }


Par

CODE
      $OversizedProducts = $cart->show_oversized();
        if ( $OversizedProducts == 0 ) {
$shipping_tare_weight = SHIPPING_LETTER_WEIGHT;
        } else {
$shipping_tare_weight = SHIPPING_BOX_WEIGHT;

        }
       if ($shipping_tare_weight >= $shipping_weight*SHIPPING_BOX_PADDING/100) {
         $shipping_weight = $shipping_weight+$shipping_tare_weight;
       } else {
         $shipping_weight = $shipping_weight + ($shipping_weight*SHIPPING_BOX_PADDING/100);
       }


Et voila, la bonne tare sera applique selon si des produits encombrant existe dans le panier
Go to the top of the page
 
xaglo
posté 23 Sep 2005, 08:41
Message #12


5eme dan OSC
Icône de groupe

Groupe : Administrateur
Messages : 14914
Inscrit : 22-November 02
Membre no 610



Merci Phocea pour ce boulot qui semble utile à plusieurs smile.gif

j'ai fait un peu de nettoyage dans ce post pour n'en garder que la moëlle... désolé pour les autres blush.gif

dernière remarque, pourquoi ne pas faire une contribution packagée et la mettre à disposition sur oscommerce.com??
http://www.oscommerce.com/community/contributions

Encore bravo pour tout ça wink.gif


--------------------
Ni Hot-line ni Service Après Vente, ces forums sont un lieu d'échanges.
Une Question? Rechercher / FAQ / docV1.pdf / docV2.pdf / contributions
Go to the top of the page
 
Phocea
posté 23 Sep 2005, 11:17
Message #13


Ceinture marron OSC
Icône de groupe

Groupe : Membres
Messages : 1448
Inscrit : 12-March 05
Lieu : Chuiche
Membre no 5120



Parce que je suis un peu feignant et beaucoup deborde wink.gif

Merci pour le nettyage c est vrai que ca devenait un peu le bordel
Go to the top of the page
 
maxcdr
posté 23 Sep 2005, 11:33
Message #14


Ceinture verte OSC
Icône de groupe

Groupe : Membres
Messages : 754
Inscrit : 10-April 05
Lieu : Haute-Savoie
Membre no 5449



Je joins mes applaudissements à ceux de Xaglo smile.gif


--------------------
Go to the top of the page
 
isaleelou
posté 11 Dec 2005, 15:58
Message #15


Ceinture blanche OSC
Icône de groupe

Groupe : Membres
Messages : 18
Inscrit : 20-August 05
Membre no 6843



bonjour a tous,

je redeterre un vieux post mais j'ai des petits ennuis et j'ai du mal a trouver la solution, j'ai pourtant cherché partout et j'ai tout essayé

bon je m'explique, j'ai suivi la methode donnée au dessus, j'ai tout bien trouvé et ça avais l'air de fonctionner mais quand j'arrive a la page du paiement ça me mets ça


"Fatal error: Cannot redeclare unserialize() in /data/members/paid/b/a/babytrocs.fr/htdocs/www/includes/classes/shopping_cart.php on line 374"


et voila ma ligne 374 "function unserialize ($broken) {"


est-ce que quelqu'un pourrait m'aider sachant que je suis nulle en code smile.gif

merci d'avance

isabelle



--------------------
OSCOMMERCE 2.2 fr + contrib : cap.v1.4 + Categories_Box_Bullet_and_line + crimages v1.1_1 + Modul_lettre1.1 + Monthly Installment Payments + osc_skins + Products_Sold_v1.2 + AdminMS2fr_V2.3 + NewCustomerEmail_v1.0
Go to the top of the page
 
mosaic
posté 11 Dec 2005, 16:13
Message #16


Ceinture noire OSC
Icône de groupe

Groupe : Modérateurs
Messages : 2908
Inscrit : 24-October 04
Lieu : Quimper ( Finistère )
Membre no 3567



il te dit que c'est au moins la deuxième fois qu'il trouve cette définition de fonctions et que de ce fait, ne sachant pas choisir, il bug

tu n'as probablement pas afficher tout ton message d'erreur qui doit ce continuer de cette façon :

previously declared on line ***

Concrètement, fais une recherche dans ce même fichier des mots suivants et tu verras que ta fonction est en double

function unserialize

Il te faudra ensuite supprimer la bonne en reprenant ton fichier ligne par ligne blush.gif


--------------------
#mosaic {
autodidacte: max;
derision: min;
ms3: never;
occupation: 9999;
latitude : 48;
longitude : -4.1;
competent: none !important;
}

documentation MS2 / F.A.Q. / Contribes FR / Contribes US
Go to the top of the page
 
isaleelou
posté 11 Dec 2005, 16:35
Message #17


Ceinture blanche OSC
Icône de groupe

Groupe : Membres
Messages : 18
Inscrit : 20-August 05
Membre no 6843



bonjour,

merci pour ta reponse,


j'ai fais comme tu m'as dis mais il ne le trouve qu'une seule fois

j'ai alors pris le parti de retirer la ligne de code, mais la il me trouve des erreurs partout :/

je crois que je vais tout retirer et chercher une autre methode pour rajouter un moyen de livraison par lettre et par colis smile.gif

merci quand meme et bonne fin de week end

isabelle


--------------------
OSCOMMERCE 2.2 fr + contrib : cap.v1.4 + Categories_Box_Bullet_and_line + crimages v1.1_1 + Modul_lettre1.1 + Monthly Installment Payments + osc_skins + Products_Sold_v1.2 + AdminMS2fr_V2.3 + NewCustomerEmail_v1.0
Go to the top of the page
 
LOLO84
posté 28 Dec 2005, 12:01
Message #18


Ceinture blanche+ OSC
Icône de groupe

Groupe : Membres
Messages : 23
Inscrit : 17-June 05
Membre no 6244



Jai essayer dinstallercette contribution mais kan je souhaite ajoiuter un produit jai le message derreur suivant :

1054 - Champ 'products_cost' inconnu dans field list

insert into products (products_quantity, products_model, products_price, products_cost, products_date_available, products_weight, products_oversize, products_status, products_tax_class_id, manufacturers_id, products_date_added) values ('1', '', '56', '', null, '9,900', '1', '1', '0', '', now())

[TEP STOP]

je ne vois pas d'ou ca peu venir

Merci
Go to the top of the page
 
fissiaux
posté 28 Dec 2005, 12:49
Message #19


5eme dan OSC
Icône de groupe

Groupe : Membres
Messages : 17048
Inscrit : 26-November 03
Lieu : Chez moi
Membre no 1669



C'est parce que la méthode ne s'applique pas sur une ms2 vierge, mais sur une ms2 déjà fournie de contribution. Là, la colonne prodcuts_cost est rajouté par cette contribution Margin Reports.

Donc soit tu l'installes aussi, soit tu adaptes la méthode à ton cas.
Go to the top of the page
 
LOLO84
posté 28 Dec 2005, 13:45
Message #20


Ceinture blanche+ OSC
Icône de groupe

Groupe : Membres
Messages : 23
Inscrit : 17-June 05
Membre no 6244



c'est bon lerreur est parti.

cependant jai une seconde erreur quand je souhite ajouter un objet que je viens de creer juste apres s'etre logger.

Fatal error: Call to undefined function: show_oversized() in d:\www\*******.com\htdocs\figurine\catalog\includes\modules\shipping\colis.php on line 53

merci
Go to the top of the page
 
isnogood
posté 28 Dec 2005, 14:12
Message #21


Ceinture noire OSC
Icône de groupe

Groupe : Membres
Messages : 2045
Inscrit : 22-February 04
Membre no 2022



Regarde le post du 28 aoû 2005, 08:52 : c'est l'étape 2
Go to the top of the page
 
LOLO84
posté 28 Dec 2005, 14:35
Message #22


Ceinture blanche+ OSC
Icône de groupe

Groupe : Membres
Messages : 23
Inscrit : 17-June 05
Membre no 6244



Je ne comprend pas ou lon doit mettre ces lignes de codes

____________________________________

Finalement ajouter avant ?>


CODE
function show_oversized() {
$this->calculate();

return $this->oversized;
}
_________________________________________

merci
Go to the top of the page
 
isnogood
posté 28 Dec 2005, 14:41
Message #23


Ceinture noire OSC
Icône de groupe

Groupe : Membres
Messages : 2045
Inscrit : 22-February 04
Membre no 2022



dans catalogue/includes/classes/shopping_cart.php, jsute avant le ?> final.
Go to the top of the page
 
LOLO84
posté 28 Dec 2005, 14:50
Message #24


Ceinture blanche+ OSC
Icône de groupe

Groupe : Membres
Messages : 23
Inscrit : 17-June 05
Membre no 6244



je lai mis a la place ke tu as dit mais maintenant g cette erreur kan je ouvre ma boutique

Parse error: parse error in d:\www\*****.com\htdocs\figurine\catalog\includes\classes\shopping_cart.php on line 388

g du zapper kelkechose mais ca metonne

g bien tt verifier
Go to the top of the page
 
isnogood
posté 28 Dec 2005, 14:51
Message #25


Ceinture noire OSC
Icône de groupe

Groupe : Membres
Messages : 2045
Inscrit : 22-February 04
Membre no 2022



Affiche nous le dernier fichier que tu viens de modifier....
Go to the top of the page
 

4 Pages V   1 2 3 > » 
Reply to this topicStart new topic
1 utilisateur(s) sur ce sujet (1 invité(s) et 0 utilisateur(s) anonyme(s))
0 membre(s) :

 



RSS Version bas débit Nous sommes le : 28th March 2024 - 21:51
Ce site est déclaré auprès de la commision Nationale
de l'Informatique et des Libertés (déclaration n°: 1043896)