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

Bienvenue invité ( Connexion | Inscription )

 
Reply to this topicStart new topic
> [resolu] problème TVA sur colissimo
Shibari_59
posté 15 Jul 2010, 14:07
Message #1


Ceinture orange+ OSC
Icône de groupe

Groupe : Membres
Messages : 400
Inscrit : 31-March 04
Membre no 2213



Bonjour
j'ai installé collissimo

adaptation Stéphane GUIBOUD-RIBAUD
xaglo

MAJ v1.4.2 by fram 05/10/2003
MAJ v1.5 by lepoissonrouge 19/06/2005
MAJ v1.5.2 by lepoissonrouge 20/11/2005
MAJ v1.5.2 by bacri 01/02/2007
MAJ V1.6 by THEROTH 19/04/2008
MAJ V1.7 by THEROTH 20/04/2008
MAJ V1.8 by Nekosign 05/03/2009

une fois paramétré avec une tva à 19.6 je me retrouve avec le probleme suivant
sur checkout_shipping.php le prix colissimo apparait HT et sur checkout_confirmation.php le prix colissimo apparait TTC
ce qui évidement est perturbant ...

voici le code de la page colissimo.php

Code
<?php
/*
  A partir de colissimoR1.php... Francois Pons

  The Exchange Project - Community Made Shopping!
  http://www.theexchangeproject.org

  Copyright (c) 2000,2001 The Exchange Project

  Released under the GNU General Public License

    adaptation Stéphane GUIBOUD-RIBAUD
               xaglo
              
    MAJ v1.4.2 by fram 05/10/2003    
    MAJ v1.5 by lepoissonrouge 19/06/2005
    MAJ v1.5.2 by lepoissonrouge 20/11/2005
    MAJ v1.5.2 by bacri 01/02/2007
    MAJ V1.6 by THEROTH 19/04/2008
    MAJ V1.7 by THEROTH 20/04/2008
    MAJ V1.8 by Nekosign 05/03/2009


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 . 'shipping_colissimo.gif';
      $this->tax_class = MODULE_SHIPPING_COLISSIMO_TAX_CLASS;
      $this->enabled = MODULE_SHIPPING_COLISSIMO_STATUS;
      $this->num_international = 4; //Nbr de zone International
// disable the module if the order only weight > 30
      global $PHP_SELF;
        if (basename($PHP_SELF) != FILENAME_MODULES) {
      global $cart , $order;
        if ($this->enabled == true) {
/*        $dest_country = $order->delivery['country']['iso_code_2'];
        if (($dest_country != 'FR') && ($dest_country != 'FX') && ($dest_country != 'GP') && ($dest_country != 'MQ') && ($dest_country != 'GF') && ($dest_country != 'RE') && ($dest_country != 'YT') && ($dest_country != 'PM')  && ($dest_country != 'NC') && ($dest_country != 'PF') && ($dest_country != 'WF') && ($dest_country != 'TF')) {
         $this->enabled = false;
        }*/
        if ($cart->show_weight() > '30') {
     $this->enabled = false;
        }
        }
        }
    }

