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

Bienvenue invité ( Connexion | Inscription )

2 Pages V   1 2 >  
Reply to this topicStart new topic
> mondial relais
thiery
posté 27 Jan 2020, 23:15
Message #1


Ceinture orange+ OSC
Icône de groupe

Groupe : Membres
Messages : 308
Inscrit : 10-November 02
Membre no 574



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


--------------------
oscommerce 2.3.3.4 , ,easy_populate,Ultimate SEO,Discount Codes,Multiple Produit Manager,Multiorders,
phoenix 1.0.8.6
Go to the top of the page
 
Bonbec
posté 27 Jan 2020, 23:54
Message #2


Ceinture marron OSC
Icône de groupe

Groupe : Modérateurs
Messages : 1543
Inscrit : 30-May 06
Lieu : Vichy (03)
Membre no 10583



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


--------------------
Config 1 en live : Osc 2.2 très fortement modifié ... UTF-8 et Php 5.4.
Contribs installées : down_for_maintenance_v 2.3 | Estimated Shipping v1.5 | imprint_1_3_5 | low_stock_report_v2.04 | visible_countries_1.2b | Products Tabs | shoppingCart_cleanup_v1.01.0 | + trop de bidouilles persos pas très OsCommerce (erreurs de jeunesse)
Config 2 en local avec UwAmp : Osc Phoenix
Go to the top of the page
 
thiery
posté 28 Jan 2020, 14:10
Message #3


Ceinture orange+ OSC
Icône de groupe

Groupe : Membres
Messages : 308
Inscrit : 10-November 02
Membre no 574



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

Ce message a été modifié par thiery - 28 Jan 2020, 14:10.


--------------------
oscommerce 2.3.3.4 , ,easy_populate,Ultimate SEO,Discount Codes,Multiple Produit Manager,Multiorders,
phoenix 1.0.8.6
Go to the top of the page
 
thiery
posté 28 Jan 2020, 16:06
Message #4


Ceinture orange+ OSC
Icône de groupe

Groupe : Membres
Messages : 308
Inscrit : 10-November 02
Membre no 574



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');
        }
        }
?>


Ce message a été modifié par thiery - 28 Jan 2020, 19:38.


--------------------
oscommerce 2.3.3.4 , ,easy_populate,Ultimate SEO,Discount Codes,Multiple Produit Manager,Multiorders,
phoenix 1.0.8.6
Go to the top of the page
 
Bonbec
posté 28 Jan 2020, 22:57
Message #5


Ceinture marron OSC
Icône de groupe

Groupe : Modérateurs
Messages : 1543
Inscrit : 30-May 06
Lieu : Vichy (03)
Membre no 10583



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.


--------------------
Config 1 en live : Osc 2.2 très fortement modifié ... UTF-8 et Php 5.4.
Contribs installées : down_for_maintenance_v 2.3 | Estimated Shipping v1.5 | imprint_1_3_5 | low_stock_report_v2.04 | visible_countries_1.2b | Products Tabs | shoppingCart_cleanup_v1.01.0 | + trop de bidouilles persos pas très OsCommerce (erreurs de jeunesse)
Config 2 en local avec UwAmp : Osc Phoenix
Go to the top of the page
 
Bonbec
posté 29 Jan 2020, 09:17
Message #6


Ceinture marron OSC
Icône de groupe

Groupe : Modérateurs
Messages : 1543
Inscrit : 30-May 06
Lieu : Vichy (03)
Membre no 10583



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....mp;#entry372602


--------------------
Config 1 en live : Osc 2.2 très fortement modifié ... UTF-8 et Php 5.4.
Contribs installées : down_for_maintenance_v 2.3 | Estimated Shipping v1.5 | imprint_1_3_5 | low_stock_report_v2.04 | visible_countries_1.2b | Products Tabs | shoppingCart_cleanup_v1.01.0 | + trop de bidouilles persos pas très OsCommerce (erreurs de jeunesse)
Config 2 en local avec UwAmp : Osc Phoenix
Go to the top of the page
 
