Version imprimable du sujet

Cliquez ici pour voir ce sujet dans son format original

Forum osCommerce-fr _ Edition Bootstrap OsC2.3 _ mondial relais

Écrit par : thiery 27 Jan 2020, 23:15

Bonjour, je travail sur le module de mondial relais (phoenix 1.0.4.3)
j'ai modifié pas mal de chose
j'ai un message au moment de vouloir installer le module

Code
Warning: Cannot modify header information - headers already sent by (output started at /home/*******/s****.com/includes/languages/french/modules/shipping/mondialrelay.php:1) in /home/*****/s********.com/pub2/includes/functions/general.php on line 48


mondialrelay.php ligne 1
Code
<?php
class mondialrelay{

    function log($teste)


general.php

Code
header('Location: ' . $url);


merci pour les infos,
à bientôt thierry

Écrit par : Bonbec 27 Jan 2020, 23:54

Bonsoir,
Il ne doit pas y avoir de class mondialrelay dans le fichier de langue, juste des define ...

Écrit par : thiery 28 Jan 2020, 14:10

Citation (Bonbec @ 27 Jan 2020, 23:54) *
Bonsoir,
Il ne doit pas y avoir de class mondialrelay dans le fichier de langue, juste des define ...



merci bonbec
oups erreur je n'avais pas les yeux en face des troues wink.gif

voici le fichier langue
Code
<?php
define('MODULE_SHIPPING_MONDIAL_RELAY_TEXT_TITLE', "Mondialrelay");
define('MODULE_SHIPPING_MONDIAL_RELAY_DESCRIPTION', "Attention le poids des articles doit &ecirc;tre entr&eacute; en kilogramme.<br/>La d&eacute;sinstalation de ce module r&eacute;tablira les valeurs par d&eacute;faut");
define('MODULE_SHIPPING_MONDIAL_RELAY_ERROR',"Erreur: Votre adresse livraison ne doit pas &ecirc;tre correcte.");
?>


donc l'erreur indiqué dans le fichier serait le
Citation
<?php




Je vais reprendre mes fichiers car des nouvelles erreurs sont apparues, je pense que les mises à jour faites n'ont pas dû passer sur le serveur


À bientôt thierry

Écrit par : thiery 28 Jan 2020, 16:06

re bonjour

donc voila pour le moment aucun message d’erreur

par contre dans l’installation il est indiqué de modifier catalog/admin/includes/boxes/customers.php
dans phœnix je n'ai que cela dans customers

Code
<?php
/*
  $Id$

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

  Copyright (c) 2019 osCommerce

  Released under the GNU General Public License
*/

  $cl_box_groups[] = array('heading' => BOX_HEADING_CUSTOMERS, 'apps' => array());


il y a certainement un autre endroit ou je dois faire la modification

idem pour le filename il n'existe plus, faut il faire la modification dans un autre fichier ?

sinon quand j'instal le module pas de message, par contre j'ai Ordre d'affichage qui reste vide
même en changeant l'ordre dans le module, pas de mise à jours, et rien ne s’affiche sur le site

j'ai peut être fait une bourde dans les fichiers voici celui de l'admin
Code
<?php
/*
  $Id$

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

  Copyright (c) 2010 osCommerce

  Released under the GNU General Public License
*/

  require('includes/application_top.php');

  require(DIR_WS_CLASSES . 'currencies.php');
  $currencies = new currencies();

  $orders_statuses = array();
  $orders_status_array = array();
  $orders_status_query = tep_db_query("select orders_status_id, orders_status_name from orders_status where language_id = '" . (int)$languages_id . "'");
  while ($orders_status = tep_db_fetch_array($orders_status_query)) {
    $orders_statuses[] = array('id' => $orders_status['orders_status_id'],
                               'text' => $orders_status['orders_status_name']);
    $orders_status_array[$orders_status['orders_status_id']] = $orders_status['orders_status_name'];
  }

  $action = (isset($_GET['action']) ? $_GET['action'] : '');

function accents($chaine)
    {
        $conversion = array("¥" => "Y", "µ" => "u", "À" => "A", "Á" => "A",
                "Â" => "A", "Ã" => "A", "Ä" => "A", "Å" => "A",
                "Æ" => "A", "Ç" => "C", "È" => "E", "É" => "E",
                "Ê" => "E", "Ë" => "E", "Ì" => "I", "Í" => "I",
                "Î" => "I", "Ï" => "I", "Ð" => "D", "Ñ" => "N",
                "Ò" => "O", "Ó" => "O", "Ô" => "O", "Õ" => "O",
                "Ö" => "O", "Ø" => "O", "Ù" => "U", "Ú" => "U",
                "Û" => "U", "Ü" => "U", "Ý" => "Y", "ß" => "s",
                "à" => "a", "á" => "a", "â" => "a", "ã" => "a",
                "ä" => "a", "å" => "a", "æ" => "a", "ç" => "c",
                "è" => "e", "é" => "e", "ê" => "e", "ë" => "e",
                "ì" => "i", "í" => "i", "î" => "i", "ï" => "i",
                "ð" => "o", "ñ" => "n", "ò" => "o", "ó" => "o",
                "ô" => "o", "õ" => "o", "ö" => "o", "ø" => "o",
                "ù" => "u", "ú" => "u", "û" => "u", "ü" => "u",
                "ý" => "y", "ÿ" => "y", "°" => "");
    
return strtr("$chaine", $conversion);
    }

  if (tep_not_null($action)) {
    switch ($action) {
      case 'update_order':
        $oID = tep_db_prepare_input($_GET['oID']);
        $status = tep_db_prepare_input($_POST['status']);
        $comments = tep_db_prepare_input($_POST['comments']);

        $order_updated = false;
        $check_status_query = tep_db_query("select customers_name, customers_email_address, orders_status, date_purchased from orders where orders_id = '" . (int)$oID . "'");
        $check_status = tep_db_fetch_array($check_status_query);

        if ( ($check_status['orders_status'] != $status) || tep_not_null($comments)) {
          tep_db_query("update orders set orders_status = '" . tep_db_input($status) . "', last_modified = now() where orders_id = '" . (int)$oID . "'");

          $customer_notified = '0';
          if (isset($_POST['notify']) && ($_POST['notify'] == 'on')) {
            $notify_comments = '';
            if (isset($_POST['notify_comments']) && ($_POST['notify_comments'] == 'on')) {
              $notify_comments = sprintf(EMAIL_TEXT_COMMENTS_UPDATE, $comments) . "\n\n";
            }

            $email = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_catalog_href_link('account_history_info.php', 'order_id=' . $oID, 'SSL') . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "\n\n" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]);

            tep_mail($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT, $email, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

            $customer_notified = '1';
          }

          tep_db_query("insert into orders_status_history (orders_id, orders_status_id, date_added, customer_notified, comments) values ('" . (int)$oID . "', '" . tep_db_input($status) . "', now(), '" . tep_db_input($customer_notified) . "', '" . tep_db_input($comments)  . "')");

          $order_updated = true;
        }

        if ($order_updated == true) {
         $messageStack->add_session(SUCCESS_ORDER_UPDATED, 'success');
        } else {
          $messageStack->add_session(WARNING_ORDER_NOT_UPDATED, 'warning');
        }

        tep_redirect(tep_href_link('mondialrelayadmin.php', tep_get_all_get_params(array('action')) . 'action=edit'));
        break;
      case 'deleteconfirm':
        $oID = tep_db_prepare_input($_GET['oID']);

        tep_remove_order($oID, $_POST['restock']);

        tep_redirect(tep_href_link('mondialrelayadmin.php', tep_get_all_get_params(array('oID', 'action'))));
        break;
      case 'cre':
        $oID = tep_db_prepare_input($_GET['oID']);
        
        $retourBD = tep_db_query("select configuration_key,configuration_value from configuration where `configuration_key` REGEXP 'MODULE_SHIPPING_MONDIAL_RELAY' OR `configuration_key` ='STORE_OWNER_EMAIL_ADDRESS' OR `configuration_key` ='SHIPPING_ORIGIN_COUNTRY' OR `configuration_key` = 'SHIPPING_BOX_WEIGHT'");
        // récuper les config du module
        while($i=tep_db_fetch_array($retourBD))
            $infoExpe[$i[configuration_key]]=$i[configuration_value];
        $adresseExp=str_split($infoExpe['MODULE_SHIPPING_MONDIAL_RELAY_EXPE_AD3'],32);
            
            
            
        $totalWeight=$infoExpe['SHIPPING_BOX_WEIGHT'];
        $retourBD = tep_db_query("SELECT p.products_weight,op.products_quantity FROM orders_products op INNER JOIN  products  p ON op.products_id = p.products_id WHERE op.orders_id=".$oID);
        // récupe le poid des produits pour calcul le total
        while($i=tep_db_fetch_array($retourBD))
            $totalWeight+=$i['products_weight']*$i['products_quantity'];


        $retourBD = tep_db_query("select countries_iso_code_2 AS code FROM countries WHERE countries_id=".$infoExpe['SHIPPING_ORIGIN_COUNTRY']);
        // récuper le code pays avec id pour expe
        $codePaysExpe = tep_db_fetch_array($retourBD);
        
        
        $retourBD = tep_db_query("select o.delivery_country,o.customers_telephone,o.customers_email_address, o.delivery_street_address, o.shipping_pointrelay, o.delivery_city, o.delivery_postcode, o.delivery_name, o.currency_value from orders o left join customers c on (o.customers_id = c.customers_id) where o.orders_id=".$oID);
        $infoDest = tep_db_fetch_array($retourBD);//récuper les info de la commande
        $adresseDest=str_split($infoDest['delivery_street_address'],32);
        
        
        $retourBD = tep_db_query("select countries_iso_code_2 AS code FROM countries WHERE countries_name='".$infoDest['delivery_country']."'");
        // récuper le code pays avec id pour expe
        $codePaysDest = tep_db_fetch_array($retourBD);
        
        $params = array('Enseigne'       => $infoExpe['MODULE_SHIPPING_MONDIAL_RELAY_ENSEIGNE']
                       ,'ModeCol'        => 'CCC'
                       ,'ModeLiv'        => '24R'
                       ,'Expe_Langage'   => trim($infoExpe['MODULE_SHIPPING_MONDIAL_RELAY_EXPE_PAYS'])
                       ,'Expe_Ad1'       => $infoExpe['MODULE_SHIPPING_MONDIAL_RELAY_EXPE_AD1']
                       ,'Expe_Ad3'       => $adresseExp[0]
                       ,'Expe_Ad4'       => $adresseExp[1]
                       ,'Expe_Ville'     => $infoExpe['MODULE_SHIPPING_MONDIAL_RELAY_Expe_EXPE_VILLE']
                       ,'Expe_CP'        => $infoExpe['MODULE_SHIPPING_MONDIAL_RELAY_Expe_EXPE_CP']
                       ,'Expe_Pays'      => trim($infoExpe['MODULE_SHIPPING_MONDIAL_RELAY_EXPE_PAYS'])
                       ,'Expe_Tel1'      => $infoExpe['MODULE_SHIPPING_MONDIAL_RELAY_EXPE_TEL1']
                       ,'Expe_Mail'      => $infoExpe['STORE_OWNER_EMAIL_ADDRESS']
                       ,'Dest_Langage'   => $codePaysDest['code']
                       ,'Dest_Ad1'       => accents($infoDest['delivery_name'])
                       ,'Dest_Ad3'       => accents($adresseDest[0])
                       ,'Dest_Ad4'       => accents($adresseDest[1])
                       ,'Dest_Ville'     => accents($infoDest['delivery_city'])
                       ,'Dest_CP'        => $infoDest['delivery_postcode']
                       ,'Dest_Pays'      => $codePaysDest['code']
                       ,'Dest_Tel1'      => $infoDest['customers_telephone']
                       ,'Dest_Mail'      => accents($infoDest['customers_email_address'])
                       ,'Poids'          => round($totalWeight*1000)
                       ,'NbColis'        => '1'
                       ,'CRT_Valeur'     => '0'
                       ,'LIV_Rel_Pays'   => substr($infoDest['shipping_pointrelay'],-2)
                       ,'LIV_Rel'        => substr($infoDest['shipping_pointrelay'],0,6));
        
        $code = implode("",$params);
        $code .= $infoExpe['MODULE_SHIPPING_MONDIAL_RELAY_CLE_PRIVEE'];
        //On le rajoute aux paramétres
        
        $params["Security"] = strtoupper(md5($code));
        // On se connecte
        $client = new SoapClient("http://www.mondialrelay.fr/WebService/Web_Services.asmx?WSDL");
                    
        //send request
        $expedition = $client->WSI2_CreationExpedition($params)->WSI2_CreationExpeditionResult;
        if($expedition->STAT != 0){
            echo $infoExpe['MODULE_SHIPPING_MONDIAL_RELAY_EXPE_PAYS'];
            echo $expedition->STAT;
        }else{
            tep_db_query("UPDATE orders SET shipping_traking = '" . $expedition->ExpeditionNum . "' WHERE  orders_id = '".$oID."'");
    
            tep_redirect(tep_href_link('mondialrelayadmin.php', tep_get_all_get_params(array('oID', 'action'))));
        }
        break;
      case 'imprim':
        $oID = tep_db_prepare_input($_GET['oID']);
        
        $retourBD = tep_db_query("SELECT shipping_traking AS traking FROM orders WHERE orders_id=".$oID);
        $traking = tep_db_fetch_array($retourBD);//récuper les info de la commande
        
        $retourBD = tep_db_query("SELECT configuration_value,configuration_key from configuration WHERE `configuration_key` ='MODULE_SHIPPING_MONDIAL_RELAY_CLE_PRIVEE' OR `configuration_key` ='MODULE_SHIPPING_MONDIAL_RELAY_ENSEIGNE'");
        // récuper les config du modul
        while($i=tep_db_fetch_array($retourBD))
            $infoExpe[$i[configuration_key]]=$i[configuration_value];
        
          // On met en place les paramêtres de la requête
        $params = array(
                       'Enseigne'       => $infoExpe['MODULE_SHIPPING_MONDIAL_RELAY_ENSEIGNE'],
                       'Expeditions'    => $traking['traking'],
                       'Langue'         => 'FR',
        );
        //On cr&eacute;e le code de s&eacute;curit&eacute;
        $code = implode("",$params);
        $code .= $infoExpe['MODULE_SHIPPING_MONDIAL_RELAY_CLE_PRIVEE'];
        
        //On le rajoute aux paramêtres
        $params["Security"] = strtoupper(md5($code));
        
        // On se connecte
        $client = new SoapClient("http://www.mondialrelay.fr/WebService/Web_Services.asmx?WSDL");
        
        // Et on effectue la requête
        $etiquette = $client->WSI2_GetEtiquettes($params)->WSI2_GetEtiquettesResult;
        if( $etiquette->STAT == 0 ){
            $url = 'http://www.mondialrelay.fr';
            if(MODULE_SHIPPING_MONDIAL_RELAY_FORMAT_PDF=='A5'){
                $url .= $etiquette->URL_PDF_A5;
            }else{
                $url .= $etiquette->URL_PDF_A4;
            }
            tep_redirect($url);
        }else{
            echo $etiquette->STAT;    
        }
        break;
    }
  }

  if (($action == 'edit') && isset($_GET['oID'])) {
    $oID = tep_db_prepare_input($_GET['oID']);

    $orders_query = tep_db_query("select orders_id from orders where orders_id = '" . (int)$oID . "'");
    $order_exists = true;
    if (!tep_db_num_rows($orders_query)) {
      $order_exists = false;
      $messageStack->add(sprintf(ERROR_ORDER_DOES_NOT_EXIST, $oID), 'error');
    }
  }

  include(DIR_WS_CLASSES . 'order.php');?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