// class methods
    function quote($method = '')
    {
      global $order, $cart, $shipping_weight;
      
      $dest_country = $order->delivery['country']['iso_code_2'];
      
    if (($dest_country == 'FR') OR ($dest_country == 'FX') OR ($dest_country == 'MC')) {
    
    
      $this->quotes = array('id' => $this->code,
                            'module' => MODULE_SHIPPING_COLISSIMO_TEXT_TITLE . ' NATIONAL (' . $shipping_weight .' Kg)');
   $methods = array();
  
      if (tep_not_null($this->icon))
    $this->quotes['icon'] = tep_image($this->icon, $this->title);


    $auto= constant('MODULE_SHIPPING_COLISSIMO_R1R5');
    $total = $cart->show_total();

    $cost = constant('MODULE_SHIPPING_COLISSIMO_NATIONAL');
    $cost1 = constant('MODULE_SHIPPING_COLISSIMOR1_NATIONAL');
    $cost2 = constant('MODULE_SHIPPING_COLISSIMOR2_NATIONAL');
    $cost3 = constant('MODULE_SHIPPING_COLISSIMOR3_NATIONAL');
    $cost4 = constant('MODULE_SHIPPING_COLISSIMOR4_NATIONAL');
    $cost5 = constant('MODULE_SHIPPING_COLISSIMOR5_NATIONAL');
    $table = split("[:,]" , $cost);
    $table1 = split("[:,]" , $cost1);
    $table2 = split("[:,]" , $cost2);
    $table3 = split("[:,]" , $cost3);
    $table4 = split("[:,]" , $cost4);
    $table5 = split("[:,]" , $cost5);

    $j="0";
    $k="0";
    for ($i = 0; $i < sizeof($table); $i+=2) {
      
    if ($shipping_weight > $table[$i])
      continue;
        if (($shipping_weight < $table[$i]) && ($j== '0')) {
            if($auto=="True"){
            
                if(($total<=50)&&($k=="0")){
                $methods[] = array('id' => "R1", 'title' => MODULE_SHIPPING_COLISSIMOR1_TEXT_TITLE, 'cost' => $table1[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                $k++;
                }elseif(($total>50) && ($total<=200)&&($k=="0")){
                $methods[] = array('id' => "R2", 'title' => MODULE_SHIPPING_COLISSIMOR2_TEXT_TITLE, 'cost' => $table2[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                $k++;
                }elseif(($total>200) && ($total<=400)&&($k=="0")){
                $methods[] = array('id' => "R3", 'title' => MODULE_SHIPPING_COLISSIMOR3_TEXT_TITLE, 'cost' => $table3[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                $k++;
                }elseif(($total>400) && ($total<=600)&&($k=="0")){
                $methods[] = array('id' => "R4", 'title' => MODULE_SHIPPING_COLISSIMOR4_TEXT_TITLE, 'cost' => $table4[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                $k++;
                }elseif(($total>600)&&($k=="0")){
                $methods[] = array('id' => "R5", 'title' => MODULE_SHIPPING_COLISSIMOR5_TEXT_TITLE, 'cost' => $table5[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                $k++;
                }
            }else{
                if ( $method == '' || $method == "R0" ) {
                $methods[] = array('id' => "R0", 'title' => MODULE_SHIPPING_COLISSIMOR_TEXT_TITLE, 'cost' => $table[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                }if ( $method == '' || $method == "R1" ) {
                $methods[] = array('id' => "R1", 'title' => MODULE_SHIPPING_COLISSIMOR1_TEXT_TITLE, 'cost' => $table1[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                }if ( $method == '' || $method == "R2" ) {
                $methods[] = array('id' => "R2", 'title' => MODULE_SHIPPING_COLISSIMOR2_TEXT_TITLE, 'cost' => $table2[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                }if ( $method == '' || $method == "R3" ) {
                $methods[] = array('id' => "R3", 'title' => MODULE_SHIPPING_COLISSIMOR3_TEXT_TITLE, 'cost' => $table3[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                }if ( $method == '' || $method == "R4" ) {
                $methods[] = array('id' => "R4", 'title' => MODULE_SHIPPING_COLISSIMOR4_TEXT_TITLE, 'cost' => $table4[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                }if ( $method == '' || $method == "R5" ) {
                $methods[] = array('id' => "R5", 'title' => MODULE_SHIPPING_COLISSIMOR5_TEXT_TITLE, 'cost' => $table5[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                }
                $j="2";
            }
        }

    }
      
      
    $this->quotes['methods'] = $methods;
    return $this->quotes;
    
    
    
    }elseif(($dest_country == 'GP') OR ($dest_country == 'MQ') OR ($dest_country == 'GF') OR ($dest_country == 'RE') OR ($dest_country == 'YT') OR ($dest_country == 'PM')) {
     if(constant('MODULE_SHIPPING_COLISSIMO_DOM_STATUS')=="True"){  
    
    
    $this->quotes = array('id' => $this->code,
                            'module' => MODULE_SHIPPING_COLISSIMO_TEXT_TITLE . ' DOM (' . $shipping_weight .' Kg)');
   $methods = array();
  
      if (tep_not_null($this->icon))
    $this->quotes['icon'] = tep_image($this->icon, $this->title);


    $auto= constant('MODULE_SHIPPING_COLISSIMO_R1R5');
    $total = $cart->show_total();

    $cost = constant('MODULE_SHIPPING_COLISSIMO_DOM');
    $cost1 = constant('MODULE_SHIPPING_COLISSIMOR1_DOM');
    $cost2 = constant('MODULE_SHIPPING_COLISSIMOR2_DOM');
    $cost3 = constant('MODULE_SHIPPING_COLISSIMOR3_DOM');
    $cost4 = constant('MODULE_SHIPPING_COLISSIMOR4_DOM');
    $cost5 = constant('MODULE_SHIPPING_COLISSIMOR5_DOM');
    $table = split("[:,]" , $cost);
    $table1 = split("[:,]" , $cost1);
    $table2 = split("[:,]" , $cost2);
    $table3 = split("[:,]" , $cost3);
    $table4 = split("[:,]" , $cost4);
    $table5 = split("[:,]" , $cost5);

    $j="0";
    $k="0";
    for ($i = 0; $i < sizeof($table); $i+=2) {
      
    if ($shipping_weight > $table[$i])
      continue;
        if (($shipping_weight < $table[$i]) && ($j== '0')) {
            if($auto=="True"){
            
                if(($total<=50)&&($k=="0")){
                $methods[] = array('id' => "DOMR1", 'title' => MODULE_SHIPPING_COLISSIMOR1_TEXT_TITLE, 'cost' => $table1[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                $k++;
                }elseif(($total>50) && ($total<=200)&&($k=="0")){
                $methods[] = array('id' => "DOMR2", 'title' => MODULE_SHIPPING_COLISSIMOR2_TEXT_TITLE, 'cost' => $table2[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                $k++;
                }elseif(($total>200) && ($total<=400)&&($k=="0")){
                $methods[] = array('id' => "DOMR3", 'title' => MODULE_SHIPPING_COLISSIMOR3_TEXT_TITLE, 'cost' => $table3[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                $k++;
                }elseif(($total>400) && ($total<=600)&&($k=="0")){
                $methods[] = array('id' => "DOMR4", 'title' => MODULE_SHIPPING_COLISSIMOR4_TEXT_TITLE, 'cost' => $table4[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                $k++;
                }elseif(($total>600)&&($k=="0")){
                $methods[] = array('id' => "DOMR5", 'title' => MODULE_SHIPPING_COLISSIMOR5_TEXT_TITLE, 'cost' => $table5[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                $k++;
                }
            }else{
                if ( $method == '' || $method == "DOMR0" ) {
                $methods[] = array('id' => "DOMR0", 'title' => MODULE_SHIPPING_COLISSIMOR_TEXT_TITLE, 'cost' => $table[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                }if ( $method == '' || $method == "DOMR1" ) {
                $methods[] = array('id' => "DOMR1", 'title' => MODULE_SHIPPING_COLISSIMOR1_TEXT_TITLE, 'cost' => $table1[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                }if ( $method == '' || $method == "DOMR2" ) {
                $methods[] = array('id' => "DOMR2", 'title' => MODULE_SHIPPING_COLISSIMOR2_TEXT_TITLE, 'cost' => $table2[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                }if ( $method == '' || $method == "DOMR3" ) {
                $methods[] = array('id' => "DOMR3", 'title' => MODULE_SHIPPING_COLISSIMOR3_TEXT_TITLE, 'cost' => $table3[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                }if ( $method == '' || $method == "DOMR4" ) {
                $methods[] = array('id' => "DOMR4", 'title' => MODULE_SHIPPING_COLISSIMOR4_TEXT_TITLE, 'cost' => $table4[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                }if ( $method == '' || $method == "DOMR5" ) {
                $methods[] = array('id' => "DOMR5", 'title' => MODULE_SHIPPING_COLISSIMOR5_TEXT_TITLE, 'cost' => $table5[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                }
                $j="2";
            }
        }

    }
      
      
    $this->quotes['methods'] = $methods;
    return $this->quotes;
    
    }
    
    }elseif(($dest_country == 'NC') OR ($dest_country == 'PF') OR ($dest_country == 'WF') OR ($dest_country == 'TF')) {
    
    if(constant('MODULE_SHIPPING_COLISSIMO_TOM_STATUS')=="True"){
    
    $this->quotes = array('id' => $this->code,
                            'module' => MODULE_SHIPPING_COLISSIMO_TEXT_TITLE . ' TOM (' . $shipping_weight .' Kg)');
   $methods = array();
  
      if (tep_not_null($this->icon))
    $this->quotes['icon'] = tep_image($this->icon, $this->title);


    $auto= constant('MODULE_SHIPPING_COLISSIMO_R1R5');
    $total = $cart->show_total();

    $cost = constant('MODULE_SHIPPING_COLISSIMO_TOM');
    $cost1 = constant('MODULE_SHIPPING_COLISSIMOR1_TOM');
    $cost2 = constant('MODULE_SHIPPING_COLISSIMOR2_TOM');
    $cost3 = constant('MODULE_SHIPPING_COLISSIMOR3_TOM');
    $cost4 = constant('MODULE_SHIPPING_COLISSIMOR4_TOM');
    $cost5 = constant('MODULE_SHIPPING_COLISSIMOR5_TOM');
    $table = split("[:,]" , $cost);
    $table1 = split("[:,]" , $cost1);
    $table2 = split("[:,]" , $cost2);
    $table3 = split("[:,]" , $cost3);
    $table4 = split("[:,]" , $cost4);
    $table5 = split("[:,]" , $cost5);

    $j="0";
    $k="0";
    for ($i = 0; $i < sizeof($table); $i+=2) {
      
    if ($shipping_weight > $table[$i])
      continue;
        if (($shipping_weight < $table[$i]) && ($j== '0')) {
            if($auto=="True"){
            
                if(($total<=50)&&($k=="0")){
                $methods[] = array('id' => "TOMR1", 'title' => MODULE_SHIPPING_COLISSIMOR1_TEXT_TITLE, 'cost' => $table1[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                $k++;
                }elseif(($total>50) && ($total<=200)&&($k=="0")){
                $methods[] = array('id' => "TOMR2", 'title' => MODULE_SHIPPING_COLISSIMOR2_TEXT_TITLE, 'cost' => $table2[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                $k++;
                }elseif(($total>200) && ($total<=400)&&($k=="0")){
                $methods[] = array('id' => "TOMR3", 'title' => MODULE_SHIPPING_COLISSIMOR3_TEXT_TITLE, 'cost' => $table3[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                $k++;
                }elseif(($total>400) && ($total<=600)&&($k=="0")){
                $methods[] = array('id' => "TOMR4", 'title' => MODULE_SHIPPING_COLISSIMOR4_TEXT_TITLE, 'cost' => $table4[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                $k++;
                }elseif(($total>600)&&($k=="0")){
                $methods[] = array('id' => "TOMR5", 'title' => MODULE_SHIPPING_COLISSIMOR5_TEXT_TITLE, 'cost' => $table5[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                $k++;
                }
            }else{
                if ( $method == '' || $method == "TOMR0" ) {
                $methods[] = array('id' => "TOMR0", 'title' => MODULE_SHIPPING_COLISSIMOR_TEXT_TITLE, 'cost' => $table[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                }if ( $method == '' || $method == "TOMR1" ) {
                $methods[] = array('id' => "TOMR1", 'title' => MODULE_SHIPPING_COLISSIMOR1_TEXT_TITLE, 'cost' => $table1[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                }if ( $method == '' || $method == "TOMR2" ) {
                $methods[] = array('id' => "TOMR2", 'title' => MODULE_SHIPPING_COLISSIMOR2_TEXT_TITLE, 'cost' => $table2[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                }if ( $method == '' || $method == "TOMR3" ) {
                $methods[] = array('id' => "TOMR3", 'title' => MODULE_SHIPPING_COLISSIMOR3_TEXT_TITLE, 'cost' => $table3[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                }if ( $method == '' || $method == "TOMR4" ) {
                $methods[] = array('id' => "TOMR4", 'title' => MODULE_SHIPPING_COLISSIMOR4_TEXT_TITLE, 'cost' => $table4[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                }if ( $method == '' || $method == "TOMR5" ) {
                $methods[] = array('id' => "TOMR5", 'title' => MODULE_SHIPPING_COLISSIMOR5_TEXT_TITLE, 'cost' => $table5[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                }
                $j="2";
            }
        }

    }
      
      
    $this->quotes['methods'] = $methods;
    return $this->quotes;
    }
    
    }elseif(constant('MODULE_SHIPPING_COLISSIMO_INT_STATUS')=="True"){
    
    $this->icon = DIR_WS_ICONS . 'shipping_colissimoINT.gif';
    $this->quotes = array('id'      => $this->code,
                            'module'  => MODULE_SHIPPING_COLISSIMO_TEXT_TITLE . ' International (' . $shipping_weight .' Kg)',
                            'methods' => array());

      if (tep_not_null($this->icon))
    $this->quotes['icon'] = tep_image($this->icon, $this->title);

      if ($this->tax_class > 0)
        $this->quotes['tax'] = tep_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);

      $dest_country = $order->delivery['country']['iso_code_2'];
      $dest_zone = 0;
      for ($i = 1; $i <= $this->num_international; $i ++) {
    $countries_table = constant('MODULE_SHIPPING_COLISSIMO_INT_COUNTRIES_' . $i);
    $country = split("[, ]", $countries_table);
    if ( in_array($dest_country, $country ) ) {
      $dest_zone = $i;
      break;
    }
      }
      if ($dest_zone == 0) {
    $this->quotes['error'] = MODULE_SHIPPING_COLISSIMO_INT_INVALID_ZONE;
    return $this->quotes;
      }

      $table = split("[:,]" , constant('MODULE_SHIPPING_COLISSIMO_INT_COST_' . $dest_zone));
      $cost = -1;
      for ($i = 0, $n = sizeof($table); $i < $n; $i+=2) {
    if ($shipping_weight <= $table[$i]) {
      $cost = $table[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING + SHIPPING_HANDLING;
      break;
    }
      }

      if ($cost == -1) {
    $this->quotes['error'] = MODULE_SHIPPING_COLISSIMO_INT_UNDEFINED_RATE;
    return $this->quotes;
      }

      $this->quotes['methods'][] = array('id'    => $this->code,
                     'title' => MODULE_SHIPPING_COLISSIMO_INT_TEXT_WAY . ' ' . $order->delivery['country']['title'],
                     'cost'  => $cost + MODULE_SHIPPING_COLISSIMO_HANDLING + SHIPPING_HANDLING);

      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 ('Activer Module Colissimo', 'MODULE_SHIPPING_COLISSIMO_STATUS', 'True', 'Activer / Désactiver Colissimo sans perdre les valeurs changés', '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 ('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 ('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())");
      tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Colissimo', 'MODULE_SHIPPING_COLISSIMO_NATIONAL', '0.500:5.50, 1:6.70, 2:7.65, 3:8.60, 5:10.50, 7:12.40, 10:15.25, 15:17.25, 30:23.25', 'Tarif TTC Colissimo sans assurance', '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 R1', 'MODULE_SHIPPING_COLISSIMOR1_NATIONAL', '0.500:7.80, 1:9.00, 2:9.95, 3:10.90, 5:12.80, 7:14.70, 10:17.55, 15:19.55, 30:25.55', 'Tarif TTC Colissimo R1.', '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 R2', 'MODULE_SHIPPING_COLISSIMOR2_NATIONAL', '0.500:8.70, 1:9.90, 2:10.85, 3:11.80, 5:13.70, 7:15.60, 10:18.45, 15:20.45, 30:26.45', 'Tarif TTC Colissimo R2', '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 R3', 'MODULE_SHIPPING_COLISSIMOR3_NATIONAL', '0.500:9.90, 1:11.10, 2:12.05, 3:13.00, 5:14.90, 7:16.80, 10:19.65, 15:21.65, 30:27.65', 'Tarif TTC Colissimo R3', '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 R4', 'MODULE_SHIPPING_COLISSIMOR4_NATIONAL', '0.500:11.10, 1:12.30, 2:13.25, 3:14.20, 5:16.10, 7:18.00, 10:20.85, 15:22.85, 30:28.85', 'Tarif TTC Colissimo R4', '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 R5', 'MODULE_SHIPPING_COLISSIMOR5_NATIONAL', '0.500:12.30, 1:13.50, 2:14.45, 3:15.40, 5:17.30, 7:19.20, 10:22.05, 15:24.05, 30:30.05', 'Tarif TTC Colissimo R5', '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 ('Activer Colissimo DOM', 'MODULE_SHIPPING_COLISSIMO_DOM_STATUS', 'True', 'Activer / Désactiver Colissimo dans les DOM', '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 DOM', 'MODULE_SHIPPING_COLISSIMO_DOM', '0.500:8.35, 1:12.55, 2:17.15, 3:21.75, 4:26.35, 5:30.95, 6:35.55, 7:40.15, 8:44.75, 9:49.35, 10:53.95, 15:76.95, 20:99.95, 25:122.95, 30:145.95', 'Tarif TTC Colissimo DOM sans assurance', '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 DOM R1', 'MODULE_SHIPPING_COLISSIMOR1_DOM', '0.500:10.65, 1:14.85, 2:19.45, 3:24.05, 4:28.65, 5:33.25, 6:37.85, 7:42.45, 8:47.05, 9:51.65, 10:56.25, 15:79.25, 20:102.25, 25:125.25, 30:148.25', 'Tarif TTC Colissimo DOM R1', '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 DOM R2', 'MODULE_SHIPPING_COLISSIMOR2_DOM', '0.500:11.55, 1:15.75, 2:20.35, 3:24.95, 4:29.55, 5:34.15, 6:38.75, 7:43.35, 8:47.95, 9:52.55, 10:57.15, 15:80.15, 20:103.14, 25:126.15, 30:149.15', 'Tarif TTC Colissimo DOM R2', '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 DOM R3', 'MODULE_SHIPPING_COLISSIMOR3_DOM', '0.500:12.75, 1:16.95, 2:21.55, 3:26.15, 4:30.75, 5:35.35, 6:39.95, 7:44.55, 8:49.15, 9:53.75, 10:58.35, 15:81.35, 20:104.35, 25:127.35, 30:150.35', 'Tarif TTC Colissimo DOM R3', '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 DOM R4', 'MODULE_SHIPPING_COLISSIMOR4_DOM', '0.500:13.95, 1:18.15, 2:22.75, 3:27.35, 4:31.95, 5:36.55, 6:41.15, 7:45.75, 8:50.35, 9:54.95, 10:59.55, 15:82.55, 20:105.55, 25:128.55, 30:151.55', 'Tarif TTC Colissimo DOM R4', '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 DOM R5', 'MODULE_SHIPPING_COLISSIMOR5_DOM', '0.500:15.15, 1:19.35, 2:23.95, 3:28.55, 4:33.15, 5:37.75, 6:42.35, 7:46.95, 8:51.55, 9:56.15, 10:60.75, 15:83.75, 20:106.75, 25:129.75, 30:152.75', 'Tarif TTC Colissimo DOM R5', '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 ('Activer Colissimo TOM', 'MODULE_SHIPPING_COLISSIMO_TOM_STATUS', 'True', 'Activer / Désactiver Colissimo dans les TOM', '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 TOM', 'MODULE_SHIPPING_COLISSIMO_TOM', '0.500:10.00, 1:15.00, 2:26.50, 3:38.00, 4:49.50, 5:61.00, 6:72.50, 7:84.00, 8:95.50, 9:107.00, 10:118.50, 15:176.50, 20:234.50, 25:292.50, 30:350.50', 'Tarif TTC Colissimo TOM sans assurance', '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 TOM R1', 'MODULE_SHIPPING_COLISSIMOR1_TOM', '0.500:12.30, 1:17.30, 2:28.80, 3:40.30, 4:51.80, 5:63.30, 6:74.80, 7:86.30, 8:97.80, 9:109.30, 10:120.80, 15:178.80, 20:236.80, 25:294.80, 30:352.80', 'Tarif TTC Colissimo TOM R1', '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 TOM R2', 'MODULE_SHIPPING_COLISSIMOR2_TOM', '0.500:13.20, 1:18.20, 2:29.70, 3:41.20, 4:52.70, 5:64.20, 6:75.70, 7:87.20, 8:98.70, 9:110.20, 10:121.70, 15:179.70, 20:237.70, 25:295.70, 30:353.70', 'Tarif TTC Colissimo TOM R2', '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 TOM R3', 'MODULE_SHIPPING_COLISSIMOR3_TOM', '0.500:14.40, 1:19.40, 2:30.90, 3:42.40, 4:53.90, 5:65.40, 6:76.90, 7:88.40, 8:99.90, 9:111.40, 10:122.90, 15:180.90, 20:238.90, 25:296.90, 30:354.90', 'Tarif TTC Colissimo TOM R3', '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 TOM R4', 'MODULE_SHIPPING_COLISSIMOR4_TOM', '0.500:15.60, 1:20.60, 2:32.10, 3:43.60, 4:55.10, 5:66.60, 6:78.10, 7:89.60, 8:101.10, 9:112.60, 10:124.10, 15:182.10, 20:240.10, 25:298.10, 30:356.10', 'Tarif TTC Colissimo TOM R4', '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 TOM R5', 'MODULE_SHIPPING_COLISSIMOR5_TOM', '0.500:16.80, 1:21.80, 2:33.30, 3:44.80, 4:56.30, 5:67.80, 6:79.30, 7:90.80, 8:102.30, 9:113.80, 10:125.30, 15:183.30, 20:241.30, 25:299.30, 30:357.30', 'Tarif TTC Colissimo TOM R5', '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 ('Activer Colissimo International', 'MODULE_SHIPPING_COLISSIMO_INT_STATUS', 'True', 'Activer / Désactiver Colissimo dans International', '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 Zone A (pays)', 'MODULE_SHIPPING_COLISSIMO_INT_COUNTRIES_1', 'AT, AD, AX, BE, BG, BL, CH, CY, CZ, DE, DK, ES, EE, FI, GB, GF, GI, GP, GR, HU, IE, IT, LT, LU, LV, MF, MQ, MT, NL, PL, PT, RE, RO, SE, SI, SK', 'Insérer une virgule entre 2 codes ISO de pays qui font partie de la mme zone', '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 Zone A (poids:tarifs)', 'MODULE_SHIPPING_COLISSIMO_INT_COST_1', '1:15.90, 2:17.45, 3:21.05, 4:24.65, 5:28.25, 6:31.85, 7:35.45, 8:39.05, 9:42.65, 10:46.25, 15:53.25, 20:60.25, 25:67.25, 30:74.25', 'Tarifs Colissimo international pour les destinations 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 ('Colissimo Zone B (pays)', 'MODULE_SHIPPING_COLISSIMO_INT_COUNTRIES_2', 'AL, DZ, BY, BA, BG, HR, CZ', 'Insérer une virgule entre 2 codes ISO de pays qui font partie de la même zone', '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 Zone B (poids:tarifs)', 'MODULE_SHIPPING_COLISSIMO_INT_COST_2', '1:19.20, 2:21.10, 3:25.50, 4:29.90, 5:34.30, 6:38.70, 7:43.10, 8:47.50, 9:51.90, 10:56.30, 15:66.40, 20:76.50, 25:86.60, 30:96.70', 'Tarifs Colissimo international pour les destinations de la 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 ('Colissimo Zone C (pays)', 'MODULE_SHIPPING_COLISSIMO_INT_COUNTRIES_3', 'AF, AO, AI, AG, AM, AZ, BJ, BM, BW, BF, BI, CM, CA, CV, CF, TD, CG, CI, CY, CJ, US, UM', 'Insérer une virgule entre 2 codes ISO de pays qui font partie de la même zone', '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 Zone C (poids:tarifs)', 'MODULE_SHIPPING_COLISSIMO_INT_COST_3', '1:22.10, 2:29.50, 3:38.70, 4:47.90, 5:57.10, 6:66.30, 7:75.50, 8:84.70, 9:93.90, 10:103.10, 15:126.10, 20:149.10, 25:172.10, 30:195.10', 'Tarifs Colissimo international pour les destinations de la 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 ('Colissimo Zone D (pays)', 'MODULE_SHIPPING_COLISSIMO_INT_COUNTRIES_4', 'AS, AQ, AR, AW, AU, BS, BH, BD, BB, BZ, BT, BO, BV, BR, IO, BN, KH, KY, CL, CN, CX, CC, CO, KM, CK, CR, CU, DO', 'Insérer une virgule entre 2 codes ISO de pays qui font partie de la même zone', '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 Zone D (poids:tarifs)', 'MODULE_SHIPPING_COLISSIMO_INT_COST_4', '1:24.40, 2:36.60, 3:48.80, 4:61.00, 5:73.20, 6:85.40, 7:97.60, 8:109.80, 9:122.00, 10:134.20, 15:158.60, 20:183.00, 25:231.80, 30:280.60', 'Tarifs Colissimo international pour les destinations de la Zone D. ', '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 ('Selection Automatique du R1 à R5', 'MODULE_SHIPPING_COLISSIMO_R1R5', 'True', 'Selon le montant du panier, il choisit le bon recommandé', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', 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_HANDLING',
        'MODULE_SHIPPING_COLISSIMO_TAX_CLASS',
        'MODULE_SHIPPING_COLISSIMO_R1R5',
        'MODULE_SHIPPING_COLISSIMO_NATIONAL',
        'MODULE_SHIPPING_COLISSIMOR1_NATIONAL',
        'MODULE_SHIPPING_COLISSIMOR2_NATIONAL',
        'MODULE_SHIPPING_COLISSIMOR3_NATIONAL',
        'MODULE_SHIPPING_COLISSIMOR4_NATIONAL',
        'MODULE_SHIPPING_COLISSIMOR5_NATIONAL',
        'MODULE_SHIPPING_COLISSIMO_DOM_STATUS',
        'MODULE_SHIPPING_COLISSIMO_DOM',
        'MODULE_SHIPPING_COLISSIMOR1_DOM',
        'MODULE_SHIPPING_COLISSIMOR2_DOM',
        'MODULE_SHIPPING_COLISSIMOR3_DOM',
        'MODULE_SHIPPING_COLISSIMOR4_DOM',
        'MODULE_SHIPPING_COLISSIMOR5_DOM',
        'MODULE_SHIPPING_COLISSIMO_TOM_STATUS',
        'MODULE_SHIPPING_COLISSIMO_TOM',
        'MODULE_SHIPPING_COLISSIMOR1_TOM',
        'MODULE_SHIPPING_COLISSIMOR2_TOM',
        'MODULE_SHIPPING_COLISSIMOR3_TOM',
        'MODULE_SHIPPING_COLISSIMOR4_TOM',
        'MODULE_SHIPPING_COLISSIMOR5_TOM',
        'MODULE_SHIPPING_COLISSIMO_INT_STATUS',
        'MODULE_SHIPPING_COLISSIMO_INT_COUNTRIES_1',
        'MODULE_SHIPPING_COLISSIMO_INT_COST_1',
        'MODULE_SHIPPING_COLISSIMO_INT_COUNTRIES_2',
        'MODULE_SHIPPING_COLISSIMO_INT_COST_2',
        'MODULE_SHIPPING_COLISSIMO_INT_COUNTRIES_3',
        'MODULE_SHIPPING_COLISSIMO_INT_COST_3',
        'MODULE_SHIPPING_COLISSIMO_INT_COUNTRIES_4',
        'MODULE_SHIPPING_COLISSIMO_INT_COST_4',
        'MODULE_SHIPPING_COLISSIMO_SORT_ORDER',);
    }
  }
?>


Merci par avance pour votre aide

Ce message a été modifié par Shibari_59 - 28 Aug 2010, 20:19.


--------------------

Bonne journée à vous
Go to the top of the page
 
chti_poupon
posté 16 Jul 2010, 21:36
Message #2


Ceinture orange+ OSC
Icône de groupe

Groupe : Membres
Messages : 456
Inscrit : 9-September 08
Lieu : Faches-Thumesnil
Membre no 22915



Bonsoir !
Pour Colissimo, il y a du neuf (cf forum) et qui marche. Juste les tarif à mettre au goût du jour (et R1,R2,R3).
Ses références vite fait:
Code
  French Colissimo Shipping module version 20090320.
  This module has been adapted to fit in osCommerce 2.2 RC1-FR.

  Copyright © 2009 Philippe BLAIN <pblain@NOSPAMfree.fr>.

Bon Code !!
Chti poupon
Go to the top of the page
 
Shibari_59
posté 28 Jul 2010, 09:18
Message #3


Ceinture orange+ OSC
Icône de groupe

Groupe : Membres
Messages : 400
Inscrit : 31-March 04
Membre no 2213



Bonjour chti_poupon
merci
mais cela ne change rien, j'ai essayé colissimo 2010 meme probleme

je suis toujours à la recherche d'une solution


--------------------

Bonne journée à vous
Go to the top of the page
 
chti_poupon
posté 30 Jul 2010, 18:28
Message #4


Ceinture orange+ OSC
Icône de groupe

Groupe : Membres
Messages : 456
Inscrit : 9-September 08
Lieu : Faches-Thumesnil
Membre no 22915



Bonsoir!
idea.gif Vérifier que le checkout_shipping.php utilisé contient bien tep_add_tax dans ces lignes:
Code
                  <td class="main" width="75%">
                     <?php echo $quotes[$i]['methods'][$j]['title']; ?>
                   </td>
                                 <?php if ( ($n > 1) || ($n2 > 1) ) { ?>
                   <td class="main">
                     <?php echo $currencies->format(tep_add_tax($quotes[$i]['methods'][$j]['cost'], (isset($quotes[$i]['tax']) ? $quotes[$i]['tax'] : 0))); ?>
                   </td>
                   <td class="main" align="right">
                     <?php echo tep_draw_radio_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'], $checked); ?>
                   </td>
                               <?php } else { ?>
                   <td class="main" align="right" colspan="2">
                     <?php echo $currencies->format(tep_add_tax($quotes[$i]['methods'][$j]['cost'], $quotes[$i]['tax'])) . tep_draw_hidden_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id']); ?>
                   </td>
                               <?php } ?>

Sinon, tous tes modules "parlent" HT sur cette page excl.gif

arrow.gif Voir aussi la FAQ de XAGLO sur la TVA qui doit SCRUPULEUSEMENT être suivie.

Une Belle Journée !
Chti poupon

Ce message a été modifié par chti_poupon - 30 Jul 2010, 18:29.
Go to the top of the page
 
Shibari_59
posté 27 Aug 2010, 13:50
Message #5


Ceinture orange+ OSC
Icône de groupe

Groupe : Membres
Messages : 400
Inscrit : 31-March 04
Membre no 2213



La fonction y est bien ....
mais je viens de découvrir qq chose de pour le moins curieux ...
les frais s'affiche ht comme je l'ai expliqué mais ....
je change mon pays par exemple la belgique alors ... ils apparaissent correctemnt c'est à dire TTC
auriez vous une piste avec cette nouvelle info
merci pour votre aide


--------------------

Bonne journée à vous
Go to the top of the page
 
Shibari_59
posté 28 Aug 2010, 20:18
Message #6


Ceinture orange+ OSC
Icône de groupe

Groupe : Membres
Messages : 400
Inscrit : 31-March 04
Membre no 2213



Résolu
pour infos

Code
<?php
/*
  A partir de colissimoR1.php... Francois Pons

  The Exchange Project - Community Made Shopping!
  http://www.theexchangeproject.org

  Copyright (c) 2000,2001 The Exchange Project

  Released under the GNU General Public License

    adaptation Stéphane GUIBOUD-RIBAUD <devteam@e-network.fr>
               xaglo <xaglo@free.fr>
              
    MAJ v1.4.2 by fram 05/10/2003    
    MAJ v1.5 by lepoissonrouge 19/06/2005
    MAJ v1.5.2 by lepoissonrouge 20/11/2005
    MAJ v1.5.2 by bacri 01/02/2007
    MAJ V1.6 by THEROTH 19/04/2008
    MAJ V1.7 by THEROTH 20/04/2008
    MAJ V1.8 by Nekosign 05/03/2009


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 . 'shipping_colissimo.gif';
      $this->tax_class = MODULE_SHIPPING_COLISSIMO_TAX_CLASS;
      $this->enabled = MODULE_SHIPPING_COLISSIMO_STATUS;
      $this->num_international = 4; //Nbr de zone International
// disable the module if the order only weight > 30
      global $PHP_SELF;
        if (basename($PHP_SELF) != FILENAME_MODULES) {
      global $cart , $order;
        if ($this->enabled == true) {
/*        $dest_country = $order->delivery['country']['iso_code_2'];
        if (($dest_country != 'FR') && ($dest_country != 'FX') && ($dest_country != 'GP') && ($dest_country != 'MQ') && ($dest_country != 'GF') && ($dest_country != 'RE') && ($dest_country != 'YT') && ($dest_country != 'PM')  && ($dest_country != 'NC') && ($dest_country != 'PF') && ($dest_country != 'WF') && ($dest_country != 'TF')) {
         $this->enabled = false;
        }*/
        if ($cart->show_weight() > '30') {
     $this->enabled = false;
        }
        }
        }
    }

// class methods
    function quote($method = '')
    {
      global $order, $cart, $shipping_weight;
      
      $dest_country = $order->delivery['country']['iso_code_2'];
      
    if (($dest_country == 'FR') OR ($dest_country == 'FX') OR ($dest_country == 'MC')) {
    
    
      $this->quotes = array('id' => $this->code,
                            'module' => MODULE_SHIPPING_COLISSIMO_TEXT_TITLE . ' NATIONAL (' . $shipping_weight .' Kg)');
   $methods = array();
  
      if (tep_not_null($this->icon))
    $this->quotes['icon'] = tep_image($this->icon, $this->title);


    $auto= constant('MODULE_SHIPPING_COLISSIMO_R1R5');
    $total = $cart->show_total();

    $cost = constant('MODULE_SHIPPING_COLISSIMO_NATIONAL');
    $cost1 = constant('MODULE_SHIPPING_COLISSIMOR1_NATIONAL');
    $cost2 = constant('MODULE_SHIPPING_COLISSIMOR2_NATIONAL');
    $cost3 = constant('MODULE_SHIPPING_COLISSIMOR3_NATIONAL');
    $cost4 = constant('MODULE_SHIPPING_COLISSIMOR4_NATIONAL');
    $cost5 = constant('MODULE_SHIPPING_COLISSIMOR5_NATIONAL');
    $table = split("[:,]" , $cost);
    $table1 = split("[:,]" , $cost1);
    $table2 = split("[:,]" , $cost2);
    $table3 = split("[:,]" , $cost3);
    $table4 = split("[:,]" , $cost4);
    $table5 = split("[:,]" , $cost5);

    $j="0";
    $k="0";
    for ($i = 0; $i < sizeof($table); $i+=2) {
      
    if ($shipping_weight > $table[$i])
      continue;
        if (($shipping_weight < $table[$i]) && ($j== '0')) {
            if($auto=="True"){
            
                if(($total<=50)&&($k=="0")){
                $methods[] = array('id' => "R1", 'title' => MODULE_SHIPPING_COLISSIMOR1_TEXT_TITLE, 'cost' => $table1[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                $k++;
                }elseif(($total>50) && ($total<=200)&&($k=="0")){
                $methods[] = array('id' => "R2", 'title' => MODULE_SHIPPING_COLISSIMOR2_TEXT_TITLE, 'cost' => $table2[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                $k++;
                }elseif(($total>200) && ($total<=400)&&($k=="0")){
                $methods[] = array('id' => "R3", 'title' => MODULE_SHIPPING_COLISSIMOR3_TEXT_TITLE, 'cost' => $table3[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                $k++;
                }elseif(($total>400) && ($total<=600)&&($k=="0")){
                $methods[] = array('id' => "R4", 'title' => MODULE_SHIPPING_COLISSIMOR4_TEXT_TITLE, 'cost' => $table4[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                $k++;
                }elseif(($total>600)&&($k=="0")){
                $methods[] = array('id' => "R5", 'title' => MODULE_SHIPPING_COLISSIMOR5_TEXT_TITLE, 'cost' => $table5[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                $k++;
                }
            }else{
                if ( $method == '' || $method == "R0" ) {
                $methods[] = array('id' => "R0", 'title' => MODULE_SHIPPING_COLISSIMOR_TEXT_TITLE, 'cost' => $table[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                }if ( $method == '' || $method == "R1" ) {
                $methods[] = array('id' => "R1", 'title' => MODULE_SHIPPING_COLISSIMOR1_TEXT_TITLE, 'cost' => $table1[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                }if ( $method == '' || $method == "R2" ) {
                $methods[] = array('id' => "R2", 'title' => MODULE_SHIPPING_COLISSIMOR2_TEXT_TITLE, 'cost' => $table2[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                }if ( $method == '' || $method == "R3" ) {
                $methods[] = array('id' => "R3", 'title' => MODULE_SHIPPING_COLISSIMOR3_TEXT_TITLE, 'cost' => $table3[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                }if ( $method == '' || $method == "R4" ) {
                $methods[] = array('id' => "R4", 'title' => MODULE_SHIPPING_COLISSIMOR4_TEXT_TITLE, 'cost' => $table4[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                }if ( $method == '' || $method == "R5" ) {
                $methods[] = array('id' => "R5", 'title' => MODULE_SHIPPING_COLISSIMOR5_TEXT_TITLE, 'cost' => $table5[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                }
                $j="2";
            }
        }

    }
      
            if ($this->tax_class > 0)
        $this->quotes['tax'] = tep_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);    

    $this->quotes['methods'] = $methods;
    return $this->quotes;
    
    
    
    }elseif(($dest_country == 'GP') OR ($dest_country == 'MQ') OR ($dest_country == 'GF') OR ($dest_country == 'RE') OR ($dest_country == 'YT') OR ($dest_country == 'PM')) {
     if(constant('MODULE_SHIPPING_COLISSIMO_DOM_STATUS')=="True"){  
    
    
    $this->quotes = array('id' => $this->code,
                            'module' => MODULE_SHIPPING_COLISSIMO_TEXT_TITLE . ' DOM (' . $shipping_weight .' Kg)');
   $methods = array();
  
      if (tep_not_null($this->icon))
    $this->quotes['icon'] = tep_image($this->icon, $this->title);


    $auto= constant('MODULE_SHIPPING_COLISSIMO_R1R5');
    $total = $cart->show_total();

    $cost = constant('MODULE_SHIPPING_COLISSIMO_DOM');
    $cost1 = constant('MODULE_SHIPPING_COLISSIMOR1_DOM');
    $cost2 = constant('MODULE_SHIPPING_COLISSIMOR2_DOM');
    $cost3 = constant('MODULE_SHIPPING_COLISSIMOR3_DOM');
    $cost4 = constant('MODULE_SHIPPING_COLISSIMOR4_DOM');
    $cost5 = constant('MODULE_SHIPPING_COLISSIMOR5_DOM');
    $table = split("[:,]" , $cost);
    $table1 = split("[:,]" , $cost1);
    $table2 = split("[:,]" , $cost2);
    $table3 = split("[:,]" , $cost3);
    $table4 = split("[:,]" , $cost4);
    $table5 = split("[:,]" , $cost5);

    $j="0";
    $k="0";
    for ($i = 0; $i < sizeof($table); $i+=2) {
      
    if ($shipping_weight > $table[$i])
      continue;
        if (($shipping_weight < $table[$i]) && ($j== '0')) {
            if($auto=="True"){
            
                if(($total<=50)&&($k=="0")){
                $methods[] = array('id' => "DOMR1", 'title' => MODULE_SHIPPING_COLISSIMOR1_TEXT_TITLE, 'cost' => $table1[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                $k++;
                }elseif(($total>50) && ($total<=200)&&($k=="0")){
                $methods[] = array('id' => "DOMR2", 'title' => MODULE_SHIPPING_COLISSIMOR2_TEXT_TITLE, 'cost' => $table2[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                $k++;
                }elseif(($total>200) && ($total<=400)&&($k=="0")){
                $methods[] = array('id' => "DOMR3", 'title' => MODULE_SHIPPING_COLISSIMOR3_TEXT_TITLE, 'cost' => $table3[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                $k++;
                }elseif(($total>400) && ($total<=600)&&($k=="0")){
                $methods[] = array('id' => "DOMR4", 'title' => MODULE_SHIPPING_COLISSIMOR4_TEXT_TITLE, 'cost' => $table4[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                $k++;
                }elseif(($total>600)&&($k=="0")){
                $methods[] = array('id' => "DOMR5", 'title' => MODULE_SHIPPING_COLISSIMOR5_TEXT_TITLE, 'cost' => $table5[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                $k++;
                }
            }else{
                if ( $method == '' || $method == "DOMR0" ) {
                $methods[] = array('id' => "DOMR0", 'title' => MODULE_SHIPPING_COLISSIMOR_TEXT_TITLE, 'cost' => $table[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                }if ( $method == '' || $method == "DOMR1" ) {
                $methods[] = array('id' => "DOMR1", 'title' => MODULE_SHIPPING_COLISSIMOR1_TEXT_TITLE, 'cost' => $table1[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                }if ( $method == '' || $method == "DOMR2" ) {
                $methods[] = array('id' => "DOMR2", 'title' => MODULE_SHIPPING_COLISSIMOR2_TEXT_TITLE, 'cost' => $table2[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                }if ( $method == '' || $method == "DOMR3" ) {
                $methods[] = array('id' => "DOMR3", 'title' => MODULE_SHIPPING_COLISSIMOR3_TEXT_TITLE, 'cost' => $table3[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                }if ( $method == '' || $method == "DOMR4" ) {
                $methods[] = array('id' => "DOMR4", 'title' => MODULE_SHIPPING_COLISSIMOR4_TEXT_TITLE, 'cost' => $table4[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                }if ( $method == '' || $method == "DOMR5" ) {
                $methods[] = array('id' => "DOMR5", 'title' => MODULE_SHIPPING_COLISSIMOR5_TEXT_TITLE, 'cost' => $table5[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                }
                $j="2";
            }
        }

    }
      
             if ($this->tax_class > 0)
        $this->quotes['tax'] = tep_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);      
  
    $this->quotes['methods'] = $methods;
    return $this->quotes;
    
    }
    
    }elseif(($dest_country == 'NC') OR ($dest_country == 'PF') OR ($dest_country == 'WF') OR ($dest_country == 'TF')) {
    
    if(constant('MODULE_SHIPPING_COLISSIMO_TOM_STATUS')=="True"){
    
    $this->quotes = array('id' => $this->code,
                            'module' => MODULE_SHIPPING_COLISSIMO_TEXT_TITLE . ' TOM (' . $shipping_weight .' Kg)');
   $methods = array();
  
      if (tep_not_null($this->icon))
    $this->quotes['icon'] = tep_image($this->icon, $this->title);


    $auto= constant('MODULE_SHIPPING_COLISSIMO_R1R5');
    $total = $cart->show_total();

    $cost = constant('MODULE_SHIPPING_COLISSIMO_TOM');
    $cost1 = constant('MODULE_SHIPPING_COLISSIMOR1_TOM');
    $cost2 = constant('MODULE_SHIPPING_COLISSIMOR2_TOM');
    $cost3 = constant('MODULE_SHIPPING_COLISSIMOR3_TOM');
    $cost4 = constant('MODULE_SHIPPING_COLISSIMOR4_TOM');
    $cost5 = constant('MODULE_SHIPPING_COLISSIMOR5_TOM');
    $table = split("[:,]" , $cost);
    $table1 = split("[:,]" , $cost1);
    $table2 = split("[:,]" , $cost2);
    $table3 = split("[:,]" , $cost3);
    $table4 = split("[:,]" , $cost4);
    $table5 = split("[:,]" , $cost5);

    $j="0";
    $k="0";
    for ($i = 0; $i < sizeof($table); $i+=2) {
      
    if ($shipping_weight > $table[$i])
      continue;
        if (($shipping_weight < $table[$i]) && ($j== '0')) {
            if($auto=="True"){
            
                if(($total<=50)&&($k=="0")){
                $methods[] = array('id' => "TOMR1", 'title' => MODULE_SHIPPING_COLISSIMOR1_TEXT_TITLE, 'cost' => $table1[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                $k++;
                }elseif(($total>50) && ($total<=200)&&($k=="0")){
                $methods[] = array('id' => "TOMR2", 'title' => MODULE_SHIPPING_COLISSIMOR2_TEXT_TITLE, 'cost' => $table2[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                $k++;
                }elseif(($total>200) && ($total<=400)&&($k=="0")){
                $methods[] = array('id' => "TOMR3", 'title' => MODULE_SHIPPING_COLISSIMOR3_TEXT_TITLE, 'cost' => $table3[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                $k++;
                }elseif(($total>400) && ($total<=600)&&($k=="0")){
                $methods[] = array('id' => "TOMR4", 'title' => MODULE_SHIPPING_COLISSIMOR4_TEXT_TITLE, 'cost' => $table4[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                $k++;
                }elseif(($total>600)&&($k=="0")){
                $methods[] = array('id' => "TOMR5", 'title' => MODULE_SHIPPING_COLISSIMOR5_TEXT_TITLE, 'cost' => $table5[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                $k++;
                }
            }else{
                if ( $method == '' || $method == "TOMR0" ) {
                $methods[] = array('id' => "TOMR0", 'title' => MODULE_SHIPPING_COLISSIMOR_TEXT_TITLE, 'cost' => $table[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                }if ( $method == '' || $method == "TOMR1" ) {
                $methods[] = array('id' => "TOMR1", 'title' => MODULE_SHIPPING_COLISSIMOR1_TEXT_TITLE, 'cost' => $table1[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                }if ( $method == '' || $method == "TOMR2" ) {
                $methods[] = array('id' => "TOMR2", 'title' => MODULE_SHIPPING_COLISSIMOR2_TEXT_TITLE, 'cost' => $table2[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                }if ( $method == '' || $method == "TOMR3" ) {
                $methods[] = array('id' => "TOMR3", 'title' => MODULE_SHIPPING_COLISSIMOR3_TEXT_TITLE, 'cost' => $table3[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                }if ( $method == '' || $method == "TOMR4" ) {
                $methods[] = array('id' => "TOMR4", 'title' => MODULE_SHIPPING_COLISSIMOR4_TEXT_TITLE, 'cost' => $table4[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                }if ( $method == '' || $method == "TOMR5" ) {
                $methods[] = array('id' => "TOMR5", 'title' => MODULE_SHIPPING_COLISSIMOR5_TEXT_TITLE, 'cost' => $table5[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING);
                }
                $j="2";
            }
        }

    }
      
            if ($this->tax_class > 0)
        $this->quotes['tax'] = tep_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);        
  
    $this->quotes['methods'] = $methods;
    return $this->quotes;
    }
    
    }elseif(constant('MODULE_SHIPPING_COLISSIMO_INT_STATUS')=="True"){
    
    $this->icon = DIR_WS_ICONS . 'shipping_colissimoINT.gif';
    $this->quotes = array('id'      => $this->code,
                            'module'  => MODULE_SHIPPING_COLISSIMO_TEXT_TITLE . ' International (' . $shipping_weight .' Kg)',
                            'methods' => array());

      if (tep_not_null($this->icon))
    $this->quotes['icon'] = tep_image($this->icon, $this->title);

      if ($this->tax_class > 0)
        $this->quotes['tax'] = tep_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);

      $dest_country = $order->delivery['country']['iso_code_2'];
      $dest_zone = 0;
      for ($i = 1; $i <= $this->num_international; $i ++) {
    $countries_table = constant('MODULE_SHIPPING_COLISSIMO_INT_COUNTRIES_' . $i);
    $country = split("[, ]", $countries_table);
    if ( in_array($dest_country, $country ) ) {
      $dest_zone = $i;
      break;
    }
      }
      if ($dest_zone == 0) {
    $this->quotes['error'] = MODULE_SHIPPING_COLISSIMO_INT_INVALID_ZONE;
    return $this->quotes;
      }

      $table = split("[:,]" , constant('MODULE_SHIPPING_COLISSIMO_INT_COST_' . $dest_zone));
      $cost = -1;
      for ($i = 0, $n = sizeof($table); $i < $n; $i+=2) {
    if ($shipping_weight <= $table[$i]) {
      $cost = $table[$i+1] + MODULE_SHIPPING_COLISSIMO_HANDLING + SHIPPING_HANDLING;
      break;
    }
      }

      if ($cost == -1) {
    $this->quotes['error'] = MODULE_SHIPPING_COLISSIMO_INT_UNDEFINED_RATE;
    return $this->quotes;
      }

      $this->quotes['methods'][] = array('id'    => $this->code,
                     'title' => MODULE_SHIPPING_COLISSIMO_INT_TEXT_WAY . ' ' . $order->delivery['country']['title'],
                     'cost'  => $cost + MODULE_SHIPPING_COLISSIMO_HANDLING + SHIPPING_HANDLING);

      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 ('Activer Module Colissimo', 'MODULE_SHIPPING_COLISSIMO_STATUS', 'True', 'Activer / Désactiver Colissimo sans perdre les valeurs changés', '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 ('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 ('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())");
      tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Colissimo', 'MODULE_SHIPPING_COLISSIMO_NATIONAL', '0.500:5.50, 1:6.70, 2:7.65, 3:8.60, 5:10.50, 7:12.40, 10:15.25, 15:17.25, 30:23.25', 'Tarif TTC Colissimo sans assurance', '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 R1', 'MODULE_SHIPPING_COLISSIMOR1_NATIONAL', '0.500:7.80, 1:9.00, 2:9.95, 3:10.90, 5:12.80, 7:14.70, 10:17.55, 15:19.55, 30:25.55', 'Tarif TTC Colissimo R1.', '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 R2', 'MODULE_SHIPPING_COLISSIMOR2_NATIONAL', '0.500:8.70, 1:9.90, 2:10.85, 3:11.80, 5:13.70, 7:15.60, 10:18.45, 15:20.45, 30:26.45', 'Tarif TTC Colissimo R2', '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 R3', 'MODULE_SHIPPING_COLISSIMOR3_NATIONAL', '0.500:9.90, 1:11.10, 2:12.05, 3:13.00, 5:14.90, 7:16.80, 10:19.65, 15:21.65, 30:27.65', 'Tarif TTC Colissimo R3', '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 R4', 'MODULE_SHIPPING_COLISSIMOR4_NATIONAL', '0.500:11.10, 1:12.30, 2:13.25, 3:14.20, 5:16.10, 7:18.00, 10:20.85, 15:22.85, 30:28.85', 'Tarif TTC Colissimo R4', '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 R5', 'MODULE_SHIPPING_COLISSIMOR5_NATIONAL', '0.500:12.30, 1:13.50, 2:14.45, 3:15.40, 5:17.30, 7:19.20, 10:22.05, 15:24.05, 30:30.05', 'Tarif TTC Colissimo R5', '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 ('Activer Colissimo DOM', 'MODULE_SHIPPING_COLISSIMO_DOM_STATUS', 'True', 'Activer / Désactiver Colissimo dans les DOM', '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 DOM', 'MODULE_SHIPPING_COLISSIMO_DOM', '0.500:8.35, 1:12.55, 2:17.15, 3:21.75, 4:26.35, 5:30.95, 6:35.55, 7:40.15, 8:44.75, 9:49.35, 10:53.95, 15:76.95, 20:99.95, 25:122.95, 30:145.95', 'Tarif TTC Colissimo DOM sans assurance', '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 DOM R1', 'MODULE_SHIPPING_COLISSIMOR1_DOM', '0.500:10.65, 1:14.85, 2:19.45, 3:24.05, 4:28.65, 5:33.25, 6:37.85, 7:42.45, 8:47.05, 9:51.65, 10:56.25, 15:79.25, 20:102.25, 25:125.25, 30:148.25', 'Tarif TTC Colissimo DOM R1', '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 DOM R2', 'MODULE_SHIPPING_COLISSIMOR2_DOM', '0.500:11.55, 1:15.75, 2:20.35, 3:24.95, 4:29.55, 5:34.15, 6:38.75, 7:43.35, 8:47.95, 9:52.55, 10:57.15, 15:80.15, 20:103.14, 25:126.15, 30:149.15', 'Tarif TTC Colissimo DOM R2', '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 DOM R3', 'MODULE_SHIPPING_COLISSIMOR3_DOM', '0.500:12.75, 1:16.95, 2:21.55, 3:26.15, 4:30.75, 5:35.35, 6:39.95, 7:44.55, 8:49.15, 9:53.75, 10:58.35, 15:81.35, 20:104.35, 25:127.35, 30:150.35', 'Tarif TTC Colissimo DOM R3', '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 DOM R4', 'MODULE_SHIPPING_COLISSIMOR4_DOM', '0.500:13.95, 1:18.15, 2:22.75, 3:27.35, 4:31.95, 5:36.55, 6:41.15, 7:45.75, 8:50.35, 9:54.95, 10:59.55, 15:82.55, 20:105.55, 25:128.55, 30:151.55', 'Tarif TTC Colissimo DOM R4', '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 DOM R5', 'MODULE_SHIPPING_COLISSIMOR5_DOM', '0.500:15.15, 1:19.35, 2:23.95, 3:28.55, 4:33.15, 5:37.75, 6:42.35, 7:46.95, 8:51.55, 9:56.15, 10:60.75, 15:83.75, 20:106.75, 25:129.75, 30:152.75', 'Tarif TTC Colissimo DOM R5', '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 ('Activer Colissimo TOM', 'MODULE_SHIPPING_COLISSIMO_TOM_STATUS', 'True', 'Activer / Désactiver Colissimo dans les TOM', '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 TOM', 'MODULE_SHIPPING_COLISSIMO_TOM', '0.500:10.00, 1:15.00, 2:26.50, 3:38.00, 4:49.50, 5:61.00, 6:72.50, 7:84.00, 8:95.50, 9:107.00, 10:118.50, 15:176.50, 20:234.50, 25:292.50, 30:350.50', 'Tarif TTC Colissimo TOM sans assurance', '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 TOM R1', 'MODULE_SHIPPING_COLISSIMOR1_TOM', '0.500:12.30, 1:17.30, 2:28.80, 3:40.30, 4:51.80, 5:63.30, 6:74.80, 7:86.30, 8:97.80, 9:109.30, 10:120.80, 15:178.80, 20:236.80, 25:294.80, 30:352.80', 'Tarif TTC Colissimo TOM R1', '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 TOM R2', 'MODULE_SHIPPING_COLISSIMOR2_TOM', '0.500:13.20, 1:18.20, 2:29.70, 3:41.20, 4:52.70, 5:64.20, 6:75.70, 7:87.20, 8:98.70, 9:110.20, 10:121.70, 15:179.70, 20:237.70, 25:295.70, 30:353.70', 'Tarif TTC Colissimo TOM R2', '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 TOM R3', 'MODULE_SHIPPING_COLISSIMOR3_TOM', '0.500:14.40, 1:19.40, 2:30.90, 3:42.40, 4:53.90, 5:65.40, 6:76.90, 7:88.40, 8:99.90, 9:111.40, 10:122.90, 15:180.90, 20:238.90, 25:296.90, 30:354.90', 'Tarif TTC Colissimo TOM R3', '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 TOM R4', 'MODULE_SHIPPING_COLISSIMOR4_TOM', '0.500:15.60, 1:20.60, 2:32.10, 3:43.60, 4:55.10, 5:66.60, 6:78.10, 7:89.60, 8:101.10, 9:112.60, 10:124.10, 15:182.10, 20:240.10, 25:298.10, 30:356.10', 'Tarif TTC Colissimo TOM R4', '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 TOM R5', 'MODULE_SHIPPING_COLISSIMOR5_TOM', '0.500:16.80, 1:21.80, 2:33.30, 3:44.80, 4:56.30, 5:67.80, 6:79.30, 7:90.80, 8:102.30, 9:113.80, 10:125.30, 15:183.30, 20:241.30, 25:299.30, 30:357.30', 'Tarif TTC Colissimo TOM R5', '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 ('Activer Colissimo International', 'MODULE_SHIPPING_COLISSIMO_INT_STATUS', 'True', 'Activer / Désactiver Colissimo dans International', '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 Zone A (pays)', 'MODULE_SHIPPING_COLISSIMO_INT_COUNTRIES_1', 'AT, AD, AX, BE, BG, BL, CH, CY, CZ, DE, DK, ES, EE, FI, GB, GF, GI, GP, GR, HU, IE, IT, LT, LU, LV, MF, MQ, MT, NL, PL, PT, RE, RO, SE, SI, SK', 'Insérer une virgule entre 2 codes ISO de pays qui font partie de la mme zone', '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 Zone A (poids:tarifs)', 'MODULE_SHIPPING_COLISSIMO_INT_COST_1', '1:15.90, 2:17.45, 3:21.05, 4:24.65, 5:28.25, 6:31.85, 7:35.45, 8:39.05, 9:42.65, 10:46.25, 15:53.25, 20:60.25, 25:67.25, 30:74.25', 'Tarifs Colissimo international pour les destinations 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 ('Colissimo Zone B (pays)', 'MODULE_SHIPPING_COLISSIMO_INT_COUNTRIES_2', 'AL, DZ, BY, BA, BG, HR, CZ', 'Insérer une virgule entre 2 codes ISO de pays qui font partie de la même zone', '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 Zone B (poids:tarifs)', 'MODULE_SHIPPING_COLISSIMO_INT_COST_2', '1:19.20, 2:21.10, 3:25.50, 4:29.90, 5:34.30, 6:38.70, 7:43.10, 8:47.50, 9:51.90, 10:56.30, 15:66.40, 20:76.50, 25:86.60, 30:96.70', 'Tarifs Colissimo international pour les destinations de la 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 ('Colissimo Zone C (pays)', 'MODULE_SHIPPING_COLISSIMO_INT_COUNTRIES_3', 'AF, AO, AI, AG, AM, AZ, BJ, BM, BW, BF, BI, CM, CA, CV, CF, TD, CG, CI, CY, CJ, US, UM', 'Insérer une virgule entre 2 codes ISO de pays qui font partie de la même zone', '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 Zone C (poids:tarifs)', 'MODULE_SHIPPING_COLISSIMO_INT_COST_3', '1:22.10, 2:29.50, 3:38.70, 4:47.90, 5:57.10, 6:66.30, 7:75.50, 8:84.70, 9:93.90, 10:103.10, 15:126.10, 20:149.10, 25:172.10, 30:195.10', 'Tarifs Colissimo international pour les destinations de la 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 ('Colissimo Zone D (pays)', 'MODULE_SHIPPING_COLISSIMO_INT_COUNTRIES_4', 'AS, AQ, AR, AW, AU, BS, BH, BD, BB, BZ, BT, BO, BV, BR, IO, BN, KH, KY, CL, CN, CX, CC, CO, KM, CK, CR, CU, DO', 'Insérer une virgule entre 2 codes ISO de pays qui font partie de la même zone', '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 Zone D (poids:tarifs)', 'MODULE_SHIPPING_COLISSIMO_INT_COST_4', '1:24.40, 2:36.60, 3:48.80, 4:61.00, 5:73.20, 6:85.40, 7:97.60, 8:109.80, 9:122.00, 10:134.20, 15:158.60, 20:183.00, 25:231.80, 30:280.60', 'Tarifs Colissimo international pour les destinations de la Zone D. ', '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 ('Selection Automatique du R1 à R5', 'MODULE_SHIPPING_COLISSIMO_R1R5', 'True', 'Selon le montant du panier, il choisit le bon recommandé', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', 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_HANDLING',
        'MODULE_SHIPPING_COLISSIMO_TAX_CLASS',
        'MODULE_SHIPPING_COLISSIMO_R1R5',
        'MODULE_SHIPPING_COLISSIMO_NATIONAL',
        'MODULE_SHIPPING_COLISSIMOR1_NATIONAL',
        'MODULE_SHIPPING_COLISSIMOR2_NATIONAL',
        'MODULE_SHIPPING_COLISSIMOR3_NATIONAL',
        'MODULE_SHIPPING_COLISSIMOR4_NATIONAL',
        'MODULE_SHIPPING_COLISSIMOR5_NATIONAL',
        'MODULE_SHIPPING_COLISSIMO_DOM_STATUS',
        'MODULE_SHIPPING_COLISSIMO_DOM',
        'MODULE_SHIPPING_COLISSIMOR1_DOM',
        'MODULE_SHIPPING_COLISSIMOR2_DOM',
        'MODULE_SHIPPING_COLISSIMOR3_DOM',
        'MODULE_SHIPPING_COLISSIMOR4_DOM',
        'MODULE_SHIPPING_COLISSIMOR5_DOM',
        'MODULE_SHIPPING_COLISSIMO_TOM_STATUS',
        'MODULE_SHIPPING_COLISSIMO_TOM',
        'MODULE_SHIPPING_COLISSIMOR1_TOM',
        'MODULE_SHIPPING_COLISSIMOR2_TOM',
        'MODULE_SHIPPING_COLISSIMOR3_TOM',
        'MODULE_SHIPPING_COLISSIMOR4_TOM',
        'MODULE_SHIPPING_COLISSIMOR5_TOM',
        'MODULE_SHIPPING_COLISSIMO_INT_STATUS',
        'MODULE_SHIPPING_COLISSIMO_INT_COUNTRIES_1',
        'MODULE_SHIPPING_COLISSIMO_INT_COST_1',
        'MODULE_SHIPPING_COLISSIMO_INT_COUNTRIES_2',
        'MODULE_SHIPPING_COLISSIMO_INT_COST_2',
        'MODULE_SHIPPING_COLISSIMO_INT_COUNTRIES_3',
        'MODULE_SHIPPING_COLISSIMO_INT_COST_3',
        'MODULE_SHIPPING_COLISSIMO_INT_COUNTRIES_4',
        'MODULE_SHIPPING_COLISSIMO_INT_COST_4',
        'MODULE_SHIPPING_COLISSIMO_SORT_ORDER',);
    }
  }
?>


Merci à Olivier

Ce message a été modifié par Shibari_59 - 28 Aug 2010, 20:19.


--------------------

Bonne journée à vous
Go to the top of the page
 

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 : 10th September 2010 - 15:33
Ce site est déclaré auprès de la commision Nationale
de l'Informatique et des Libertés (déclaration n°: 1043896)