thiery
posté 29 Jan 2020, 12:06
Message #7


Ceinture orange+ OSC
Icône de groupe

Groupe : Membres
Messages : 308
Inscrit : 10-November 02
Membre no 574



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

Ce message a été modifié par thiery - 29 Jan 2020, 12:06.


--------------------
oscommerce 2.3.3.4 , ,easy_populate,Ultimate SEO,Discount Codes,Multiple Produit Manager,Multiorders,
phoenix 1.0.8.6
Go to the top of the page
 
Bonbec
posté 29 Jan 2020, 18:14
Message #8


Ceinture marron OSC
Icône de groupe

Groupe : Modérateurs
Messages : 1543
Inscrit : 30-May 06
Lieu : Vichy (03)
Membre no 10583



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


--------------------
Config 1 en live : Osc 2.2 très fortement modifié ... UTF-8 et Php 5.4.
Contribs installées : down_for_maintenance_v 2.3 | Estimated Shipping v1.5 | imprint_1_3_5 | low_stock_report_v2.04 | visible_countries_1.2b | Products Tabs | shoppingCart_cleanup_v1.01.0 | + trop de bidouilles persos pas très OsCommerce (erreurs de jeunesse)
Config 2 en local avec UwAmp : Osc Phoenix
Go to the top of the page
 
thiery
posté 29 Jan 2020, 19:21
Message #9


Ceinture orange+ OSC
Icône de groupe

Groupe : Membres
Messages : 308
Inscrit : 10-November 02
Membre no 574



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


--------------------
oscommerce 2.3.3.4 , ,easy_populate,Ultimate SEO,Discount Codes,Multiple Produit Manager,Multiorders,
phoenix 1.0.8.6
Go to the top of the page
 
thiery
posté 29 Jan 2020, 23:16
Message #10


Ceinture orange+ OSC
Icône de groupe

Groupe : Membres
Messages : 308
Inscrit : 10-November 02
Membre no 574



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


--------------------
oscommerce 2.3.3.4 , ,easy_populate,Ultimate SEO,Discount Codes,Multiple Produit Manager,Multiorders,
phoenix 1.0.8.6
Go to the top of the page
 
Bonbec
posté 6 Feb 2020, 10:02
Message #11


Ceinture marron OSC
Icône de groupe

Groupe : Modérateurs
Messages : 1543
Inscrit : 30-May 06
Lieu : Vichy (03)
Membre no 10583



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


--------------------
Config 1 en live : Osc 2.2 très fortement modifié ... UTF-8 et Php 5.4.
Contribs installées : down_for_maintenance_v 2.3 | Estimated Shipping v1.5 | imprint_1_3_5 | low_stock_report_v2.04 | visible_countries_1.2b | Products Tabs | shoppingCart_cleanup_v1.01.0 | + trop de bidouilles persos pas très OsCommerce (erreurs de jeunesse)
Config 2 en local avec UwAmp : Osc Phoenix
Go to the top of the page
 
thiery
posté 6 Feb 2020, 15:17
Message #12


Ceinture orange+ OSC
Icône de groupe

Groupe : Membres
Messages : 308
Inscrit : 10-November 02
Membre no 574



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


--------------------
oscommerce 2.3.3.4 , ,easy_populate,Ultimate SEO,Discount Codes,Multiple Produit Manager,Multiorders,
phoenix 1.0.8.6
Go to the top of the page
 
Bonbec
posté 6 Feb 2020, 15:28
Message #13


Ceinture marron OSC
Icône de groupe

Groupe : Modérateurs
Messages : 1543
Inscrit : 30-May 06
Lieu : Vichy (03)
Membre no 10583



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