<script type="text/javascript" src="includes/general.js"></script>
<style type="text/css"><!--
BODY { background: #ffffff; }
//--></style>
</head>
<body>
<?php require(DIR_WS_INCLUDES . 'header.php');
?>

<table border="0" width="100%" cellspacing="2" cellpadding="2">
  <tr>
    <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
    </table></td>
<!-- body_text //-->
    <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
      <tr>
        <td>
    <table border="0" width="100%" cellspacing="0" cellpadding="2">
      <tr>
        <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
            <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', 1, HEADING_IMAGE_HEIGHT); ?></td>
            <td align="right"><table border="0" width="100%" cellspacing="0" cellpadding="0">
              <tr><?php echo tep_draw_form('orders', 'mondialrelayadmin.php', '', 'get'); ?>
                <td class="smallText" align="right"><?php echo HEADING_TITLE_SEARCH . ' ' . tep_draw_input_field('oID', '', 'size="12"') . tep_draw_hidden_field('action', 'edit'); ?></td>
              </form></tr>
              <tr><?php echo tep_draw_form('status', 'mondialrelayadmin.php', '', 'get'); ?>
                <td class="smallText" align="right"><?php echo HEADING_TITLE_STATUS . ' ' . tep_draw_pull_down_menu('status', array_merge(array(array('id' => '', 'text' => TEXT_ALL_ORDERS)), $orders_statuses), '', 'onchange="this.form.submit();"'); ?></td>
            </form></tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2" >
              <tr class="dataTableHeadingRow">
                <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CUSTOMERS; ?></td>
                <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ORDER_TOTAL; ?></td>
                <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_DATE_PURCHASED; ?></td>
                <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_STATUS; ?></td>
                <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_SHIPPING_POINTRELAY; ?></td>
                <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_SHIPPING_CODE_TRAKING; ?></td>
                <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?>&nbsp;</td>
              </tr>
<?php
    if (isset($_GET['cID'])) {
      $cID = tep_db_prepare_input($_GET['cID']);
      $orders_query_raw = "select o.shipping_traking, o.shipping_pointrelay, o.orders_id, o.customers_name, o.customers_id, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from orders o left join orders_total ot on (o.orders_id = ot.orders_id), orders_status s where o.customers_id = '" . (int)$cID . "' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and ot.class = 'ot_total' and o.shipping_pointrelay IS NOT NULL order by orders_id DESC";
    } elseif (isset($_GET['status']) && is_numeric($_GET['status']) && ($_GET['status'] > 0)) {
      $status = tep_db_prepare_input($_GET['status']);
      $orders_query_raw = "select o.shipping_traking, o.shipping_pointrelay, o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from orders o left join orders_total ot on (o.orders_id = ot.orders_id), orders_status s where o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and s.orders_status_id = '" . (int)$status . "' and ot.class = 'ot_total' and o.shipping_pointrelay IS NOT NULL order by o.orders_id DESC";
    } else {
      $orders_query_raw = "select o.shipping_traking, o.shipping_pointrelay, o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from orders o left join orders_total ot on (o.orders_id = ot.orders_id), orders_status s where o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and ot.class = 'ot_total' and o.shipping_pointrelay IS NOT NULL order by o.orders_id DESC ";
    }
    $orders_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS, $orders_query_raw, $orders_query_numrows);
    $orders_query = tep_db_query($orders_query_raw);
    while ($orders = tep_db_fetch_array($orders_query)) {
    if ((!isset($_GET['oID']) || (isset($_GET['oID']) && ($_GET['oID'] == $orders['orders_id']))) && !isset($oInfo)) {
        $oInfo = new objectInfo($orders);
      }

      if (isset($oInfo) && is_object($oInfo) && ($orders['orders_id'] == $oInfo->orders_id)) {
        echo '              <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link('mondialrelayadmin.php', tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=edit') . '\'">' . "\n";
      } else {
        echo '              <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link('mondialrelayadmin.php', tep_get_all_get_params(array('oID')) . 'oID=' . $orders['orders_id']) . '\'">' . "\n";
      }
?>
                <td class="dataTableContent"><?php echo '<a href="' . tep_href_link('mondialrelayadmin.php', tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $orders['orders_id'] . '&action=edit') . '">' . tep_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . '</a>&nbsp;' . $orders['customers_name']; ?></td>
                <td class="dataTableContent" align="right"><?php echo strip_tags($orders['order_total']); ?></td>
                <td class="dataTableContent" align="center"><?php echo tep_datetime_short($orders['date_purchased']); ?></td>
                <td class="dataTableContent" align="right"><?php echo $orders['orders_status_name']; ?></td>
                <td class="dataTableContent" align="right"><?php echo $orders['shipping_pointrelay']; ?></td>
                <td class="dataTableContent" align="right"><?php echo $orders['shipping_traking']; ?></td>
                <td class="dataTableContent" align="right"><?php if (isset($oInfo) && is_object($oInfo) && ($orders['orders_id'] == $oInfo->orders_id)) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . tep_href_link('mondialrelayadmin.php', tep_get_all_get_params(array('oID')) . 'oID=' . $orders['orders_id']) . '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?>&nbsp;</td>
              </tr>
<?php
    }