--------------------
Config 1 en live : Osc 2.2 très fortement modifié ... UTF-8 et Php 5.4.
Contribs installées : down_for_maintenance_v 2.3 | Estimated Shipping v1.5 | imprint_1_3_5 | low_stock_report_v2.04 | visible_countries_1.2b | Products Tabs | shoppingCart_cleanup_v1.01.0 | + trop de bidouilles persos pas très OsCommerce (erreurs de jeunesse)
Config 2 en local avec UwAmp : Osc Phoenix
Go to the top of the page
 
thiery
posté 6 Feb 2020, 15:51
Message #14


Ceinture orange+ OSC
Icône de groupe

Groupe : Membres
Messages : 308
Inscrit : 10-November 02
Membre no 574



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


--------------------
oscommerce 2.3.3.4 , ,easy_populate,Ultimate SEO,Discount Codes,Multiple Produit Manager,Multiorders,
phoenix 1.0.8.6
Go to the top of the page
 
Bonbec
posté 6 Feb 2020, 17:04
Message #15


Ceinture marron OSC
Icône de groupe

Groupe : Modérateurs
Messages : 1543
Inscrit : 30-May 06
Lieu : Vichy (03)
Membre no 10583



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


--------------------
Config 1 en live : Osc 2.2 très fortement modifié ... UTF-8 et Php 5.4.
Contribs installées : down_for_maintenance_v 2.3 | Estimated Shipping v1.5 | imprint_1_3_5 | low_stock_report_v2.04 | visible_countries_1.2b | Products Tabs | shoppingCart_cleanup_v1.01.0 | + trop de bidouilles persos pas très OsCommerce (erreurs de jeunesse)
Config 2 en local avec UwAmp : Osc Phoenix
Go to the top of the page
 
thiery
posté 6 Feb 2020, 19:57
Message #16


Ceinture orange+ OSC
Icône de groupe

Groupe : Membres
Messages : 308
Inscrit : 10-November 02
Membre no 574



re
merci
modification faite ,
idem pas de changement

à bientôt thierry


--------------------
oscommerce 2.3.3.4 , ,easy_populate,Ultimate SEO,Discount Codes,Multiple Produit Manager,Multiorders,
phoenix 1.0.8.6
Go to the top of the page
 
Bonbec
posté 7 Feb 2020, 02:21
Message #17


Ceinture marron OSC
Icône de groupe

Groupe : Modérateurs
Messages : 1543
Inscrit : 30-May 06
Lieu : Vichy (03)
Membre no 10583



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.


--------------------
Config 1 en live : Osc 2.2 très fortement modifié ... UTF-8 et Php 5.4.
Contribs installées : down_for_maintenance_v 2.3 | Estimated Shipping v1.5 | imprint_1_3_5 | low_stock_report_v2.04 | visible_countries_1.2b | Products Tabs | shoppingCart_cleanup_v1.01.0 | + trop de bidouilles persos pas très OsCommerce (erreurs de jeunesse)
Config 2 en local avec UwAmp : Osc Phoenix
Go to the top of the page
 
thiery
posté 7 Feb 2020, 15:28
Message #18


Ceinture orange+ OSC
Icône de groupe

Groupe : Membres
Messages : 308
Inscrit : 10-November 02
Membre no 574



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


--------------------
oscommerce 2.3.3.4 , ,easy_populate,Ultimate SEO,Discount Codes,Multiple Produit Manager,Multiorders,
phoenix 1.0.8.6
Go to the top of the page
 
thiery
posté 7 Feb 2020, 15:48
Message #19


Ceinture orange+ OSC
Icône de groupe

Groupe : Membres
Messages : 308
Inscrit : 10-November 02
Membre no 574



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>


Ce message a été modifié par thiery - 7 Feb 2020, 15:52.


--------------------
oscommerce 2.3.3.4 , ,easy_populate,Ultimate SEO,Discount Codes,Multiple Produit Manager,Multiorders,
phoenix 1.0.8.6
Go to the top of the page
 
Bonbec
posté 7 Feb 2020, 17:59
Message #20