?>
              <tr>
                <td colspan="5"><table border="0" width="100%" cellspacing="0" cellpadding="2">
                  <tr>
                    <td class="smallText" valign="top"><?php echo $orders_split->display_count($orders_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_ORDERS); ?></td>
                    <td class="smallText" align="right"><?php echo $orders_split->display_links($orders_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page'], tep_get_all_get_params(array('page', 'oID', 'action'))); ?></td>
                  </tr>
                </table></td>
              </tr>
            </table></td>
<?php
  $heading = array();
  $contents = array();

      if (isset($oInfo) && is_object($oInfo)) {
        $heading[] = array('text' => '<strong>[' . $oInfo->orders_id . ']&nbsp;&nbsp;' . tep_datetime_short($oInfo->date_purchased) . '</strong>');

        $contents[] = array('align' => 'center', 'text' => '<a href="' .tep_href_link('orders.php', tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=edit').'"> ' . tep_image_button('button_edit.gif', IMAGE_EDIT) . ' </a> <a href="' . tep_href_link('orders.php', tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=delete').'"> ' . tep_image_button('button_delete.gif', IMAGE_DELETE) . ' </a> ');
        if($oInfo->shipping_traking=='')
            $contents[] = array('align' => 'center', 'text' => '<a href="' .tep_href_link('mondialrelayadmin.php', tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=cre').'"> ' . tep_image_button('button_createmr.gif', IMAGE_CREATE) . ' </a> ');
        else
            $contents[] = array('align' => 'center', 'text' => '<a href="' .tep_href_link('mondialrelayadmin.php', tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=cre').'"> ' . tep_image_button('button_createmr.gif', IMAGE_CREATE) . ' </a> <a href="'  .tep_href_link('mondialrelayadmin.php', tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=imprim').'">' . tep_image_button('button_printmr.gif', IMAGE_PRINT) . '</a> ');
        $contents[] = array('align' => 'center', 'text' => '<a href="' .tep_href_link('orders_invoice.php', 'oID=' . $oInfo->orders_id).'"> ' . tep_image_button('button_invoice.gif', IMAGE_INVOICE) . ' </a> <a href="' .tep_href_link('orders_packingslip.php', 'oID=' . $oInfo->orders_id).'"> ' . tep_image_button('button_packingslip.gif', IMAGE_ORDERS_PACKINGSLIP) . ' </a> ');
        $contents[] = array('text' => '<br />' . TEXT_DATE_ORDER_CREATED . ' ' . tep_date_short($oInfo->date_purchased));
        if (tep_not_null($oInfo->last_modified)) $contents[] = array('text' => TEXT_DATE_ORDER_LAST_MODIFIED . ' ' . tep_date_short($oInfo->last_modified));
        $contents[] = array('text' => '<br />' . TEXT_INFO_PAYMENT_METHOD . ' '  . $oInfo->payment_method);
      }


  if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
    echo '            <td width="25%" valign="top">' . "\n";

    $box = new box;
    echo $box->infoBox($heading, $contents);

    echo '            </td>' . "\n";
  }
?>
          </tr>
        </table></td>
      </tr>

    </table></td>
<!-- body_text_eof //-->
  </tr>
</table>

<?php
  require(DIR_WS_INCLUDES . 'footer.php');
  require(DIR_WS_INCLUDES . 'application_bottom.php');
?>
</body></html>


celui catalog
Code
<?php

function accents($chaine)
    {
        $conversion = array("¥" => "Y", "µ" => "u", "À" => "A", "Á" => "A",
                "Â" => "A", "Ã" => "A", "Ä" => "A", "Å" => "A",
                "Æ" => "A", "Ç" => "C", "È" => "E", "É" => "E",
                "Ê" => "E", "Ë" => "E", "Ì" => "I", "Í" => "I",
                "Î" => "I", "Ï" => "I", "Ð" => "D", "Ñ" => "N",
                "Ò" => "O", "Ó" => "O", "Ô" => "O", "Õ" => "O",
                "Ö" => "O", "Ø" => "O", "Ù" => "U", "Ú" => "U",
                "Û" => "U", "Ü" => "U", "Ý" => "Y", "ß" => "s",
                "à" => "a", "á" => "a", "â" => "a", "ã" => "a",
                "ä" => "a", "å" => "a", "æ" => "a", "ç" => "c",
                "è" => "e", "é" => "e", "ê" => "e", "ë" => "e",
                "ì" => "i", "í" => "i", "î" => "i", "ï" => "i",
                "ð" => "o", "ñ" => "n", "ò" => "o", "ó" => "o",
                "ô" => "o", "õ" => "o", "ö" => "o", "ø" => "o",
                "ù" => "u", "ú" => "u", "û" => "u", "ü" => "u",
                "ý" => "y", "ÿ" => "y");
    
return strtr("$chaine", $conversion);
    }

     class mondialrelay{
    
     function log($teste)
     {
     $log = fopen(DIR_FS_CATALOG."/logs/log.txt", "a");
     if($teste!=NULL)
     {
     fprintf($log,print_r($teste,true)."\n");
     }
     else
     {
     fprintf($log,"variable vide\n");
     }
     fclose($log);
     }
     var $code, $title, $sort_order, $description, $enabled;
     function mondialrelay(){

     $this->code="mondialrelay";
$this->title = MODULE_SHIPPING_MONDIAL_RELAY_TEXT_TITLE;
$this->description = MODULE_SHIPPING_MONDIAL_RELAY_DESCRIPTION;
if ( defined('MODULE_SHIPPING__MONDIAL_RELAY_STATUS') ) {
$this->sort_order = MODULE_SHIPPING_MONDIAL_RELAY_SORT_ORDER;
$this->icon = '';
$this->tax_class = MODULE_SHIPPING_MONDIAL_RELAY_TABLE_TAX_CLASS;
$this->enabled = ((MODULE_SHIPPING_MONDIAL_RELAY_STATUS == 'true') ? true : false);
$this->frais_fixes = MODULE_SHIPPING_MONDIAL_RELAY_FRAIS_FIXES;
}
}
function quote($method = '')
{
global $shipping_weight;
//soap
if($shipping_weight>=0.1)
{
global $order;
$client = new SoapClient("http://www.mondialrelay.fr/WebService/Web_Services.asmx?WSDL");

$params = array('Enseigne'     => MODULE_SHIPPING_MONDIAL_RELAY_ENSEIGNE
,'Pays'         => $order->delivery['country']['iso_code_2']
,'Ville'        => accents($order->delivery['city'])
,'CP'           => $order->delivery['postcode']
,'Poids'        => round($shipping_weight*1000));
//On cr&eacute;e le code de s&eacute;curit&eacute;
$code = implode("",$params);
$code .= MODULE_SHIPPING_MONDIAL_RELAY_CLE_PRIVEE;

//On le rajoute aux param&eacute;tres
$params["Security"] = strtoupper(md5($code));
$pointsRelais = $client->WSI2_RecherchePointRelais($params)->WSI2_RecherchePointRelaisResult;// r&eacute;cuper la liste des points relai
if($pointsRelais->STAT==0)
{
// calcul du tarif
$table = split("[:,]" , MODULE_SHIPPING_MONDIAL_RELAY_TARIF);
$tarifTrouve=true;
for ($i = 0; $i < sizeof($table); $i+=2) {
          if ($shipping_weight > $table[$i])
    continue;
    if (($shipping_weight < $table[$i]) AND $tarifTrouve) {
                $tarif=$table[$i+1];
                $tarifTrouve=false;
                }
                }

                $methods = array();
                foreach($pointsRelais as $pointRelais)
                {
                if( is_object($pointRelais) && trim($pointRelais->Num) != '' ){
        
        //On cr&eacute;e le code de s&eacute;curit&eacute;
        $code = implode("",$params);
        $code .= MODULE_SHIPPING_MONDIAL_RELAY_CLE_PRIVEE;
        
        //On le rajoute aux paramêtres
        $params["Security"] = strtoupper(md5($code));
        // Et on effectue la requête
        //                    $detail_pointrelais = $client->WSI2_DetailPointRelais($params)->WSI2_DetailPointRelaisResult;
            
            $popup_params = array(
            'ens'     => MODULE_SHIPPING_MONDIAL_RELAY_MARQUE_URL
        ,'Num'    => $pointRelais->Num
            ,'Pays'   => $pointRelais->Pays
            );
            
            $popup_code = '<'.MODULE_SHIPPING_MONDIAL_RELAY_MARQUE_URL.'>'.$pointRelais->Num.$pointRelais->Pays.'<'.MODULE_SHIPPING_MONDIAL_RELAY_CLE_PRIVEE_URL.'>';
                    
                    
                    $security = strtoupper(md5($popup_code));
                    
                    $link = 'http://www.mondialrelay.com/public/permanent/details_relais.aspx?ens='. MODULE_SHIPPING_MONDIAL_RELAY_MARQUE_URL .'&num='.$pointRelais->Num.'&pays='.$pointRelais->Pays.'&crc='.$security;
    
            $methods[]=array('id'     => $pointRelais->Num . $pointRelais->Pays
                    ,'title'  => $pointRelais->LgAdr1 ." à ".$pointRelais->Ville ." ".$pointRelais->CP ." <a onclick=\"
                    window.open ('". $link ."', '', 'height=800, width=450, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no');\">d&eacute;tail</a>"
                    ,'cost'   => $tarif + $this->frais_fixes);
            }    
            }

            $this->quotes = array('id' => $this->code,
                    'module' => $this->title,
                    '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);
                  

                    return $this->quotes;
            }
            else
            {
            $this->quotes = array('module' => $this->title,
                    'error' => MODULE_SHIPPING_MONDIAL_RELAY_ERROR);
                    return $this->quotes;
            }
            }
            else
            {
                    return;
            }
            }
                                        
    function check() {
        $retourdb = tep_db_query("select configuration_value FROM configuration WHERE configuration_key= 'MODULE_SHIPPING_MONDIAL_RELAY_STATUS' ");
        $this->checked = tep_db_num_rows($retourdb);
        return $this->checked;
                }
    function remove() {
        tep_db_query("delete from configuration where configuration_key in ('" . implode("', '", $this->keys()) . "')");
        tep_db_query("ALTER table orders DROP shipping_pointrelay");
        tep_db_query("ALTER table orders DROP shipping_traking");
                }
                                        
                                        
    function install() {
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Ordre de tri', 'MODULE_SHIPPING_MONDIAL_RELAY_SORT_ORDER', '0', 'Ordre de tri pour l\'affichage (Le plus petit nombre est montr&eacute; en premier).', '6', '0', now())");
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Enseigne', 'MODULE_SHIPPING_MONDIAL_RELAY_ENSEIGNE', 'BDTESTMR', 'Enseigne fournie par mondial relay.', '6', '0', now())");
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Marque', 'MODULE_SHIPPING_MONDIAL_RELAY_MARQUE', 'BD', 'Marque fournie par mondial relay.', '6', '0', now())");
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Cl&eacute; priv&eacute;e', 'MODULE_SHIPPING_MONDIAL_RELAY_CLE_PRIVEE', 'TesT_MondiaL_RelaY', 'Cl&eacute; fournie par mondial relay.', '6', '0', now())");
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Marque(url)', 'MODULE_SHIPPING_MONDIAL_RELAY_MARQUE_URL', 'BDTESTMR11', 'Marque(url) fournie par mondial relay.', '6', '0', now())");
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Cl&eacute; priv&eacute;e (url)', 'MODULE_SHIPPING_MONDIAL_RELAY_CLE_PRIVEE_URL', 'TesT_MondiaL_RelaY', 'Cl&eacute; fournie par mondial relay.', '6', '0', now())");
      tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Activer ce mode de livraison', 'MODULE_SHIPPING_MONDIAL_RELAY_STATUS', 'Oui', 'Voulez-vous utiliser ce mode de livraison?', '6', '0', 'tep_cfg_select_option(array(\'Oui\', \'Non\'), ', now())");
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Civilit&eacute; Nom Pr&eacute;nom', 'MODULE_SHIPPING_MONDIAL_RELAY_EXPE_AD1', '".STORE_NAME."', 'Civilit&eacute; Nom Pr&eacute;nom(Civilit&eacute;s accept&eacute;es:\'MR\',\'M\',\'M.\', \'MME\', \'MLE\' et \'MLLE\').', '6', '0', now())");
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Pays d\'exp&eacute;dition', 'MODULE_SHIPPING_MONDIAL_RELAY_EXPE_PAYS', 'FR', 'Pays d\'exp&eacute;dition(Pays accept&eacute;es:\'FR\',\'BE\',\'LU\' et \'ES\').', '6', '0', now())");
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Rue', 'MODULE_SHIPPING_MONDIAL_RELAY_EXPE_AD3', 'Rue', 'Rue.', '6', '0', now())");
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Ville', 'MODULE_SHIPPING_MONDIAL_RELAY_Expe_EXPE_VILLE', 'ville', 'ville.', '6', '0', now())");
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Code Postal', 'MODULE_SHIPPING_MONDIAL_RELAY_Expe_EXPE_CP', '02270', 'Code Postal.', '6', '0', now())");
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('T&eacute;l&eacute;phone', 'MODULE_SHIPPING_MONDIAL_RELAY_EXPE_TEL1', '0123456789', 'T&eacute;l&eacute;phone Fixe.', '6', '0', now())");
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('TVA applicable', 'MODULE_SHIPPING_MONDIAL_RELAY_TABLE_TAX_CLASS', '0', 'S&eacute;lectionnez la TVA applicable sur le montant de la livraison.', '6', '0', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now())");
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Tarif', 'MODULE_SHIPPING_MONDIAL_RELAY_TARIF', '0.50:4.20,1.00:4.20,2.00:5.50,3.00:6.20,5.00:7.50,7.00:9.60,10.00:11.95,15.00:14.35,20.00:17.95', 'Tarif appliqu&eacute; suivant le poids.', '6', '0', now())");
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Frais fixes', 'MODULE_SHIPPING_MONDIAL_RELAY_FRAIS_FIXES', '0', 'Frais fixes (emballage).', '6', '0', now())");
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Format des &eacute;tiquettes', 'MODULE_SHIPPING_MONDIAL_RELAY_FORMAT_PDF', 'A5', 'Format des PDF des &eacute;tiquettes', '6', '0', 'tep_cfg_select_option(array(\'A4\', \'A5\'), ', now())");
        tep_db_query("ALTER table orders ADD shipping_pointrelay char(8)");
        tep_db_query("ALTER table orders ADD shipping_traking char(8)");
        }
    function keys() {
        return array("MODULE_SHIPPING_MONDIAL_RELAY_STATUS"
        ,"MODULE_SHIPPING_MONDIAL_RELAY_ENSEIGNE"
        ,"MODULE_SHIPPING_MONDIAL_RELAY_CLE_PRIVEE"
        ,"MODULE_SHIPPING_MONDIAL_RELAY_CLE_PRIVEE_URL"
        ,"MODULE_SHIPPING_MONDIAL_RELAY_MARQUE_URL"
        ,"MODULE_SHIPPING_MONDIAL_RELAY_MARQUE"
        ,"MODULE_SHIPPING_MONDIAL_RELAY_TARIF"
        ,"MODULE_SHIPPING_MONDIAL_RELAY_FRAIS_FIXES"
        ,"MODULE_SHIPPING_MONDIAL_RELAY_FORMAT_PDF"
        ,'MODULE_SHIPPING_MONDIAL_RELAY_EXPE_PAYS'
        ,'MODULE_SHIPPING_MONDIAL_RELAY_EXPE_AD1'
        ,'MODULE_SHIPPING_MONDIAL_RELAY_Expe_Ad3'
        ,'MODULE_SHIPPING_MONDIAL_RELAY_Expe_EXPE_VILLE'
        ,'MODULE_SHIPPING_MONDIAL_RELAY_Expe_EXPE_CP'
        ,'MODULE_SHIPPING_MONDIAL_RELAY_EXPE_TEL1'
                ,"MODULE_SHIPPING_MONDIAL_RELAY_SORT_ORDER"
                ,'MODULE_SHIPPING_MONDIAL_RELAY_TABLE_TAX_CLASS');
        }
        }
?>

Écrit par : Bonbec 28 Jan 2020, 22:57

Re bonjour,

Citation (thiery @ 28 Jan 2020, 16:06) *
... par contre dans l’installation il est indiqué de modifier catalog/admin/includes/boxes/customers.php
dans phœnix je n'ai que cela dans customers
Code
<?php
/*
  $Id$

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

  Copyright (c) 2019 osCommerce

  Released under the GNU General Public License
*/

  $cl_box_groups[] = array('heading' => BOX_HEADING_CUSTOMERS, 'apps' => array());


il y a certainement un autre endroit ou je dois faire la modification

Il semblerait que ce soit admin/includes/boxes/customers_customers.php qui ressemble le plus au fichier à modifier.

Citation (thiery @ 28 Jan 2020, 16:06) *
idem pour le filename il n'existe plus, faut il faire la modification dans un autre fichier ?

Il faut remplacer les FILENAME_XXX par leur vraie valeur (comme déjà expliqué pour l'autre contrib). Par exemple FILENAME_ORDERS devient 'orders.php'

Citation (thiery @ 28 Jan 2020, 16:06) *
sinon quand j'instal le module pas de message, par contre j'ai Ordre d'affichage qui reste vide
même en changeant l'ordre dans le module, pas de mise à jours, et rien ne s’affiche sur le site

j'ai peut être fait une bourde dans les fichiers ...

Je vais charger l'addon et essayer de voir si mes connaissances peuvent aider.

Écrit par : Bonbec 29 Jan 2020, 09:17

Re bonjour,
J'ai jeté un oeil rapide à la contrib, il te faut faire le même type de modifs qu'expliqué pour cette autre contrib :
http://www.oscommerce-fr.info/forum/index.php?showtopic=71803&st=0&p=372602&#entry372602

Écrit par : thiery 29 Jan 2020, 12:06

Bonjour Bonbec
merci oui c'est ce que j'ai suivi
j'ai fais les modifications mais peut être des erreurs ou oublie c'est pour cela que j'ai mis les deux fichiers au cas ou j'ai fais une bourde
car installation aucun problème
par contre configuration il prend tout sauf la position du module il n'apparait pas le 0 par défaut,
du coup je pense que c'est cela qui bloque pour que cela s'affiche cote client
je vais essayer de relire pour voir si je trouve le problème
à bientôt thierry

Écrit par : Bonbec 29 Jan 2020, 18:14

Dans le premier fichier, il te reste à modifier require(DIR_WS_CLASSES . 'currencies.php');

Écrit par : thiery 29 Jan 2020, 19:21

re wink.gif

je viens de faire les modifications

par contre j'ai essayé de faire les modification dans customers_customers.php, mais je n'ai pas trouvé la solution
voici l'image ou il n’apparait pas l' Ordre d'affichage



je ne sais pas si c'est la modification customers qui me pose ce problème, certainement que oui, j'ai aussi demandé sur le forum us au cas ou
merci thierry

Écrit par : thiery 29 Jan 2020, 23:16

re
je viens d'avoir une réponse sur le forum US

Citation
You shouldn't do this. In Phoenix, the goal is to not make changes to core files. Sometimes it is not possible but it is for this one. To do that,

Look in admin/includes/boxes/ and make a copy of the customers_customers.php file. Name it to whatever you want but leave the first part as customers. For example, customers_myfile.php.
Edit that new file and change the three lines for 'code', 'title' and 'link' to what is correct for your addon. Save the file.
Go to admin/includes/languages/English/modules/boxes/ and make a copy of the customers_customers.php file. Name it the same that you used for the above file.
Edit that new file and change the entries to match your addon. Save the file.
Upload those two files and refresh your admin view. The link for your addon should show in the customers section.

The above changes won't affect the shop side in any way. If the addon isn't working on the addon side, it is due to something else. 


j'ai fais les modifications avec
Code
foreach ( $cl_box_groups as &$group ) {
    if ( $group['heading'] == BOX_HEADING_CUSTOMERS ) {
      $group['apps'][] = array('code' => 'customers.php',
                               'title' => MODULES_ADMIN_MENU_CUSTOMERS_CUSTOMERS,
                               'link' => tep_href_link('mondialrelayadmin.php'));
    

      break;
    }
  }


du coup la mise en page n'est plus bonne, mais cela n'est pas grave, par contre aucune résolution au problème toujours pas d'affichage coté clients et toujours pas d'ordre d’affichage , je pense que si j'arrive à trouver le problème de l'ordre d’affichage, je devrais avoir le module dans le choix coté client
bonne soirée

Écrit par : Bonbec 6 Feb 2020, 10:02

Bonjour,
J'ari vi que sur le forum US, Jack t'avais donné un coup de main, çà fonctionne maintenant ?

Écrit par : thiery 6 Feb 2020, 15:17

Bonjour Bonbec
non toujours pas je cherche toujours le problème
installation ok
coté admin ok
sauf pas de positionnement possible à l'activation avec logo croix rouge
et coté catalog aucun affichage du choix des transports, le module n'est pas visible

je viens de reprendre les fichiers à 0 au cas ou j'aurais fait une erreur

par la même occasion je me demandais s'il fallait laisser comme ceci

Citation
tep_db_query("ALTER TABLE ".TABLE_ORDERS." DROP shipping_pointrelay");

ou faire cela
Citation
tep_db_query("alter table table_orders DROP shipping_pointrelay");


à bientôt thierry

Écrit par : Bonbec 6 Feb 2020, 15:28

Ok.

Pour ton alter, il faut remplacer TABLE_ORDERS par orders tout simplement, çà devrait donner :

Code
tep_db_query("ALTER TABLE orders DROP shipping_pointrelay");

Écrit par : thiery 6 Feb 2020, 15:51

merci
c'est bien ce que je voulez mettre, dans l'exemple j'avais oublié de supprimer le table_ wink.gif

je continu la recherche
à bientôt

Écrit par : Bonbec 6 Feb 2020, 17:04

Je viens de regarder rapidement (entre 2 boulots) et j'ai vu qu'il faut modifier le fichier includes/modules/shipping/mondialrelay.php à la ligne 18.
Remplace

Code
    function mondialrelay()

par
Code
    function __construct()

car le nom de la class ne peut pas être identique au nom de la fonction en php7.x

Écrit par : thiery 6 Feb 2020, 19:57

re
merci
modification faite ,
idem pas de changement

à bientôt thierry

Écrit par : Bonbec 7 Feb 2020, 02:21

Le problème se trouve dans includes/modules/shipping/mondialrelay.php mais je ne sais pas le résoudre actuellement.

Par contre, j'ai vu qu'il fallait remplacer la ligne

Code
$table = split("[:,]" , MODULE_SHIPPING_MONDIAL_RELAY_TARIF);
par
Code
$table = preg_split("/[:,]/" , MODULE_SHIPPING_MONDIAL_RELAY_TARIF);
car split a été supprimé à partir de php7.0

Ensuite la ligne
Code
if($pointsRelais->STAT==0)
fait le test si c'est égal à 0. Chez moi en local çà ne donne pas 0 mais 95 si je fais un
Code
echo $pointsRelais->STAT;
juste avant.
Du coup c'est un message d'erreur qui doit être retourné, ce qui empêche l'affichage des points relais.

Écrit par : thiery 7 Feb 2020, 15:28

bonjour
c'est bien comme ca qu'il faut le placer

Code
liste des points relais
echo $pointsRelais->STAT;
if($pointsRelais->STAT==0)


même en indiquant cela je n'ai aucun message, pas de 0 ni 95 rien
j'ai peut être pas mis comme il le fallait
à bientôt thierry

Écrit par : thiery 7 Feb 2020, 15:48

je te redonne mon fichier (/includes/modules/shipping/) au cas ou, j'ai tellement cherché que j'ai peut être fait des erreurs

Code
<?php

function accents($chaine)
    {
        $conversion = array("¥" => "Y", "µ" => "u", "À" => "A", "Á" => "A",
                "Â" => "A", "Ã" => "A", "Ä" => "A", "Å" => "A",
                "Æ" => "A", "Ç" => "C", "È" => "E", "É" => "E",
                "Ê" => "E", "Ë" => "E", "Ì" => "I", "Í" => "I",
                "Î" => "I", "Ï" => "I", "Ð" => "D", "Ñ" => "N",
                "Ò" => "O", "Ó" => "O", "Ô" => "O", "Õ" => "O",
                "Ö" => "O", "Ø" => "O", "Ù" => "U", "Ú" => "U",
                "Û" => "U", "Ü" => "U", "Ý" => "Y", "ß" => "s",
                "à" => "a", "á" => "a", "â" => "a", "ã" => "a",
                "ä" => "a", "å" => "a", "æ" => "a", "ç" => "c",
                "è" => "e", "é" => "e", "ê" => "e", "ë" => "e",
                "ì" => "i", "í" => "i", "î" => "i", "ï" => "i",
                "ð" => "o", "ñ" => "n", "ò" => "o", "ó" => "o",
                "ô" => "o", "õ" => "o", "ö" => "o", "ø" => "o",
                "ù" => "u", "ú" => "u", "û" => "u", "ü" => "u",
                "ý" => "y", "ÿ" => "y");
    
return strtr("$chaine", $conversion);
    }

     class mondialrelay{
    
     function log($teste)
     {
     $log = fopen(DIR_FS_CATALOG."/logs/log.txt", "a");
     if($teste!=NULL)
     {
     fprintf($log,print_r($teste,true)."\n");
     }
     else
     {
     fprintf($log,"variable vide\n");
     }
     fclose($log);
     }
     var $code, $title, $sort_order, $description, $enabled;
     function __construct(){
     $this->code="mondialrelay";
     $this->title = MODULE_SHIPPING_MONDIAL_RELAY_TEXT_TITLE;
     $this->description = MODULE_SHIPPING_MONDIAL_RELAY_DESCRIPTION;

     if ( defined('MODULE_SHIPPING__MONDIAL_RELAY_STATUS') ) {
      $this->sort_order = MODULE_SHIPPING_MONDIAL_RELAY_SORT_ORDER;
      $this->icon = '';
      $this->tax_class = MODULE_SHIPPING_MONDIAL_RELAY_TABLE_TAX_CLASS;
      $this->enabled = ((MODULE_SHIPPING_MONDIAL_RELAY_STATUS == 'true') ? true : false);
      $this->frais_fixes = MODULE_SHIPPING_MONDIAL_RELAY_FRAIS_FIXES;
}
}
function quote($method = '')
{
global $shipping_weight;
//soap
if($shipping_weight>=0.1)
{
global $order;
$client = new SoapClient("http://www.mondialrelay.fr/WebService/Web_Services.asmx?WSDL");

$params = array('Enseigne'     => MODULE_SHIPPING_MONDIAL_RELAY_ENSEIGNE
,'Pays'         => $order->delivery['country']['iso_code_2']
,'Ville'        => accents($order->delivery['city'])
,'CP'           => $order->delivery['postcode']
,'Poids'        => round($shipping_weight*1000));
//On cr&eacute;e le code de s&eacute;curit&eacute;
$code = implode("",$params);
$code .= MODULE_SHIPPING_MONDIAL_RELAY_CLE_PRIVEE;

//On le rajoute aux param&eacute;tres
$params["Security"] = strtoupper(md5($code));
$pointsRelais = $client->WSI2_RecherchePointRelais($params)->WSI2_RecherchePointRelaisResult;// r&eacute;cuper la liste des points relais
if($pointsRelais->STAT==0)
{
// calcul du tarif
$table = preg_split("/[:,]/" , MODULE_SHIPPING_MONDIAL_RELAY_TARIF);
$tarifTrouve=true;
for ($i = 0; $i < sizeof($table); $i+=2) {
          if ($shipping_weight > $table[$i])
    continue;
    if (($shipping_weight < $table[$i]) AND $tarifTrouve) {
                $tarif=$table[$i+1];
                $tarifTrouve=false;
                }
                }

                $methods = array();
                foreach($pointsRelais as $pointRelais)
                {
                if( is_object($pointRelais) && trim($pointRelais->Num) != '' ){
        
        //On cr&eacute;e le code de s&eacute;curit&eacute;
        $code = implode("",$params);
        $code .= MODULE_SHIPPING_MONDIAL_RELAY_CLE_PRIVEE;
        
        //On le rajoute aux paramêtres
        $params["Security"] = strtoupper(md5($code));
        // Et on effectue la requête
        //                    $detail_pointrelais = $client->WSI2_DetailPointRelais($params)->WSI2_DetailPointRelaisResult;
            
            $popup_params = array(
            'ens'     => MODULE_SHIPPING_MONDIAL_RELAY_MARQUE_URL
        ,'Num'    => $pointRelais->Num
            ,'Pays'   => $pointRelais->Pays
            );
            
            $popup_code = '<'.MODULE_SHIPPING_MONDIAL_RELAY_MARQUE_URL.'>'.$pointRelais->Num.$pointRelais->Pays.'<'.MODULE_SHIPPING_MONDIAL_RELAY_CLE_PRIVEE_URL.'>';
                    
                    
                    $security = strtoupper(md5($popup_code));
                    
                    $link = 'http://www.mondialrelay.com/public/permanent/details_relais.aspx?ens='. MODULE_SHIPPING_MONDIAL_RELAY_MARQUE_URL .'&num='.$pointRelais->Num.'&pays='.$pointRelais->Pays.'&crc='.$security;
    
            $methods[]=array('id'     => $pointRelais->Num . $pointRelais->Pays
                    ,'title'  => $pointRelais->LgAdr1 ." à ".$pointRelais->Ville ." ".$pointRelais->CP ." <a onclick=\"
                    window.open ('". $link ."', '', 'height=800, width=450, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no');\">d&eacute;tail</a>"
                    ,'cost'   => $tarif + $this->frais_fixes);
            }    
            }

            $this->quotes = array('id' => $this->code,
                    'module' => $this->title,
                    '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);
                  

                    return $this->quotes;
            }
            else
            {
            $this->quotes = array('module' => $this->title,
                    'error' => MODULE_SHIPPING_MONDIAL_RELAY_ERROR);
                    return $this->quotes;
            }
            }
            else
            {
                    return;
            }
            }
                                        
    function check() {
        $retourdb = tep_db_query("select configuration_value FROM configuration WHERE configuration_key= 'MODULE_SHIPPING_MONDIAL_RELAY_STATUS' ");
        $this->checked = tep_db_num_rows($retourdb);
        return $this->checked;
                }
    function remove() {
        tep_db_query("delete from configuration where configuration_key in ('" . implode("', '", $this->keys()) . "')");
        tep_db_query("ALTER table orders DROP shipping_pointrelay");
        tep_db_query("ALTER table orders DROP shipping_traking");
                }
                                        
                                        
    function install() {
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Ordre de tri', 'MODULE_SHIPPING_MONDIAL_RELAY_SORT_ORDER', '0', 'Ordre de tri pour l\'affichage (Le plus petit nombre est montr&eacute; en premier).', '6', '0', now())");
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Enseigne', 'MODULE_SHIPPING_MONDIAL_RELAY_ENSEIGNE', 'BDTESTMR', 'Enseigne fournie par mondial relay.', '6', '0', now())");
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Marque', 'MODULE_SHIPPING_MONDIAL_RELAY_MARQUE', 'BD', 'Marque fournie par mondial relay.', '6', '0', now())");
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Cl&eacute; priv&eacute;e', 'MODULE_SHIPPING_MONDIAL_RELAY_CLE_PRIVEE', 'TesT_MondiaL_RelaY', 'Cl&eacute; fournie par mondial relay.', '6', '0', now())");
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Marque(url)', 'MODULE_SHIPPING_MONDIAL_RELAY_MARQUE_URL', 'BDTESTMR11', 'Marque(url) fournie par mondial relay.', '6', '0', now())");
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Cl&eacute; priv&eacute;e (url)', 'MODULE_SHIPPING_MONDIAL_RELAY_CLE_PRIVEE_URL', 'TesT_MondiaL_RelaY', 'Cl&eacute; fournie par mondial relay.', '6', '0', now())");
      tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Activer ce mode de livraison', 'MODULE_SHIPPING_MONDIAL_RELAY_STATUS', 'Oui', 'Voulez-vous utiliser ce mode de livraison?', '6', '0', 'tep_cfg_select_option(array(\'Oui\', \'Non\'), ', now())");
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Civilit&eacute; Nom Pr&eacute;nom', 'MODULE_SHIPPING_MONDIAL_RELAY_EXPE_AD1', '".STORE_NAME."', 'Civilit&eacute; Nom Pr&eacute;nom(Civilit&eacute;s accept&eacute;es:\'MR\',\'M\',\'M.\', \'MME\', \'MLE\' et \'MLLE\').', '6', '0', now())");
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Pays d\'exp&eacute;dition', 'MODULE_SHIPPING_MONDIAL_RELAY_EXPE_PAYS', 'FR', 'Pays d\'exp&eacute;dition(Pays accept&eacute;es:\'FR\',\'BE\',\'LU\' et \'ES\').', '6', '0', now())");
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Rue', 'MODULE_SHIPPING_MONDIAL_RELAY_EXPE_AD3', 'Rue', 'Rue.', '6', '0', now())");
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Ville', 'MODULE_SHIPPING_MONDIAL_RELAY_Expe_EXPE_VILLE', 'ville', 'ville.', '6', '0', now())");
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Code Postal', 'MODULE_SHIPPING_MONDIAL_RELAY_Expe_EXPE_CP', '02270', 'Code Postal.', '6', '0', now())");
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('T&eacute;l&eacute;phone', 'MODULE_SHIPPING_MONDIAL_RELAY_EXPE_TEL1', '0123456789', 'T&eacute;l&eacute;phone Fixe.', '6', '0', now())");
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('TVA applicable', 'MODULE_SHIPPING_MONDIAL_RELAY_TABLE_TAX_CLASS', '0', 'S&eacute;lectionnez la TVA applicable sur le montant de la livraison.', '6', '0', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now())");
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Tarif', 'MODULE_SHIPPING_MONDIAL_RELAY_TARIF', '0.50:4.20,1.00:4.20,2.00:5.50,3.00:6.20,5.00:7.50,7.00:9.60,10.00:11.95,15.00:14.35,20.00:17.95', 'Tarif appliqu&eacute; suivant le poids.', '6', '0', now())");
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Frais fixes', 'MODULE_SHIPPING_MONDIAL_RELAY_FRAIS_FIXES', '0', 'Frais fixes (emballage).', '6', '0', now())");
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Format des &eacute;tiquettes', 'MODULE_SHIPPING_MONDIAL_RELAY_FORMAT_PDF', 'A5', 'Format des PDF des &eacute;tiquettes', '6', '0', 'tep_cfg_select_option(array(\'A4\', \'A5\'), ', now())");
        tep_db_query("ALTER table orders ADD shipping_pointrelay char(8)");
        tep_db_query("ALTER table orders ADD shipping_traking char(8)");
        }
    function keys() {
        return array('MODULE_SHIPPING_MONDIAL_RELAY_STATUS','MODULE_SHIPPING_MONDIAL_RELAY_ENSEIGNE','MODULE_SHIPPING_MONDIAL_RELAY_CLE_PRIVEE','MODULE_SHIPPING_MONDIAL_RELAY_CLE_PRIVEE_URL','MODULE_SHIPPING_MONDIAL_RELAY_MARQUE_URL','MODULE_SHIPPING_MONDIAL_RELAY_MARQUE','MODULE_SHIPPING_MONDIAL_RELAY_TARIF','MODULE_SHIPPING_MONDIAL_RELAY_FRAIS_FIXES','MODULE_SHIPPING_MONDIAL_RELAY_EXPE_AD1','MODULE_SHIPPING_MONDIAL_RELAY_Expe_Ad3','MODULE_SHIPPING_MONDIAL_RELAY_Expe_EXPE_VILLE','MODULE_SHIPPING_MONDIAL_RELAY_Expe_EXPE_CP','MODULE_SHIPPING_MONDIAL_RELAY_EXPE_TEL1','MODULE_SHIPPING_MONDIAL_RELAY_SORT_ORDER','MODULE_SHIPPING_MONDIAL_RELAY_TABLE_TAX_CLASS');
        }
        }
?>


celui de l'admin
Code
<?php
/*
  $Id$

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

  Copyright (c) 2010 osCommerce

  Released under the GNU General Public License
*/

  require('includes/application_top.php');

  require('includes/classes/currencies.php');
  $currencies = new currencies();

  $orders_statuses = array();
  $orders_status_array = array();
  $orders_status_query = tep_db_query("select orders_status_id, orders_status_name from orders_status where language_id = '" . (int)$languages_id . "'");
  while ($orders_status = tep_db_fetch_array($orders_status_query)) {
    $orders_statuses[] = array('id' => $orders_status['orders_status_id'],
                               'text' => $orders_status['orders_status_name']);
    $orders_status_array[$orders_status['orders_status_id']] = $orders_status['orders_status_name'];
  }

  $action = (isset($_GET['action']) ? $_GET['action'] : '');

function accents($chaine)
    {
        $conversion = array("¥" => "Y", "µ" => "u", "À" => "A", "Á" => "A",
                "Â" => "A", "Ã" => "A", "Ä" => "A", "Å" => "A",
                "Æ" => "A", "Ç" => "C", "È" => "E", "É" => "E",
                "Ê" => "E", "Ë" => "E", "Ì" => "I", "Í" => "I",
                "Î" => "I", "Ï" => "I", "Ð" => "D", "Ñ" => "N",
                "Ò" => "O", "Ó" => "O", "Ô" => "O", "Õ" => "O",
                "Ö" => "O", "Ø" => "O", "Ù" => "U", "Ú" => "U",
                "Û" => "U", "Ü" => "U", "Ý" => "Y", "ß" => "s",
                "à" => "a", "á" => "a", "â" => "a", "ã" => "a",
                "ä" => "a", "å" => "a", "æ" => "a", "ç" => "c",
                "è" => "e", "é" => "e", "ê" => "e", "ë" => "e",
                "ì" => "i", "í" => "i", "î" => "i", "ï" => "i",
                "ð" => "o", "ñ" => "n", "ò" => "o", "ó" => "o",
                "ô" => "o", "õ" => "o", "ö" => "o", "ø" => "o",
                "ù" => "u", "ú" => "u", "û" => "u", "ü" => "u",
                "ý" => "y", "ÿ" => "y", "°" => "");
    
return strtr("$chaine", $conversion);
    }

  if (tep_not_null($action)) {
    switch ($action) {
      case 'update_order':
        $oID = tep_db_prepare_input($_GET['oID']);
        $status = tep_db_prepare_input($_POST['status']);
        $comments = tep_db_prepare_input($_POST['comments']);

        $order_updated = false;
        $check_status_query = tep_db_query("select customers_name, customers_email_address, orders_status, date_purchased from orders where orders_id = '" . (int)$oID . "'");
        $check_status = tep_db_fetch_array($check_status_query);

        if ( ($check_status['orders_status'] != $status) || tep_not_null($comments)) {
          tep_db_query("update orders set orders_status = '" . tep_db_input($status) . "', last_modified = now() where orders_id = '" . (int)$oID . "'");

          $customer_notified = '0';
          if (isset($_POST['notify']) && ($_POST['notify'] == 'on')) {
            $notify_comments = '';
            if (isset($_POST['notify_comments']) && ($_POST['notify_comments'] == 'on')) {
              $notify_comments = sprintf(EMAIL_TEXT_COMMENTS_UPDATE, $comments) . "\n\n";
            }

            $email = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_catalog_href_link('catalog_account_history_info.php', 'order_id=' . $oID, 'SSL') . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "\n\n" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]);

            tep_mail($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT, $email, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

            $customer_notified = '1';
          }

          tep_db_query("insert into orders_status_history (orders_id, orders_status_id, date_added, customer_notified, comments) values ('" . (int)$oID . "', '" . tep_db_input($status) . "', now(), '" . tep_db_input($customer_notified) . "', '" . tep_db_input($comments)  . "')");

          $order_updated = true;
        }

        if ($order_updated == true) {
         $messageStack->add_session(SUCCESS_ORDER_UPDATED, 'success');
        } else {
          $messageStack->add_session(WARNING_ORDER_NOT_UPDATED, 'warning');
        }

        tep_redirect(tep_href_link('mondialrelayadmin.php', tep_get_all_get_params(array('action')) . 'action=edit'));
        break;
        
         require('includes/template_top.php');
        
      case 'deleteconfirm':
        $oID = tep_db_prepare_input($_GET['oID']);

        tep_remove_order($oID, $_POST['restock']);

        tep_redirect(tep_href_link('mondialrelayadmin.php', tep_get_all_get_params(array('oID', 'action'))));
        break;
      case 'cre':
        $oID = tep_db_prepare_input($_GET['oID']);
        
        $retourBD = tep_db_query("select configuration_key,configuration_value from configuration where `configuration_key` REGEXP 'MODULE_SHIPPING_MONDIAL_RELAY' OR `configuration_key` ='STORE_OWNER_EMAIL_ADDRESS' OR `configuration_key` ='SHIPPING_ORIGIN_COUNTRY' OR `configuration_key` = 'SHIPPING_BOX_WEIGHT'");
        // récuper les config du module
        while($i=tep_db_fetch_array($retourBD))
            $infoExpe[$i[configuration_key]]=$i[configuration_value];
        $adresseExp=str_split($infoExpe['MODULE_SHIPPING_MONDIAL_RELAY_EXPE_AD3'],32);
            
            
            
        $totalWeight=$infoExpe['SHIPPING_BOX_WEIGHT'];
        $retourBD = tep_db_query("SELECT p.products_weight,op.products_quantity FROM orders_products op INNER JOIN  products  p ON op.products_id = p.products_id WHERE op.orders_id=".$oID);
        // récupe le poid des produits pour calcul le total
        while($i=tep_db_fetch_array($retourBD))
            $totalWeight+=$i['products_weight']*$i['products_quantity'];


        $retourBD = tep_db_query("select countries_iso_code_2 AS code FROM countries WHERE countries_id=".$infoExpe['SHIPPING_ORIGIN_COUNTRY']);
        // récuper le code pays avec id pour expe
        $codePaysExpe = tep_db_fetch_array($retourBD);
        
        
        $retourBD = tep_db_query("select o.delivery_country,o.customers_telephone,o.customers_email_address, o.delivery_street_address, o.shipping_pointrelay, o.delivery_city, o.delivery_postcode, o.delivery_name, o.currency_value from orders o left join customers c on (o.customers_id = c.customers_id) where o.orders_id=".$oID);
        $infoDest = tep_db_fetch_array($retourBD);//récuper les info de la commande
        $adresseDest=str_split($infoDest['delivery_street_address'],32);
        
        
        $retourBD = tep_db_query("select countries_iso_code_2 AS code FROM countries WHERE countries_name='".$infoDest['delivery_country']."'");
        // récuper le code pays avec id pour expe
        $codePaysDest = tep_db_fetch_array($retourBD);
        
        $params = array('Enseigne'       => $infoExpe['MODULE_SHIPPING_MONDIAL_RELAY_ENSEIGNE']
                       ,'ModeCol'        => 'CCC'
                       ,'ModeLiv'        => '24R'
                       ,'Expe_Langage'   => trim($infoExpe['MODULE_SHIPPING_MONDIAL_RELAY_EXPE_PAYS'])
                       ,'Expe_Ad1'       => $infoExpe['MODULE_SHIPPING_MONDIAL_RELAY_EXPE_AD1']
                       ,'Expe_Ad3'       => $adresseExp[0]
                       ,'Expe_Ad4'       => $adresseExp[1]
                       ,'Expe_Ville'     => $infoExpe['MODULE_SHIPPING_MONDIAL_RELAY_Expe_EXPE_VILLE']
                       ,'Expe_CP'        => $infoExpe['MODULE_SHIPPING_MONDIAL_RELAY_Expe_EXPE_CP']
                       ,'Expe_Pays'      => trim($infoExpe['MODULE_SHIPPING_MONDIAL_RELAY_EXPE_PAYS'])
                       ,'Expe_Tel1'      => $infoExpe['MODULE_SHIPPING_MONDIAL_RELAY_EXPE_TEL1']
                       ,'Expe_Mail'      => $infoExpe['STORE_OWNER_EMAIL_ADDRESS']
                       ,'Dest_Langage'   => $codePaysDest['code']
                       ,'Dest_Ad1'       => accents($infoDest['delivery_name'])
                       ,'Dest_Ad3'       => accents($adresseDest[0])
                       ,'Dest_Ad4'       => accents($adresseDest[1])
                       ,'Dest_Ville'     => accents($infoDest['delivery_city'])
                       ,'Dest_CP'        => $infoDest['delivery_postcode']
                       ,'Dest_Pays'      => $codePaysDest['code']
                       ,'Dest_Tel1'      => $infoDest['customers_telephone']
                       ,'Dest_Mail'      => accents($infoDest['customers_email_address'])
                       ,'Poids'          => round($totalWeight*1000)
                       ,'NbColis'        => '1'
                       ,'CRT_Valeur'     => '0'
                       ,'LIV_Rel_Pays'   => substr($infoDest['shipping_pointrelay'],-2)
                       ,'LIV_Rel'        => substr($infoDest['shipping_pointrelay'],0,6));
        
        $code = implode("",$params);
        $code .= $infoExpe['MODULE_SHIPPING_MONDIAL_RELAY_CLE_PRIVEE'];
        //On le rajoute aux paramétres
        
        $params["Security"] = strtoupper(md5($code));
        // On se connecte
        $client = new SoapClient("http://www.mondialrelay.fr/WebService/Web_Services.asmx?WSDL");
                    
        //send request
        $expedition = $client->WSI2_CreationExpedition($params)->WSI2_CreationExpeditionResult;
        if($expedition->STAT != 0){
            echo $infoExpe['MODULE_SHIPPING_MONDIAL_RELAY_EXPE_PAYS'];
            echo $expedition->STAT;
        }else{
            tep_db_query("UPDATE orders SET shipping_traking = '" . $expedition->ExpeditionNum . "' WHERE  orders_id = '".$oID."'");
    
            tep_redirect(tep_href_link('mondialrelayadmin.php', tep_get_all_get_params(array('oID', 'action'))));
        }
        break;
      case 'imprim':
        $oID = tep_db_prepare_input($_GET['oID']);
        
        $retourBD = tep_db_query("SELECT shipping_traking AS traking FROM orders WHERE orders_id=".$oID);
        $traking = tep_db_fetch_array($retourBD);//récuper les info de la commande
        
        $retourBD = tep_db_query("SELECT configuration_value,configuration_key from configuration WHERE `configuration_key` ='MODULE_SHIPPING_MONDIAL_RELAY_CLE_PRIVEE' OR `configuration_key` ='MODULE_SHIPPING_MONDIAL_RELAY_ENSEIGNE'");
        // récuper les config du modul
        while($i=tep_db_fetch_array($retourBD))
            $infoExpe[$i[configuration_key]]=$i[configuration_value];
        
          // On met en place les paramêtres de la requête
        $params = array(
                       'Enseigne'       => $infoExpe['MODULE_SHIPPING_MONDIAL_RELAY_ENSEIGNE'],
                       'Expeditions'    => $traking['traking'],
                       'Langue'         => 'FR',
        );
        //On cr&eacute;e le code de s&eacute;curit&eacute;
        $code = implode("",$params);
        $code .= $infoExpe['MODULE_SHIPPING_MONDIAL_RELAY_CLE_PRIVEE'];
        
        //On le rajoute aux paramêtres
        $params["Security"] = strtoupper(md5($code));
        
        // On se connecte
        $client = new SoapClient("http://www.mondialrelay.fr/WebService/Web_Services.asmx?WSDL");
        
        // Et on effectue la requête
        $etiquette = $client->WSI2_GetEtiquettes($params)->WSI2_GetEtiquettesResult;
        if( $etiquette->STAT == 0 ){
            $url = 'http://www.mondialrelay.fr';
            if(MODULE_SHIPPING_MONDIAL_RELAY_FORMAT_PDF=='A5'){
                $url .= $etiquette->URL_PDF_A5;
            }else{
                $url .= $etiquette->URL_PDF_A4;
            }
            tep_redirect($url);
        }else{
            echo $etiquette->STAT;    
        }
        break;
    }
  }

  if (($action == 'edit') && isset($_GET['oID'])) {
    $oID = tep_db_prepare_input($_GET['oID']);

    $orders_query = tep_db_query("select orders_id from orders where orders_id = '" . (int)$oID . "'");
    $order_exists = true;
    if (!tep_db_num_rows($orders_query)) {
      $order_exists = false;
      $messageStack->add(sprintf(ERROR_ORDER_DOES_NOT_EXIST, $oID), 'error');
    }
  }

include('includes/classes/order.php');?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
<script type="text/javascript" src="includes/general.js"></script>
<style type="text/css"><!--
BODY { background: #ffffff; }
//--></style>
</head>
<body>
<?php require('includes/header.php');
?>

<table border="0" width="100%" cellspacing="2" cellpadding="2">
  <tr>
    <td width= valign="top"><table border="0"  cellspacing="1" cellpadding="1" class="columnLeft">
<!-- left_navigation //-->
<?php require('includes/column_left.php'); ?>
<!-- left_navigation_eof //-->
    </table></td>
<!-- body_text //-->
    <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
      <tr>
        <td>
    <table border="0" width="100%" cellspacing="0" cellpadding="2">
      <tr>
        <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
            <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', 1, HEADING_IMAGE_HEIGHT); ?></td>
            <td align="right"><table border="0" width="100%" cellspacing="0" cellpadding="0">
              <tr><?php echo tep_draw_form('orders', 'mondialrelayadmin.php', '', 'get'); ?>
                <td class="smallText" align="right"><?php echo HEADING_TITLE_SEARCH . ' ' . tep_draw_input_field('oID', '', 'size="12"') . tep_draw_hidden_field('action', 'edit'); ?></td>
              </form></tr>
              <tr><?php echo tep_draw_form('status', 'mondialrelayadmin.php', '', 'get'); ?>
                <td class="smallText" align="right"><?php echo HEADING_TITLE_STATUS . ' ' . tep_draw_pull_down_menu('status', array_merge(array(array('id' => '', 'text' => TEXT_ALL_ORDERS)), $orders_statuses), '', 'onchange="this.form.submit();"'); ?></td>
            </form></tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2" >
              <tr class="dataTableHeadingRow">
                <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CUSTOMERS; ?></td>
                <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ORDER_TOTAL; ?></td>
                <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_DATE_PURCHASED; ?></td>
                <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_STATUS; ?></td>
                <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_SHIPPING_POINTRELAY; ?></td>
                <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_SHIPPING_CODE_TRAKING; ?></td>
                <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?>&nbsp;</td>
              </tr>
<?php
    if (isset($_GET['cID'])) {
      $cID = tep_db_prepare_input($_GET['cID']);
      $orders_query_raw = "select o.shipping_traking, o.shipping_pointrelay, o.orders_id, o.customers_name, o.customers_id, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from orders o left join orders_total ot on (o.orders_id = ot.orders_id), orders_status s where o.customers_id = '" . (int)$cID . "' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and ot.class = 'ot_total' and o.shipping_pointrelay IS NOT NULL order by orders_id DESC";
    } elseif (isset($_GET['status']) && is_numeric($_GET['status']) && ($_GET['status'] > 0)) {
      $status = tep_db_prepare_input($_GET['status']);
      $orders_query_raw = "select o.shipping_traking, o.shipping_pointrelay, o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from orders o left join orders_total ot on (o.orders_id = ot.orders_id), orders_status s where o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and s.orders_status_id = '" . (int)$status . "' and ot.class = 'ot_total' and o.shipping_pointrelay IS NOT NULL order by o.orders_id DESC";
    } else {
      $orders_query_raw = "select o.shipping_traking, o.shipping_pointrelay, o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from orders o left join orders_total ot on (o.orders_id = ot.orders_id), orders_status s where o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and ot.class = 'ot_total' and o.shipping_pointrelay IS NOT NULL order by o.orders_id DESC ";
    }
    $orders_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS, $orders_query_raw, $orders_query_numrows);
    $orders_query = tep_db_query($orders_query_raw);
    while ($orders = tep_db_fetch_array($orders_query)) {
    if ((!isset($_GET['oID']) || (isset($_GET['oID']) && ($_GET['oID'] == $orders['orders_id']))) && !isset($oInfo)) {
        $oInfo = new objectInfo($orders);
      }

      if (isset($oInfo) && is_object($oInfo) && ($orders['orders_id'] == $oInfo->orders_id)) {
        echo '              <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link('mondialrelayadmin.php', tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=edit') . '\'">' . "\n";
      } else {
        echo '              <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link('mondialrelayadmin.php', tep_get_all_get_params(array('oID')) . 'oID=' . $orders['orders_id']) . '\'">' . "\n";
      }
?>
                <td class="dataTableContent"><?php echo '<a href="' . tep_href_link('mondialrelayadmin.php', tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $orders['orders_id'] . '&action=edit') . '">' . tep_image('images/icons/preview.gif', ICON_PREVIEW) . '</a>&nbsp;' . $orders['customers_name']; ?></td>
                <td class="dataTableContent" align="right"><?php echo strip_tags($orders['order_total']); ?></td>
                <td class="dataTableContent" align="center"><?php echo tep_datetime_short($orders['date_purchased']); ?></td>
                <td class="dataTableContent" align="right"><?php echo $orders['orders_status_name']; ?></td>
                <td class="dataTableContent" align="right"><?php echo $orders['shipping_pointrelay']; ?></td>
                <td class="dataTableContent" align="right"><?php echo $orders['shipping_traking']; ?></td>
                <td class="dataTableContent" align="right"><?php if (isset($oInfo) && is_object($oInfo) && ($orders['orders_id'] == $oInfo->orders_id)) { echo tep_image('images/icon_arrow_right.gif', ''); } else { echo '<a href="' . tep_href_link('mondialrelayadmin.php', tep_get_all_get_params(array('oID')) . 'oID=' . $orders['orders_id']) . '">' . tep_image('images/icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?>&nbsp;</td>
              </tr>
<?php
    }
?>
              <tr>
                <td colspan="5"><table border="0" width="100%" cellspacing="0" cellpadding="2">
                  <tr>
                    <td class="smallText" valign="top"><?php echo $orders_split->display_count($orders_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_ORDERS); ?></td>
                    <td class="smallText" align="right"><?php echo $orders_split->display_links($orders_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page'], tep_get_all_get_params(array('page', 'oID', 'action'))); ?></td>
                  </tr>
                </table></td>
              </tr>
            </table></td>
<?php
  $heading = array();
  $contents = array();

      if (isset($oInfo) && is_object($oInfo)) {
        $heading[] = array('text' => '<strong>[' . $oInfo->orders_id . ']&nbsp;&nbsp;' . tep_datetime_short($oInfo->date_purchased) . '</strong>');

        $contents[] = array('align' => 'center', 'text' => '<a href="' .tep_href_link('orders.php', tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=edit').'"> ' . tep_image_button('button_edit.gif', IMAGE_EDIT) . ' </a> <a href="' . tep_href_link('orders.php', tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=delete').'"> ' . tep_image_button('button_delete.gif', IMAGE_DELETE) . ' </a> ');
        if($oInfo->shipping_traking=='')
            $contents[] = array('align' => 'center', 'text' => '<a href="' .tep_href_link('mondialrelayadmin.php', tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=cre').'"> ' . tep_image_button('button_createmr.gif', IMAGE_CREATE) . ' </a> ');
        else
            $contents[] = array('align' => 'center', 'text' => '<a href="' .tep_href_link('mondialrelayadmin.php', tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=cre').'"> ' . tep_image_button('button_createmr.gif', IMAGE_CREATE) . ' </a> <a href="'  .tep_href_link('mondialrelayadmin.php', tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=imprim').'">' . tep_image_button('button_printmr.gif', IMAGE_PRINT) . '</a> ');
        $contents[] = array('align' => 'center', 'text' => '<a href="' .tep_href_link('orders_invoice.php', 'oID=' . $oInfo->orders_id).'"> ' . tep_image_button('button_invoice.gif', IMAGE_INVOICE) . ' </a> <a href="' .tep_href_link('orders_packingslip.php', 'oID=' . $oInfo->orders_id).'"> ' . tep_image_button('button_packingslip.gif', IMAGE_ORDERS_PACKINGSLIP) . ' </a> ');
        $contents[] = array('text' => '<br />' . TEXT_DATE_ORDER_CREATED . ' ' . tep_date_short($oInfo->date_purchased));
        if (tep_not_null($oInfo->last_modified)) $contents[] = array('text' => TEXT_DATE_ORDER_LAST_MODIFIED . ' ' . tep_date_short($oInfo->last_modified));
        $contents[] = array('text' => '<br />' . TEXT_INFO_PAYMENT_METHOD . ' '  . $oInfo->payment_method);
      }


  if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
    echo '            <td width="25%" valign="top">' . "\n";

    $box = new box;
    echo $box->infoBox($heading, $contents);

    echo '            </td>' . "\n";
  }
?>
          </tr>
        </table></td>
      </tr>

    </table></td>
<!-- body_text_eof //-->
  </tr>
</table>

<?php
  require('includes/footer.php');
  require('includes/application_bottom.php');
  require('includes/template_bottom.php');
?>

</body></html>

Écrit par : Bonbec 7 Feb 2020, 17:59

Re,

Dans ton fichier que tu viens de mettre, il faut remplacer

Code
tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Activer ce mode de livraison', 'MODULE_SHIPPING_MONDIAL_RELAY_STATUS', 'Oui', 'Voulez-vous utiliser ce mode de livraison?', '6', '0', 'tep_cfg_select_option(array(\'Oui\', \'Non\'), ', now())");
par
Code
tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Activer ce mode de livraison', 'MODULE_SHIPPING_MONDIAL_RELAY_STATUS', 'true', 'Voulez-vous utiliser ce mode de livraison?', '6', '0', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now())");


Phoenix utilise true à la place de oui et false à la place de non
Une fois la modification faite, retire ton module dans l'admin via le bouton adéquat puis installe le module toujours avec le bouton adéquat.

Écrit par : thiery 7 Feb 2020, 20:39

re, wink.gif
merci bien vue
je vais regarder si je trouve pas autre chose car pour le moment
toujours pas de module dans le catalogue sad.gif
à bientôt thierry

Écrit par : Bonbec 8 Feb 2020, 10:54

Idem pour moi, il me met que l'adresse de livraison est non valide (faudrait que je regarde comment j'ai configuré le pays de la boutique), de plus SOAP ne semble pas récupérer les adresses des relais, mais c'est sans doute lié à l'erreur d'adresse.

Tu fais tes essais e local sur ton ordi comme moi ou sur un site en live ?

PS : j'ai vu que le site mondialrelay.fr est en https, du coup j'ai modifié les urls des scripts http: => https:

Écrit par : thiery 8 Feb 2020, 19:58

bonsoir
merci
Je fais le test sur le site en live (celui qui est en test où je t'avais donné le lien wink.gif )

En local tu arrives à avoir quand même le module qui s'affiche côté catalog ?
car moi rien !
même pas un message d'erreur

Coté admin as-tu un chiffre dans l'ordre d'affichage ?

Sinon as-tu des codes valides de mondial relais, si non c’est peut-être ça, si tu as besoin je peux t'envoyer les miens pour tester
merci
À bientôt thierry

Écrit par : Bonbec 10 Feb 2020, 02:06

Bonjour,
Cela fonctionne en partie de mon côté biggrin.gif
Les codes de test ont changé, il faut utiliser :

Code
Enseigne
BDTEST13

Clé privée
PrivateK

Clé privée (url)
PrivateK

Marque(url)
11

Marque
11

Ce qui ne semble pas fonctionner, c'est le popup pour le détail.



 

Écrit par : thiery 10 Feb 2020, 09:53

bonjour Merci pour l'information

par contre toujours rien pour moi sad.gif

j'ai peut être mes fichiers avec des erreurs

ou mauvaise configuration d'installation

MODIFICATION DE FICHIERS
--------------------
- Dans catalog/checkout_process.php : ok

Dans catalog/admin/includes/boxes/customers.php :
remplacement par un autre fichier : customers_mondiale.php

Code
avec foreach ( $cl_box_groups as &$group ) {
    if ( $group['heading'] == BOX_HEADING_CUSTOMERS ) {
      $group['apps'][] = array('code' => 'customers.php',
                               'title' => MODULES_ADMIN_MENU_CUSTOMERS_CUSTOMERS,
                               'link' => tep_href_link('mondialrelayadmin.php'));
    

      break;
    }
  }


et Dans admin/includes/filenames.php
comme il n'y a plus de filenames , je n'ai pas trouver ou faire la modification, il n'y a peut être pas


encore bravo pour avoir trouver les solutions

il faut que je reprenne mes fichiers et configurations pour trouver pourquoi je n'ai pas !

à bientôt
thierry

Écrit par : Bonbec 10 Feb 2020, 10:14

Re Thierry,

Vérifie que tu as bien marqué true et false en minuscule et non True et False, çà peut jouer.

Sinon pour ton fichier mondialrelayadmin.php qui s'affiche en vrac, il faut modifier quelques lignes :
Ligne 245

Code
<?php require('includes/header.php');
à remplacer par
Code
<?php require('includes/template_top.php');

Ligne 252
Code
<?php require('includes/column_left.php'); ?>
à commenter en
Code
<?php // require('includes/column_left.php'); ?>

Lignes 370 et 371
Code
  require('includes/footer.php');
  require('includes/application_bottom.php');
à remplacer par
Code
  require('includes/template_bottom.php');
  require('includes/application_bottom.php');


Tu me dis si déjà avec çà tu arrives à quelque chose de mieux.

Écrit par : thiery 10 Feb 2020, 11:19

re
Encore merci
Pas d'amélioration, toujours pareille je n’ai aucun message d'erreur
j'ai certainement fait une erreur quelque part dans les fichiers
Je redonne mes fichiers au cas !

admin

Code
<?php
/*
  $Id$

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

  Copyright (c) 2010 osCommerce

  Released under the GNU General Public License
*/

  require('includes/application_top.php');

  require('includes/classes/currencies.php');
  $currencies = new currencies();

  $orders_statuses = array();
  $orders_status_array = array();
  $orders_status_query = tep_db_query("select orders_status_id, orders_status_name from orders_status where language_id = '" . (int)$languages_id . "'");
  while ($orders_status = tep_db_fetch_array($orders_status_query)) {
    $orders_statuses[] = array('id' => $orders_status['orders_status_id'],
                               'text' => $orders_status['orders_status_name']);
    $orders_status_array[$orders_status['orders_status_id']] = $orders_status['orders_status_name'];
  }

  $action = (isset($_GET['action']) ? $_GET['action'] : '');

function accents($chaine)
    {
        $conversion = array("¥" => "Y", "µ" => "u", "À" => "A", "Á" => "A",
                "Â" => "A", "Ã" => "A", "Ä" => "A", "Å" => "A",
                "Æ" => "A", "Ç" => "C", "È" => "E", "É" => "E",
                "Ê" => "E", "Ë" => "E", "Ì" => "I", "Í" => "I",
                "Î" => "I", "Ï" => "I", "Ð" => "D", "Ñ" => "N",
                "Ò" => "O", "Ó" => "O", "Ô" => "O", "Õ" => "O",
                "Ö" => "O", "Ø" => "O", "Ù" => "U", "Ú" => "U",
                "Û" => "U", "Ü" => "U", "Ý" => "Y", "ß" => "s",
                "à" => "a", "á" => "a", "â" => "a", "ã" => "a",
                "ä" => "a", "å" => "a", "æ" => "a", "ç" => "c",
                "è" => "e", "é" => "e", "ê" => "e", "ë" => "e",
                "ì" => "i", "í" => "i", "î" => "i", "ï" => "i",
                "ð" => "o", "ñ" => "n", "ò" => "o", "ó" => "o",
                "ô" => "o", "õ" => "o", "ö" => "o", "ø" => "o",
                "ù" => "u", "ú" => "u", "û" => "u", "ü" => "u",
                "ý" => "y", "ÿ" => "y", "°" => "");
    
return strtr("$chaine", $conversion);
    }

  if (tep_not_null($action)) {
    switch ($action) {
      case 'update_order':
        $oID = tep_db_prepare_input($_GET['oID']);
        $status = tep_db_prepare_input($_POST['status']);
        $comments = tep_db_prepare_input($_POST['comments']);

        $order_updated = false;
        $check_status_query = tep_db_query("select customers_name, customers_email_address, orders_status, date_purchased from orders where orders_id = '" . (int)$oID . "'");
        $check_status = tep_db_fetch_array($check_status_query);

        if ( ($check_status['orders_status'] != $status) || tep_not_null($comments)) {
          tep_db_query("update orders set orders_status = '" . tep_db_input($status) . "', last_modified = now() where orders_id = '" . (int)$oID . "'");

          $customer_notified = '0';
          if (isset($_POST['notify']) && ($_POST['notify'] == 'on')) {
            $notify_comments = '';
            if (isset($_POST['notify_comments']) && ($_POST['notify_comments'] == 'on')) {
              $notify_comments = sprintf(EMAIL_TEXT_COMMENTS_UPDATE, $comments) . "\n\n";
            }

            $email = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_catalog_href_link('catalog_account_history_info.php', 'order_id=' . $oID, 'SSL') . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "\n\n" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]);

            tep_mail($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT, $email, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

            $customer_notified = '1';
          }

          tep_db_query("insert into orders_status_history (orders_id, orders_status_id, date_added, customer_notified, comments) values ('" . (int)$oID . "', '" . tep_db_input($status) . "', now(), '" . tep_db_input($customer_notified) . "', '" . tep_db_input($comments)  . "')");

          $order_updated = true;
        }

        if ($order_updated == true) {
         $messageStack->add_session(SUCCESS_ORDER_UPDATED, 'success');
        } else {
          $messageStack->add_session(WARNING_ORDER_NOT_UPDATED, 'warning');
        }

        tep_redirect(tep_href_link('mondialrelayadmin.php', tep_get_all_get_params(array('action')) . 'action=edit'));
        break;
        
        
        
      case 'deleteconfirm':
        $oID = tep_db_prepare_input($_GET['oID']);

        tep_remove_order($oID, $_POST['restock']);

        tep_redirect(tep_href_link('mondialrelayadmin.php', tep_get_all_get_params(array('oID', 'action'))));
        break;
      case 'cre':
        $oID = tep_db_prepare_input($_GET['oID']);
        
        $retourBD = tep_db_query("select configuration_key,configuration_value from configuration where `configuration_key` REGEXP 'MODULE_SHIPPING_MONDIAL_RELAY' OR `configuration_key` ='STORE_OWNER_EMAIL_ADDRESS' OR `configuration_key` ='SHIPPING_ORIGIN_COUNTRY' OR `configuration_key` = 'SHIPPING_BOX_WEIGHT'");
        // récuper les config du module
        while($i=tep_db_fetch_array($retourBD))
            $infoExpe[$i[configuration_key]]=$i[configuration_value];
        $adresseExp=str_split($infoExpe['MODULE_SHIPPING_MONDIAL_RELAY_EXPE_AD3'],32);
            
            
            
        $totalWeight=$infoExpe['SHIPPING_BOX_WEIGHT'];
        $retourBD = tep_db_query("SELECT p.products_weight,op.products_quantity from orders_products op INNER JOIN  products  p ON op.products_id = p.products_id WHERE op.orders_id=".$oID);
        // récupe le poid des produits pour calcul le total
        while($i=tep_db_fetch_array($retourBD))
            $totalWeight+=$i['products_weight']*$i['products_quantity'];


        $retourBD = tep_db_query("select countries_iso_code_2 AS code FROM countries WHERE countries_id=".$infoExpe['SHIPPING_ORIGIN_COUNTRY']);
        // récuper le code pays avec id pour expe
        $codePaysExpe = tep_db_fetch_array($retourBD);
        
        
        $retourBD = tep_db_query("select o.delivery_country,o.customers_telephone,o.customers_email_address, o.delivery_street_address, o.shipping_pointrelay, o.delivery_city, o.delivery_postcode, o.delivery_name, o.currency_value from orders o left join customers c on (o.customers_id = c.customers_id) where o.orders_id=".$oID);
        $infoDest = tep_db_fetch_array($retourBD);//récuper les info de la commande
        $adresseDest=str_split($infoDest['delivery_street_address'],32);
        
        
        $retourBD = tep_db_query("select countries_iso_code_2 AS code FROM countries WHERE countries_name='".$infoDest['delivery_country']."'");
        // récuper le code pays avec id pour expe
        $codePaysDest = tep_db_fetch_array($retourBD);
        
        $params = array('Enseigne'       => $infoExpe['MODULE_SHIPPING_MONDIAL_RELAY_ENSEIGNE']
                       ,'ModeCol'        => 'CCC'
                       ,'ModeLiv'        => '24R'
                       ,'Expe_Langage'   => trim($infoExpe['MODULE_SHIPPING_MONDIAL_RELAY_EXPE_PAYS'])
                       ,'Expe_Ad1'       => $infoExpe['MODULE_SHIPPING_MONDIAL_RELAY_EXPE_AD1']
                       ,'Expe_Ad3'       => $adresseExp[0]
                       ,'Expe_Ad4'       => $adresseExp[1]
                       ,'Expe_Ville'     => $infoExpe['MODULE_SHIPPING_MONDIAL_RELAY_Expe_EXPE_VILLE']
                       ,'Expe_CP'        => $infoExpe['MODULE_SHIPPING_MONDIAL_RELAY_Expe_EXPE_CP']
                       ,'Expe_Pays'      => trim($infoExpe['MODULE_SHIPPING_MONDIAL_RELAY_EXPE_PAYS'])
                       ,'Expe_Tel1'      => $infoExpe['MODULE_SHIPPING_MONDIAL_RELAY_EXPE_TEL1']
                       ,'Expe_Mail'      => $infoExpe['STORE_OWNER_EMAIL_ADDRESS']
                       ,'Dest_Langage'   => $codePaysDest['code']
                       ,'Dest_Ad1'       => accents($infoDest['delivery_name'])
                       ,'Dest_Ad3'       => accents($adresseDest[0])
                       ,'Dest_Ad4'       => accents($adresseDest[1])
                       ,'Dest_Ville'     => accents($infoDest['delivery_city'])
                       ,'Dest_CP'        => $infoDest['delivery_postcode']
                       ,'Dest_Pays'      => $codePaysDest['code']
                       ,'Dest_Tel1'      => $infoDest['customers_telephone']
                       ,'Dest_Mail'      => accents($infoDest['customers_email_address'])
                       ,'Poids'          => round($totalWeight*1000)
                       ,'NbColis'        => '1'
                       ,'CRT_Valeur'     => '0'
                       ,'LIV_Rel_Pays'   => substr($infoDest['shipping_pointrelay'],-2)
                       ,'LIV_Rel'        => substr($infoDest['shipping_pointrelay'],0,6));
        
        $code = implode("",$params);
        $code .= $infoExpe['MODULE_SHIPPING_MONDIAL_RELAY_CLE_PRIVEE'];
        //On le rajoute aux paramétres
        
        $params["Security"] = strtoupper(md5($code));
        // On se connecte
        $client = new SoapClient("https://www.mondialrelay.fr/WebService/Web_Services.asmx?WSDL");
                    
        //send request
        $expedition = $client->WSI2_CreationExpedition($params)->WSI2_CreationExpeditionResult;
        if($expedition->STAT != 0){
            echo $infoExpe['MODULE_SHIPPING_MONDIAL_RELAY_EXPE_PAYS'];
            echo $expedition->STAT;
        }else{
            tep_db_query("UPDATE orders SET shipping_traking = '" . $expedition->ExpeditionNum . "' WHERE  orders_id = '".$oID."'");
    
            tep_redirect(tep_href_link('mondialrelayadmin.php', tep_get_all_get_params(array('oID', 'action'))));
        }
        break;
      case 'imprim':
        $oID = tep_db_prepare_input($_GET['oID']);
        
        $retourBD = tep_db_query("SELECT shipping_traking AS traking FROM orders WHERE orders_id=".$oID);
        $traking = tep_db_fetch_array($retourBD);//récuper les info de la commande
        
        $retourBD = tep_db_query("SELECT configuration_value,configuration_key from configuration WHERE `configuration_key` ='MODULE_SHIPPING_MONDIAL_RELAY_CLE_PRIVEE' OR `configuration_key` ='MODULE_SHIPPING_MONDIAL_RELAY_ENSEIGNE'");
        // récuper les config du modul
        while($i=tep_db_fetch_array($retourBD))
            $infoExpe[$i[configuration_key]]=$i[configuration_value];
        
          // On met en place les paramêtres de la requête
        $params = array(
                       'Enseigne'       => $infoExpe['MODULE_SHIPPING_MONDIAL_RELAY_ENSEIGNE'],
                       'Expeditions'    => $traking['traking'],
                       'Langue'         => 'FR',
        );
        //On cr&eacute;e le code de s&eacute;curit&eacute;
        $code = implode("",$params);
        $code .= $infoExpe['MODULE_SHIPPING_MONDIAL_RELAY_CLE_PRIVEE'];
        
        //On le rajoute aux paramêtres
        $params["Security"] = strtoupper(md5($code));
        
        // On se connecte
        $client = new SoapClient("https://www.mondialrelay.fr/WebService/Web_Services.asmx?WSDL");
        
        // Et on effectue la requête
        $etiquette = $client->WSI2_GetEtiquettes($params)->WSI2_GetEtiquettesResult;
        if( $etiquette->STAT == 0 ){
            $url = 'https://www.mondialrelay.fr';
            if(MODULE_SHIPPING_MONDIAL_RELAY_FORMAT_PDF=='A5'){
                $url .= $etiquette->URL_PDF_A5;
            }else{
                $url .= $etiquette->URL_PDF_A4;
            }
            tep_redirect($url);
        }else{
            echo $etiquette->STAT;    
        }
        break;
    }
  }

  if (($action == 'edit') && isset($_GET['oID'])) {
    $oID = tep_db_prepare_input($_GET['oID']);

    $orders_query = tep_db_query("select orders_id from orders where orders_id = '" . (int)$oID . "'");
    $order_exists = true;
    if (!tep_db_num_rows($orders_query)) {
      $order_exists = false;
      $messageStack->add(sprintf(ERROR_ORDER_DOES_NOT_EXIST, $oID), 'error');
    }
  }

include('includes/classes/order.php');?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "https://www.w3.org/TR/html4/loose.dtd">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
<script type="text/javascript" src="includes/general.js"></script>
<style type="text/css"><!--
BODY { background: #ffffff; }
//--></style>
</head>
<body>
<?php require('includes/template_top.php');
?>

<table border="0" width="100%" cellspacing="2" cellpadding="2">
  <tr>
    <td width= valign="top"><table border="0"  cellspacing="1" cellpadding="1" class="columnLeft">
<!-- left_navigation //-->
<?php // require('includes/column_left.php'); ?>
<!-- left_navigation_eof //-->
    </table></td>
<!-- body_text //-->
    <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
      <tr>
        <td>
    <table border="0" width="100%" cellspacing="0" cellpadding="2">
      <tr>
        <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
            <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', 1, HEADING_IMAGE_HEIGHT); ?></td>
            <td align="right"><table border="0" width="100%" cellspacing="0" cellpadding="0">
              <tr><?php echo tep_draw_form('orders', 'mondialrelayadmin.php', '', 'get'); ?>
                <td class="smallText" align="right"><?php echo HEADING_TITLE_SEARCH . ' ' . tep_draw_input_field('oID', '', 'size="12"') . tep_draw_hidden_field('action', 'edit'); ?></td>
              </form></tr>
              <tr><?php echo tep_draw_form('status', 'mondialrelayadmin.php', '', 'get'); ?>
                <td class="smallText" align="right"><?php echo HEADING_TITLE_STATUS . ' ' . tep_draw_pull_down_menu('status', array_merge(array(array('id' => '', 'text' => TEXT_ALL_ORDERS)), $orders_statuses), '', 'onchange="this.form.submit();"'); ?></td>
            </form></tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2" >
              <tr class="dataTableHeadingRow">
                <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CUSTOMERS; ?></td>
                <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ORDER_TOTAL; ?></td>
                <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_DATE_PURCHASED; ?></td>
                <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_STATUS; ?></td>
                <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_SHIPPING_POINTRELAY; ?></td>
                <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_SHIPPING_CODE_TRAKING; ?></td>
                <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?>&nbsp;</td>
              </tr>
<?php
    if (isset($_GET['cID'])) {
      $cID = tep_db_prepare_input($_GET['cID']);
      $orders_query_raw = "select o.shipping_traking, o.shipping_pointrelay, o.orders_id, o.customers_name, o.customers_id, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from orders o left join orders_total ot on (o.orders_id = ot.orders_id), orders_status s where o.customers_id = '" . (int)$cID . "' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and ot.class = 'ot_total' and o.shipping_pointrelay IS NOT NULL order by orders_id DESC";
    } elseif (isset($_GET['status']) && is_numeric($_GET['status']) && ($_GET['status'] > 0)) {
      $status = tep_db_prepare_input($_GET['status']);
      $orders_query_raw = "select o.shipping_traking, o.shipping_pointrelay, o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from orders o left join orders_total ot on (o.orders_id = ot.orders_id), orders_status s where o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and s.orders_status_id = '" . (int)$status . "' and ot.class = 'ot_total' and o.shipping_pointrelay IS NOT NULL order by o.orders_id DESC";
    } else {
      $orders_query_raw = "select o.shipping_traking, o.shipping_pointrelay, o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from orders o left join orders_total ot on (o.orders_id = ot.orders_id), orders_status s where o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and ot.class = 'ot_total' and o.shipping_pointrelay IS NOT NULL order by o.orders_id DESC ";
    }
    $orders_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS, $orders_query_raw, $orders_query_numrows);
    $orders_query = tep_db_query($orders_query_raw);
    while ($orders = tep_db_fetch_array($orders_query)) {
    if ((!isset($_GET['oID']) || (isset($_GET['oID']) && ($_GET['oID'] == $orders['orders_id']))) && !isset($oInfo)) {
        $oInfo = new objectInfo($orders);
      }

      if (isset($oInfo) && is_object($oInfo) && ($orders['orders_id'] == $oInfo->orders_id)) {
        echo '              <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link('mondialrelayadmin.php', tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=edit') . '\'">' . "\n";
      } else {
        echo '              <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link('mondialrelayadmin.php', tep_get_all_get_params(array('oID')) . 'oID=' . $orders['orders_id']) . '\'">' . "\n";
      }
?>
                <td class="dataTableContent"><?php echo '<a href="' . tep_href_link('mondialrelayadmin.php', tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $orders['orders_id'] . '&action=edit') . '">' . tep_image('images/icons/preview.gif', ICON_PREVIEW) . '</a>&nbsp;' . $orders['customers_name']; ?></td>
                <td class="dataTableContent" align="right"><?php echo strip_tags($orders['order_total']); ?></td>
                <td class="dataTableContent" align="center"><?php echo tep_datetime_short($orders['date_purchased']); ?></td>
                <td class="dataTableContent" align="right"><?php echo $orders['orders_status_name']; ?></td>
                <td class="dataTableContent" align="right"><?php echo $orders['shipping_pointrelay']; ?></td>
                <td class="dataTableContent" align="right"><?php echo $orders['shipping_traking']; ?></td>
                <td class="dataTableContent" align="right"><?php if (isset($oInfo) && is_object($oInfo) && ($orders['orders_id'] == $oInfo->orders_id)) { echo tep_image('images/icon_arrow_right.gif', ''); } else { echo '<a href="' . tep_href_link('mondialrelayadmin.php', tep_get_all_get_params(array('oID')) . 'oID=' . $orders['orders_id']) . '">' . tep_image('images/icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?>&nbsp;</td>
              </tr>
<?php
    }
?>
              <tr>
                <td colspan="5"><table border="0" width="100%" cellspacing="0" cellpadding="2">
                  <tr>
                    <td class="smallText" valign="top"><?php echo $orders_split->display_count($orders_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_ORDERS); ?></td>
                    <td class="smallText" align="right"><?php echo $orders_split->display_links($orders_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page'], tep_get_all_get_params(array('page', 'oID', 'action'))); ?></td>
                  </tr>
                </table></td>
              </tr>
            </table></td>
<?php
  $heading = array();
  $contents = array();

      if (isset($oInfo) && is_object($oInfo)) {
        $heading[] = array('text' => '<strong>[' . $oInfo->orders_id . ']&nbsp;&nbsp;' . tep_datetime_short($oInfo->date_purchased) . '</strong>');

        $contents[] = array('align' => 'center', 'text' => '<a href="' .tep_href_link('orders.php', tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=edit').'"> ' . tep_image_button('button_edit.gif', IMAGE_EDIT) . ' </a> <a href="' . tep_href_link('orders.php', tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=delete').'"> ' . tep_image_button('button_delete.gif', IMAGE_DELETE) . ' </a> ');
        if($oInfo->shipping_traking=='')
            $contents[] = array('align' => 'center', 'text' => '<a href="' .tep_href_link('mondialrelayadmin.php', tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=cre').'"> ' . tep_image_button('button_createmr.gif', IMAGE_CREATE) . ' </a> ');
        else
            $contents[] = array('align' => 'center', 'text' => '<a href="' .tep_href_link('mondialrelayadmin.php', tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=cre').'"> ' . tep_image_button('button_createmr.gif', IMAGE_CREATE) . ' </a> <a href="'  .tep_href_link('mondialrelayadmin.php', tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=imprim').'">' . tep_image_button('button_printmr.gif', IMAGE_PRINT) . '</a> ');
        $contents[] = array('align' => 'center', 'text' => '<a href="' .tep_href_link('orders_invoice.php', 'oID=' . $oInfo->orders_id).'"> ' . tep_image_button('button_invoice.gif', IMAGE_INVOICE) . ' </a> <a href="' .tep_href_link('orders_packingslip.php', 'oID=' . $oInfo->orders_id).'"> ' . tep_image_button('button_packingslip.gif', IMAGE_ORDERS_PACKINGSLIP) . ' </a> ');
        $contents[] = array('text' => '<br />' . TEXT_DATE_ORDER_CREATED . ' ' . tep_date_short($oInfo->date_purchased));
        if (tep_not_null($oInfo->last_modified)) $contents[] = array('text' => TEXT_DATE_ORDER_LAST_MODIFIED . ' ' . tep_date_short($oInfo->last_modified));
        $contents[] = array('text' => '<br />' . TEXT_INFO_PAYMENT_METHOD . ' '  . $oInfo->payment_method);
      }


  if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
    echo '            <td width="25%" valign="top">' . "\n";

    $box = new box;
    echo $box->infoBox($heading, $contents);

    echo '            </td>' . "\n";
  }
?>
          </tr>
        </table></td>
      </tr>

    </table></td>
<!-- body_text_eof //-->
  </tr>
</table>

<?php
  require('includes/template_bottom.php');
  require('includes/application_bottom.php');

?>

</body></html>


MODULE

Code
<?php

function accents($chaine)
    {
        $conversion = array("¥" => "Y", "µ" => "u", "À" => "A", "Á" => "A",
                "Â" => "A", "Ã" => "A", "Ä" => "A", "Å" => "A",
                "Æ" => "A", "Ç" => "C", "È" => "E", "É" => "E",
                "Ê" => "E", "Ë" => "E", "Ì" => "I", "Í" => "I",
                "Î" => "I", "Ï" => "I", "Ð" => "D", "Ñ" => "N",
                "Ò" => "O", "Ó" => "O", "Ô" => "O", "Õ" => "O",
                "Ö" => "O", "Ø" => "O", "Ù" => "U", "Ú" => "U",
                "Û" => "U", "Ü" => "U", "Ý" => "Y", "ß" => "s",
                "à" => "a", "á" => "a", "â" => "a", "ã" => "a",
                "ä" => "a", "å" => "a", "æ" => "a", "ç" => "c",
                "è" => "e", "é" => "e", "ê" => "e", "ë" => "e",
                "ì" => "i", "í" => "i", "î" => "i", "ï" => "i",
                "ð" => "o", "ñ" => "n", "ò" => "o", "ó" => "o",
                "ô" => "o", "õ" => "o", "ö" => "o", "ø" => "o",
                "ù" => "u", "ú" => "u", "û" => "u", "ü" => "u",
                "ý" => "y", "ÿ" => "y");
    
return strtr("$chaine", $conversion);
    }

     class mondialrelay{
    
     function log($teste)
     {
     $log = fopen(DIR_FS_CATALOG."/logs/log.txt", "a");
     if($teste!=NULL)
     {
     fprintf($log,print_r($teste,true)."\n");
     }
     else
     {
     fprintf($log,"variable vide\n");
     }
     fclose($log);
     }
     var $code, $title, $sort_order, $description, $enabled;
     function __construct(){
     $this->code='mondialrelay';
     $this->title = MODULE_SHIPPING_MONDIAL_RELAY_TEXT_TITLE;
     $this->description = MODULE_SHIPPING_MONDIAL_RELAY_DESCRIPTION;

     if ( defined('MODULE_SHIPPING__MONDIAL_RELAY_STATUS') ) {
      $this->sort_order = MODULE_SHIPPING_MONDIAL_RELAY_SORT_ORDER;
      $this->icon = '';
      $this->tax_class = MODULE_SHIPPING_MONDIAL_RELAY_TABLE_TAX_CLASS;
      $this->enabled = ((MODULE_SHIPPING_MONDIAL_RELAY_STATUS == 'true') ? true : false);
      $this->frais_fixes = MODULE_SHIPPING_MONDIAL_RELAY_FRAIS_FIXES;
}
}
function quote($method = '')
{
global $shipping_weight;
//soap
if($shipping_weight>=0.1)
{
global $order;
$client = new SoapClient("https://www.mondialrelay.fr/WebService/Web_Services.asmx?WSDL");

$params = array('Enseigne'     => MODULE_SHIPPING_MONDIAL_RELAY_ENSEIGNE
,'Pays'         => $order->delivery['country']['iso_code_2']
,'Ville'        => accents($order->delivery['city'])
,'CP'           => $order->delivery['postcode']
,'Poids'        => round($shipping_weight*1000));
//On cr&eacute;e le code de s&eacute;curit&eacute;
$code = implode("",$params);
$code .= MODULE_SHIPPING_MONDIAL_RELAY_CLE_PRIVEE;

//On le rajoute aux param&eacute;tres
$params["Security"] = strtoupper(md5($code));
$pointsRelais = $client->WSI2_RecherchePointRelais($params)->WSI2_RecherchePointRelaisResult;// r&eacute;cuper la liste des points relais
if($pointsRelais->STAT==0)
{
// calcul du tarif
$table = preg_split("/[:,]/" , MODULE_SHIPPING_MONDIAL_RELAY_TARIF);
$tarifTrouve=true;
for ($i = 0; $i < sizeof($table); $i+=2) {
          if ($shipping_weight > $table[$i])
    continue;
    if (($shipping_weight < $table[$i]) AND $tarifTrouve) {
                $tarif=$table[$i+1];
                $tarifTrouve=false;
                }
                }

                $methods = array();
                foreach($pointsRelais as $pointRelais)
                {
                if( is_object($pointRelais) && trim($pointRelais->Num) != '' ){
        
        //On cr&eacute;e le code de s&eacute;curit&eacute;
        $code = implode("",$params);
        $code .= MODULE_SHIPPING_MONDIAL_RELAY_CLE_PRIVEE;
        
        //On le rajoute aux paramêtres
        $params['Security'] = strtoupper(md5($code));
        // Et on effectue la requête
        //                    $detail_pointrelais = $client->WSI2_DetailPointRelais($params)->WSI2_DetailPointRelaisResult;
            
            $popup_params = array(
            'ens'     => MODULE_SHIPPING_MONDIAL_RELAY_MARQUE_URL
        ,'Num'    => $pointRelais->Num
            ,'Pays'   => $pointRelais->Pays
            );
            
            $popup_code = '<'.MODULE_SHIPPING_MONDIAL_RELAY_MARQUE_URL.'>'.$pointRelais->Num.$pointRelais->Pays.'<'.MODULE_SHIPPING_MONDIAL_RELAY_CLE_PRIVEE_URL.'>';
                    
                    
                    $security = strtoupper(md5($popup_code));
                    
                    $link = 'https://www.mondialrelay.com/public/permanent/details_relais.aspx?ens='. MODULE_SHIPPING_MONDIAL_RELAY_MARQUE_URL .'&num='.$pointRelais->Num.'&pays='.$pointRelais->Pays.'&crc='.$security;
    
            $methods[]=array('id'     => $pointRelais->Num . $pointRelais->Pays
                    ,'title'  => $pointRelais->LgAdr1 ." à ".$pointRelais->Ville ." ".$pointRelais->CP ." <a onclick=\"
                    window.open ('". $link ."', '', 'height=800, width=450, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no');\">d&eacute;tail</a>"
                    ,'cost'   => $tarif + $this->frais_fixes);
            }    
            }

            $this->quotes = array('id' => $this->code,
                    'module' => $this->title,
                    '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);
                  

                    return $this->quotes;
            }
            else
            {
            $this->quotes = array('module' => $this->title,
                    'error' => MODULE_SHIPPING_MONDIAL_RELAY_ERROR);
                    return $this->quotes;
            }
            }
            else
            {
                    return;
            }
            }
                                        
    function check() {
        $retourdb = tep_db_query("select configuration_value from configuration where configuration_key= 'MODULE_SHIPPING_MONDIAL_RELAY_STATUS' ");
        $this->checked = tep_db_num_rows($retourdb);
        return $this->checked;
                }
    function remove() {
        tep_db_query("delete from configuration where configuration_key in ('" . implode("', '", $this->keys()) . "')");
        tep_db_query("ALTER table orders DROP shipping_pointrelay");
        tep_db_query("ALTER table orders DROP shipping_traking");
                }
                                        
                                        
    function install() {
      tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Ordre de tri', 'MODULE_SHIPPING_MONDIAL_RELAY_SORT_ORDER', '0', 'Ordre de tri pour l\'affichage (Le plus petit nombre est montr&eacute; en premier).', '6', '0', now())");
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Enseigne', 'MODULE_SHIPPING_MONDIAL_RELAY_ENSEIGNE', 'BDTESTMR', 'Enseigne fournie par mondial relay.', '6', '0', now())");
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Marque', 'MODULE_SHIPPING_MONDIAL_RELAY_MARQUE', 'BD', 'Marque fournie par mondial relay.', '6', '0', now())");
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Cl&eacute; priv&eacute;e', 'MODULE_SHIPPING_MONDIAL_RELAY_CLE_PRIVEE', 'TesT_MondiaL_RelaY', 'Cl&eacute; fournie par mondial relay.', '6', '0', now())");
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Marque(url)', 'MODULE_SHIPPING_MONDIAL_RELAY_MARQUE_URL', 'BDTESTMR11', 'Marque(url) fournie par mondial relay.', '6', '0', now())");
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Cl&eacute; priv&eacute;e (url)', 'MODULE_SHIPPING_MONDIAL_RELAY_CLE_PRIVEE_URL', 'TesT_MondiaL_RelaY', 'Cl&eacute; fournie par mondial relay.', '6', '0', now())");
      tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Activer ce mode de livraison', 'MODULE_SHIPPING_MONDIAL_RELAY_STATUS', 'true', 'Voulez-vous utiliser ce mode de livraison?', '6', '0', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now())");
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Civilit&eacute; Nom Pr&eacute;nom', 'MODULE_SHIPPING_MONDIAL_RELAY_EXPE_AD1', '".STORE_NAME."', 'Civilit&eacute; Nom Pr&eacute;nom(Civilit&eacute;s accept&eacute;es:\'MR\',\'M\',\'M.\', \'MME\', \'MLE\' et \'MLLE\').', '6', '0', now())");
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Pays d\'exp&eacute;dition', 'MODULE_SHIPPING_MONDIAL_RELAY_EXPE_PAYS', 'FR', 'Pays d\'exp&eacute;dition(Pays accept&eacute;es:\'FR\',\'BE\',\'LU\' et \'ES\').', '6', '0', now())");
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Rue', 'MODULE_SHIPPING_MONDIAL_RELAY_EXPE_AD3', 'Rue', 'Rue.', '6', '0', now())");
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Ville', 'MODULE_SHIPPING_MONDIAL_RELAY_Expe_EXPE_VILLE', 'ville', 'ville.', '6', '0', now())");
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Code Postal', 'MODULE_SHIPPING_MONDIAL_RELAY_Expe_EXPE_CP', '02270', 'Code Postal.', '6', '0', now())");
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('T&eacute;l&eacute;phone', 'MODULE_SHIPPING_MONDIAL_RELAY_EXPE_TEL1', '0123456789', 'T&eacute;l&eacute;phone Fixe.', '6', '0', now())");
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('TVA applicable', 'MODULE_SHIPPING_MONDIAL_RELAY_TABLE_TAX_CLASS', '0', 'S&eacute;lectionnez la TVA applicable sur le montant de la livraison.', '6', '0', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now())");
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Tarif', 'MODULE_SHIPPING_MONDIAL_RELAY_TARIF', '0.50:4.20,1.00:4.20,2.00:5.50,3.00:6.20,5.00:7.50,7.00:9.60,10.00:11.95,15.00:14.35,20.00:17.95', 'Tarif appliqu&eacute; suivant le poids.', '6', '0', now())");
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Frais fixes', 'MODULE_SHIPPING_MONDIAL_RELAY_FRAIS_FIXES', '0', 'Frais fixes (emballage).', '6', '0', now())");
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Format des &eacute;tiquettes', 'MODULE_SHIPPING_MONDIAL_RELAY_FORMAT_PDF', 'A5', 'Format des PDF des &eacute;tiquettes', '6', '0', 'tep_cfg_select_option(array(\'A4\', \'A5\'), ', now())");
        tep_db_query("ALTER table orders ADD shipping_pointrelay char(8)");
        tep_db_query("ALTER table orders ADD shipping_traking char(8)");
        }
    function keys() {
        return array('MODULE_SHIPPING_MONDIAL_RELAY_STATUS','MODULE_SHIPPING_MONDIAL_RELAY_ENSEIGNE','MODULE_SHIPPING_MONDIAL_RELAY_CLE_PRIVEE','MODULE_SHIPPING_MONDIAL_RELAY_CLE_PRIVEE_URL','MODULE_SHIPPING_MONDIAL_RELAY_MARQUE_URL','MODULE_SHIPPING_MONDIAL_RELAY_MARQUE','MODULE_SHIPPING_MONDIAL_RELAY_TARIF','MODULE_SHIPPING_MONDIAL_RELAY_FRAIS_FIXES','MODULE_SHIPPING_MONDIAL_RELAY_EXPE_AD1','MODULE_SHIPPING_MONDIAL_RELAY_Expe_Ad3','MODULE_SHIPPING_MONDIAL_RELAY_Expe_EXPE_VILLE','MODULE_SHIPPING_MONDIAL_RELAY_Expe_EXPE_CP','MODULE_SHIPPING_MONDIAL_RELAY_EXPE_TEL1','MODULE_SHIPPING_MONDIAL_RELAY_SORT_ORDER','MODULE_SHIPPING_MONDIAL_RELAY_TABLE_TAX_CLASS');
        }
        }
?>

Écrit par : Bonbec 10 Feb 2020, 14:48

Je vais faire un zip de mes fichiers dans le courant de l'après midi, tu pourras essayer.
Si çà ne fonctionne pas, c'est que le problème est ailleurs.

Écrit par : thiery 10 Feb 2020, 16:03

re ok merci je ferai le test
si cela ne fonctionne pas je reprendrais les mises à jours de phoenix
peut être une bourde au fil des passages des versions
mais je doute car je peu installer les autre modules de transport
à voir
encore merci

Écrit par : Bonbec 10 Feb 2020, 16:51

Voilà le zip.
Il reste des choses à faire encore mais çà devrait permettre de voir si çà fonctionne chez toi.
Penses à désinstaller celui que tu as déjà avant d'installer celui-ci.

 mondial_relay_phoenix_en_cours.zip ( 25.04 Ko ) : 10
 

Écrit par : thiery 10 Feb 2020, 19:11

re
merci
je dois avoir un autre problème
par contre j'ai bien le logo Active et la position dans l'admin ce que je n'avais pas
quand j'installe le module mondial le logo du statut reste au rouge pas de vert

par contre encore aucun message d'erreur !
comme je suis en phœnix 1.0.5.0, je vais regarder si je n'ai pas louper une modification
ou alors une mauvaise configuration des zones
car sur le module flat, si j'indique pas de zone, logo au vert
si j'indique dom tom ou france revient au rouge, mais si je suis en france avec adresse fr malgré le logo rouge le module affiche bien le transport forfaitaire

du coup je suis comme mes fichiers je bug wink.gif
à bientôt thierry

Écrit par : Bonbec 10 Feb 2020, 21:05

Re,
J'étais en 1041, je viens d'installer la 1050 et j'ai le rouge comme toi pour mondialrelay, par contre flat est vert.
Je vais regarder cela smile.gif

Écrit par : thiery 10 Feb 2020, 21:37

re
ok
pour moi donc flat est au vert si j'indique aucune zone, mais si j'indique france il est au rouge, mais il est quand même visible du coté catalogue !

pour modial rouge , mais comme il n'ait pas possible de choisir de zone c'est peut être pour cela qu'il ne passe pas au vert mais pas visible coté catalogue

la zone france que j'ai crée, j'ai fais france puis toutes les zones

merci wink.gif


Écrit par : Bonbec 10 Feb 2020, 21:38

Bon, dans le fichier includes/modules/shipping/mondialrelay.php :

Remplace la function check par

Code
    function check() {
      if (!isset($this->_check)) {
        $check_query = tep_db_query("select configuration_value FROM configuration WHERE configuration_key= 'MODULE_SHIPPING_MONDIAL_RELAY_STATUS' ");
        $this->_check = tep_db_num_rows($check_query);
      }
      return $this->_check;
    }

Puis dans la function install ajoute cette ligne en premier
Code
        tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Flat Shipping', 'MODULE_SHIPPING_MONDIAL_RELAY_STATUS', 'True', 'Do you want to offer flat rate shipping?', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");

Désinstalle le module puis réinstalle le. Le vert doit fonctionner.

Écrit par : thiery 10 Feb 2020, 23:26

re
encore merci pour l'aide
fichier modifier

enfin c'est ok pour moi le point relais sont affiché

juste une petite erreur dans ton fichier il y avait oui et non wink.gif changement en true\', \'false

Code
tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Activer ce mode de livraison', 'MODULE_SHIPPING_MONDIAL_RELAY_STATUS', 'true', 'Voulez-vous utiliser ce mode de livraison?', '6', '0', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now())");


à bientôt thierry

Écrit par : Bonbec 11 Feb 2020, 09:11

Re,

Bien vu ! J'ai copié un fichier intermédiaire de travail au lieu du bon.
Les points relais s'affichent maintenant ?
Si oui, il y a "détail" dans la ligne du point relai, çà fonctionne si tu cliques dessus ? Pas pour moi par contre.

Écrit par : thiery 11 Feb 2020, 09:21

re
idem pour moi impossible d'avoir les détails je n'ai même pas la possible de cliquer dessus il est grisé

Écrit par : Bonbec 11 Feb 2020, 14:34

Re,

Dans le fichier includes/module/shipping/mondialrelay.php il faut décommenter la ligne 103 ( retirer les // )

Code
        //                    $detail_pointrelais = $client->WSI2_DetailPointRelais($params)->WSI2_DetailPointRelaisResult;
et on obtient un début de quelque chose.
J'ai un affichage bizarre ... la suite dès que je peux (sauf si tu trouves quelque chose entre temps happy.gif

Écrit par : thiery 11 Feb 2020, 18:14

re wink.gif
merci c'est ok pour l'ouverture de page
comme toi page généraliste
peut être un problème de chez mondial ou le lien n'est plus bon
je t’envoie de la doc par mail wink.gif


Écrit par : Bonbec 11 Feb 2020, 18:21

Re,
Vu que c'est une page d'erreur, le lien n'est plus bon angry.gif
Merci, je vais regarder ta doc à réception.
PS : je fignole pour faire afficher la rue du relais en plus (çà fonctionne mais faut que l'améliore l'affichage).

Écrit par : chti_poupon 30 Apr 2020, 13:39

Bonjour,
Je compare les fichiers Mondial Relay MS2.2 avec celui publié par tiery pour vous faire part des petites modifications que j'avais faites à l'usage pour éviter divers "bugs" dus à la formulation du client:
Dans l'admin:
ligne 142

Code
,'Dest_Langage'   => trim($codePaysDest['code'])

Lignes 147 à 151
Code
,'Dest_CP'        => str_replace(' ','',$infoDest['delivery_postcode'])
,'Dest_Pays'      => trim($codePaysDest['code'])
,'Dest_Tel1'      => preg_replace("/\D/","",$infoDest['customers_telephone'])
,'Dest_Mail'      => accents($infoDest['customers_email_address'])
,'Poids'          => $totalWeight*1000

modifier lignes 165 à 170
Code
//send request
$expedition = $client->WSI2_CreationExpedition($params)->WSI2_CreationExpeditionResult;
iconv_set_encoding('text/html','UTF-8');
if($expedition->STAT != 0){
echo $infoExpe['MODULE_SHIPPING_MONDIAL_RELAY_EXPE_PAYS'];
echo $expedition->STAT;
}else{


Dans le module, on peut ajouter d'utiles commentaires (retrouvables sur ce forum, mais c'est plus long)
Code
/*
Codes Erreur MR:
0 Opération effectuée avec succès
1 Enseigne invalide
2 Numéro d'enseigne vide ou inexistant
3 Numéro de compte enseigne invalide
4
5 Numéro de dossier enseigne invalide
6
7 Numéro de client enseigne invalide
8 Mot de passe ou hashage invalide
9 Ville non reconnu ou non unique
10 Type de collecte invalide
11 Numéro de Relais de Collecte invalide
12 Pays de Relais de collecte invalide
13 Type de livraison invalide
14 Numéro de Relais de livraison invalide
15 Pays de Relais de livraison invalide
16 Code pays invalide
17 Adresse invalide
18 Ville invalide
19 Code postal invalide
20 Poids du colis invalide
21 Taille (Longueur + Hauteur) du colis invalide
22 Taille du Colis invalide
23
24 Numéro d'expédition ou de suivi invalide
25
26 Temps de montage invalide
27 Mode de collecte ou de livraison invalide
28 Mode de collecte invalide
29 Mode de livraison invalide
30 Adresse (L1) de l'expéditeur invalide
*/

et deux fonctions utiles pour le suivi de l'expédition:
Code
    function avancement($trace_code) {
        $avancement = array (
        '80' => 'Colis Enregistré',
        '81' => 'Colis en Traitement chez Mondial Relay',
        '82' => 'Colis Livré',
        '83' => 'Colis Anomalie',
        '84' => 'Colis ',
        '85' => 'Colis ',
        '86' => 'Colis ',
        '87' => 'Colis ',
        '88' => 'Colis ',
        '89' => 'Colis ',
        );
        return $avancement[$trace_code];
    }

et pour que le client se renseigne à partir de son n°d'expédition:
Code
function trace($trace_num)
    {
//soap
         $trace_num = trim($trace_num);
         if(strlen($trace_num) == 8)
         {
           $client = new SoapClient("http://www.mondialrelay.fr/WebService/Web_Services.asmx?WSDL");
  
           $params = array(
                           'Enseigne'     => MODULE_SHIPPING_MONDIAL_RELAY_ENSEIGNE,
                           'Expedition'   => $trace_num,
                           'Langue'       => 'FR'
                           );
  //On crée le code de sécurité
            $code = implode("",$params);
            $code .= MODULE_SHIPPING_MONDIAL_RELAY_CLE_PRIVEE;
  // On le rajoute aux paramétres
            $params["Security"] = strtoupper(md5($code));
            $trace_colis = $client->WSI2_TracingColisDetaille($params)->WSI2_TracingColisDetailleResult;// récupere le tracing
            if($trace_colis->STAT > 79 && $trace_colis->STAT < 90)
            {
  // Décryptage de la réponse normale
                $avancement = avancement($trace_colis->STAT);
                }else{
                $avancement = '' . MODULE_SHIPPING_MONDIAL_RELAY_ERROR . 'n° : ' . $trace_colis->STAT . ' Contactez-nous. Merci !! ';
             }
                return $avancement;
           }else{
             return;
           }
    }


A toutes fins utiles

Chti poupon

Écrit par : thiery 30 Apr 2020, 23:12

Bonsoir
merci chti_poupon
à bientôt thiery

Écrit par : thiery 21 Oct 2021, 15:52

bonjour reprise du travail de mondial relay mais avec la version 1.0.8.6
dur de suivre l’évolution

donc j'ai repris le travail effectué avec Bonbec qui était ok sur la 1.0.4
donc réinstallation, et du coup dans checkout_process.php il n'y plus que 3 lignes dans la version 1.0.8.6
maintenant je ne sais pas ou je dois ajouter les lignes de commandes

Citation
//Start Mondial Relay
if(substr($shipping['id'],0,12)=="mondialrelay")
{
tep_db_query("update " . TABLE_ORDERS . " set shipping_pointrelay = '" . substr($shipping['id'],-cool.gif . "' where orders_id = '".$insert_id."'");
}
//End Mondial Relay


si vous avez une idée, je suis preneur, j'ai quand même laissé une demande sur le forum de la community
sinon j'ai essayé d'installer quand même comme cela, mais j'ai une page blanche, je ne sais pas si c'est le manque dans checkout_process.php
qui fait que j'ai la page blanche
j'ai aussi essayé de quand même l'ajouter sans checkout_process.php, mais c'est identique page blanche
si ce n'est pas le manque dans le fichier checkout_process.php , dans l'installe il y a certainement des modifications à faire
merci par avance
thierry

Propulsé par Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)