Ceinture marron OSC
Icône de groupe

Groupe : Modérateurs
Messages : 1543
Inscrit : 30-May 06
Lieu : Vichy (03)
Membre no 10583



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.


--------------------
Config 1 en live : Osc 2.2 très fortement modifié ... UTF-8 et Php 5.4.
Contribs installées : down_for_maintenance_v 2.3 | Estimated Shipping v1.5 | imprint_1_3_5 | low_stock_report_v2.04 | visible_countries_1.2b | Products Tabs | shoppingCart_cleanup_v1.01.0 | + trop de bidouilles persos pas très OsCommerce (erreurs de jeunesse)
Config 2 en local avec UwAmp : Osc Phoenix
Go to the top of the page
 
thiery
posté 7 Feb 2020, 20:39
Message #21


Ceinture orange+ OSC
Icône de groupe

Groupe : Membres
Messages : 308
Inscrit : 10-November 02
Membre no 574



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


--------------------
oscommerce 2.3.3.4 , ,easy_populate,Ultimate SEO,Discount Codes,Multiple Produit Manager,Multiorders,
phoenix 1.0.8.6
Go to the top of the page
 
Bonbec
posté 8 Feb 2020, 10:54
Message #22


Ceinture marron OSC
Icône de groupe

Groupe : Modérateurs
Messages : 1543
Inscrit : 30-May 06
Lieu : Vichy (03)
Membre no 10583



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:


--------------------
Config 1 en live : Osc 2.2 très fortement modifié ... UTF-8 et Php 5.4.
Contribs installées : down_for_maintenance_v 2.3 | Estimated Shipping v1.5 | imprint_1_3_5 | low_stock_report_v2.04 | visible_countries_1.2b | Products Tabs | shoppingCart_cleanup_v1.01.0 | + trop de bidouilles persos pas très OsCommerce (erreurs de jeunesse)
Config 2 en local avec UwAmp : Osc Phoenix
Go to the top of the page
 
thiery
posté 8 Feb 2020, 19:58
Message #23


Ceinture orange+ OSC
Icône de groupe

Groupe : Membres
Messages : 308
Inscrit : 10-November 02
Membre no 574



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

Ce message a été modifié par thiery - 8 Feb 2020, 20:01.


--------------------
oscommerce 2.3.3.4 , ,easy_populate,Ultimate SEO,Discount Codes,Multiple Produit Manager,Multiorders,
phoenix 1.0.8.6
Go to the top of the page
 
Bonbec
posté 10 Feb 2020, 02:06
Message #24


Ceinture marron OSC
Icône de groupe

Groupe : Modérateurs
Messages : 1543
Inscrit : 30-May 06
Lieu : Vichy (03)
Membre no 10583



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.


Fichier(s) joint(s)
Fichier joint  Sans_titre_3.jpg ( 54.66 Ko ) Nombre de téléchargements : 10
 


--------------------
Config 1 en live : Osc 2.2 très fortement modifié ... UTF-8 et Php 5.4.
Contribs installées : down_for_maintenance_v 2.3 | Estimated Shipping v1.5 | imprint_1_3_5 | low_stock_report_v2.04 | visible_countries_1.2b | Products Tabs | shoppingCart_cleanup_v1.01.0 | + trop de bidouilles persos pas très OsCommerce (erreurs de jeunesse)
Config 2 en local avec UwAmp : Osc Phoenix
Go to the top of the page
 
thiery
posté 10 Feb 2020, 09:53
Message #25


Ceinture orange+ OSC
Icône de groupe

Groupe : Membres
Messages : 308
Inscrit : 10-November 02
Membre no 574



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

Ce message a été modifié par thiery - 10 Feb 2020, 09:54.


--------------------
oscommerce 2.3.3.4 , ,easy_populate,Ultimate SEO,Discount Codes,Multiple Produit Manager,Multiorders,
phoenix 1.0.8.6
Go to the top of the page
 

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

 



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