Aide - Recherche - Membres - Calendrier
Version complète : Passage obligé par les CGV
Forum osCommerce-fr > Adapter OsCommerce MS2 > Contributions
Biyyo
Je fais référence à la FAQ Comment obliger les clients à consulter les conditions générales de vente avant de passer à la phase de confirmation d'une commande

Ca ne marche pas si ce n'est pas coché, En fait si ce n'est pas coché, je retoune à la page d'ouverture de session d'avoir le message d'erreur "vous n'avez pas pris connaissance...."

MErci pour votre aide
JeanLuc
C'est le fonctionnement normal de cette modification...
Le client doit cocher la case pour indiquer qu'il a bien lu les CGV;
libre à lui de les lire effectivement ou non, le but étant simplement d'attirer son attention sur l'utilité de le faire (c'est son intérêt).
decad7
Oui ok,

mais le problème étant du fait que si la case n'est pas coché, et que le bouton continuer est pressé. On retourne sur la page loggin. Et en plus de cela on perd la session en cours.

Ce qui n'est pas trés normal..

je planche sur ce problème.

++
fab
Biyyo
Merci Fab biggrin.gif
JeanLuc
Sinon, il y a Must agree to Terms qui fait cela très bien (sans bugs...)

Bon code... wink.gif
decad7
Voila j'ai trouvé une solution pour que tout marche correctement.

et juste une chose pendant que j'y suis. Je vous rappelle que cette option est devenu obligatoire sur tout site commercial. wink.gif

c'est a dire.

si la case n'est pas coché, et que l'on fait continuer la commande, un message d'erreur apparait.
si la case est coché, la transaction continu.

ensuite si l'on clique sur voir les conditions générales de vente et que l'on clic sur le bouton continuer se trouvant sur cette pages, on revient sur la page de paiement avec le bouton cocher. (car les conditions ont été lu).

voila.

je vous donne le code.

Fichier checkout_confirmation

juste dessous la ligne avec application_top.
CODE

if ($HTTP_POST_VARS['conditions'] != 'true') {    
   tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_NO_CHECK_CONDITION), 'SSL'));
 }


ensuite dans le fichier checkout_payment mettez le code ci-dessous ou vous souhaitez voir apparaitre la case a cocher avec le text.

CODE

<?php
  if($HTTP_GET_VARS['consult_conditions'])
   {
   echo '<input name="conditions" type="checkbox" value="true" checked>';
   }
  else
   {
   echo '<input name="conditions" type="checkbox" value="true">';
   }
 
  echo '<b>' . TEXT_CONDITIONS .'</b>';
 ?>


Ensuite dans /catalog/include/language/french/checkout_payment

CODE

define('TEXT_CONDITIONS', 'J\'ai lu et accepté les <a href=' . tep_href_link(FILENAME_CONDITIONS, 'origin=checkout_payment') . ' class="conditions"> Conditions générales de vente ! </a>');


et dans le fichier /catalog/include/language/french/checkout_confirmation

CODE

define('ERROR_NO_CHECK_CONDITION', 'Pour continuer votre commande la case conditions générales de vente doit être cochée !');


Ensuite dans 'catalog/conditions.php' :

remplacer

CODE

<td align="right" class="main"><br><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT, '', 'NONSSL') . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>


par

CODE

<td align="right" class="main"><br><?php if($HTTP_GET_VARS['origin'] == 'checkout_payment'){echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'consult_conditions=true', 'NONSSL') . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>';}else{echo '<a href="' . tep_href_link(FILENAME_DEFAULT, '', 'NONSSL') . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>';} ?></td>


Et normalement tout devrait fonctioner correctement..si je n'ai rien oublié biggrin.gif

++
fab

Ps : Pour les administrateurs => il serait bien que la FAQ soit mise a jour, dés qu'il y aura eu quelques retour concernant ce bout de code. Cela évitera d'avoir des personnes avec le même problème.
xaglo
QUOTE
il serait bien que la FAQ soit mise a jour
c'est fait smile.gif
Biyyo
Merci beaucoup, je vais tester

JE pense que sur ce forum, je ne vais rester longtemps débutant, je vais vite passé une étape au dessus smile.gif
decad7
je suis même en train de voir pour améliorer l'affichage du message d'erreur.

il serait bien que le message d'erreur fonctionne par exemple comme les erreur généré dans la création de compte par exemple.

Surligné en rouge sur la page elle-même.

++
fab
Cruelo
Bonsoir a depuis hier elle as changer cette faq lol !

g reinstaller mais g
CODE
define('ERROR_NO_CHECK_CONDITION', 'Pour continuer votre commande la case conditions générales de vente doit être cochée !');


qui n'est pas pris en compte ! comment cela ce fait il ?
Mi6
Est-ce que quelqu'un a fait la traduction en anglais, allemand et espagnole ? car je suis pas très bon en traduction tongue.gif

Merci par avance

David
elchicco
ça ne marche pas chez moi, il y a un message rouge ERROR_NO_CHECK_CONDITION .........;;

j'ai fait quoi de pas bon ?
Cruelo
QUOTE (elchicco @ 28 déc 2004, 18:21)
ça ne marche pas chez moi, il y a un message rouge ERROR_NO_CHECK_CONDITION .........;;

j'ai fait quoi de pas bon ?


pareil pour moi blink.gif
decad7
En fait c'est normal que le message ERROR_NO_CHECK_CONDITION ne soit pas pris en compte, j'ai fait une petite erreur.

dans le fichier checkout_confirmation il faut que cela soit placé comme ceci

CODE

require('includes/application_top.php');
   
  require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_CONFIRMATION);
 $breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
 $breadcrumb->add(NAVBAR_TITLE_2);

// DEBUT CHECK_CONDITION
if ($HTTP_POST_VARS['conditions'] != 'true' && ($HTTP_POST_VARS['action'] != 'process')) {    
   tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_NO_CHECK_CONDITION), 'SSL'));
 }
// FIN CHECK_CONDITION


ensuite comme vous pouvez le voir j'ai fait une modif ici dans le code ci-dessus.

CODE

if ($HTTP_POST_VARS['conditions'] != 'true' && ($HTTP_POST_VARS['action'] != 'process')) {


j'ai rajouter dans le if cela

CODE

&& ($HTTP_POST_VARS['action'] != 'process')


j'ai remarqué que pour certain site il y avait une petite erreur.

si vous rencontrez encore des problèmes, dites le moi.

++
fab

PS : il faut remettre la FAQ a jour (pour les admin)
mosaic
je souhaitais pouvoir placer ce code sur la creload mais au surprise, il n'y a pas de fichier catalog/templates/content/conditions.php cry.gif

Si quelqu'un à déjà rencontré le même problème, merci de m'indiquer ce que vous avez réellement adapté blush.gif
fissiaux


Si tu veux adapter cette modification à la creload, il va falloir que tu convertisses la page des conditions (qui est la page statique standard) en page sépcifique, donc adpater le fichier catalog/conditions.php pour virer :

CODE
 $content_template = TEMPLATENAME_STATIC;


et créer une page catalog/templates/content/conditions.tpl.php qui soit recopiée de catalog/templates/content/static.tpl.php, et ensuite sur laquelle tu fais la modif de decad7.
xaglo
QUOTE (decad7)
PS : il faut remettre la FAQ a jour (pour les admin)
fait wink.gif
mosaic
je sais que le souci que je viens de rencontrer est spécifique à la creload mais bon cela évitera peut être à quelqu'un de chercher blush.gif

Il faut commenter la ligne ( en plaçant // devant ) :

$javascript = $content . '.js';

On obtient donc :

CODE
<?php
/*
 $Id: conditions.php,v 1.2 2003/09/24 13:57:00 wilt Exp $

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

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
 Adaptation pour la contrib CGV de Decad 7
*/

 require('includes/application_top.php');

 if (!tep_session_is_registered('customer_id')) {
   $navigation->set_snapshot();
   tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
 }

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CONDITIONS);

 $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CONDITIONS, '', 'SSL'));

 $content = CONTENT_CONDITIONS;
 //$javascript = $content . '.js';

 require(DIR_WS_TEMPLATES . TEMPLATE_NAME . '/' . TEMPLATENAME_MAIN_PAGE);

 require(DIR_WS_INCLUDES . 'application_bottom.php');

?>
elchicco

j'ai encore un petit soucis, j'ai beau lire et cocher la case d'acceptation des CGV, il me met le message en rouge "Pour continuer votre commande la case conditions générales de vente doit être cochée !"

Merci de votre aide wink.gif
elchicco
j'ai scrupuleusement tout refait comme indiqué dans la faq (mise à jour), et j'ai toujours le même problème, bien que je lise et coche la case, il me met ce message en rouge >> Pour continuer votre commande la case conditions générales de vente doit être cochée !

Pourriez vous éclairer ma lanterne svp ?
decad7
Salut,

est ce que tu pourrais me mettre le contenu de ta page checkout_confirmation histoire que je regarde une petite chose.

++
fab

PS : moi elle fonctionne sans problème
elchicco
salut,

ci-joint wink.gif


CODE
<?php
/*
 $Id: checkout_confirmation.php,v 1.139 2003/06/11 17:34:53 hpdl Exp $

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

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');
 
 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_CONFIRMATION);
$breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
$breadcrumb->add(NAVBAR_TITLE_2);

// DEBUT CHECK_CONDITION
if ($HTTP_POST_VARS['conditions'] != 'true' && ($HTTP_POST_VARS['action'] != 'process')) {    
  tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_NO_CHECK_CONDITION), 'SSL'));
}
// FIN CHECK_CONDITION

if ($HTTP_POST_VARS['conditions'] != 'true' && ($HTTP_POST_VARS['action'] != 'process')) {    
  tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_NO_CHECK_CONDITION), 'SSL'));
}
// if the customer is not logged on, redirect them to the login page
 if (!tep_session_is_registered('customer_id')) {
   $navigation->set_snapshot(array('mode' => 'SSL', 'page' => FILENAME_CHECKOUT_PAYMENT));
   tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
 }

// if there is nothing in the customers cart, redirect them to the shopping cart page
 if ($cart->count_contents() < 1) {
   tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
 }

// avoid hack attempts during the checkout procedure by checking the internal cartID
 if (isset($cart->cartID) && tep_session_is_registered('cartID')) {
   if ($cart->cartID != $cartID) {
     tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
   }
 }

// if no shipping method has been selected, redirect the customer to the shipping method selection page
 if (!tep_session_is_registered('shipping')) {
   tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
 }

 if (!tep_session_is_registered('payment')) tep_session_register('payment');
 if (isset($HTTP_POST_VARS['payment'])) $payment = $HTTP_POST_VARS['payment'];

 if (!tep_session_is_registered('comments')) tep_session_register('comments');
 if (tep_not_null($HTTP_POST_VARS['comments'])) {
   $comments = tep_db_prepare_input($HTTP_POST_VARS['comments']);
 }

// load the selected payment module
 require(DIR_WS_CLASSES . 'payment.php');
 $payment_modules = new payment($payment);

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

 $payment_modules->update_status();

 if ( ( is_array($payment_modules->modules) && (sizeof($payment_modules->modules) > 1) && !is_object($$payment) ) || (is_object($$payment) && ($$payment->enabled == false)) ) {
   tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_NO_PAYMENT_MODULE_SELECTED), 'SSL'));
 }

 if (is_array($payment_modules->modules)) {
   $payment_modules->pre_confirmation_check();
 }

// load the selected shipping module
 require(DIR_WS_CLASSES . 'shipping.php');
 $shipping_modules = new shipping($shipping);

 require(DIR_WS_CLASSES . 'order_total.php');
 $order_total_modules = new order_total;

// Stock Check
 $any_out_of_stock = false;
 if (STOCK_CHECK == 'true') {
   for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
     if (tep_check_stock($order->products[$i]['id'], $order->products[$i]['qty'])) {
       $any_out_of_stock = true;
     }
   }
   // Out of Stock
   if ( (STOCK_ALLOW_CHECKOUT != 'true') && ($any_out_of_stock == true) ) {
     tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
   }
 }

 //require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_CONFIRMATION);

 //$breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
 //$breadcrumb->add(NAVBAR_TITLE_2);
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- 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="0">
     <tr>
       <td><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_image(DIR_WS_IMAGES . 'table_background_confirmation.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
         <tr class="infoBoxContents">
<?php
 if ($sendto != false) {
?>
           <td width="30%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
             <tr>
               <td class="main"><?php echo '<b>' . HEADING_DELIVERY_ADDRESS . '</b> <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL') . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td>
             </tr>
             <tr>
               <td class="main"><?php echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, ' ', '<br>'); ?></td>
             </tr>
<?php
   if ($order->info['shipping_method']) {
?>
             <tr>
               <td class="main"><?php echo '<b>' . HEADING_SHIPPING_METHOD . '</b> <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td>
             </tr>
             <tr>
               <td class="main"><?php echo $order->info['shipping_method']; ?></td>
             </tr>
<?php
   }
?>
           </table></td>
<?php
 }
?>
           <td width="<?php echo (($sendto != false) ? '70%' : '100%'); ?>" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
             <tr>
               <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<?php
 if (sizeof($order->info['tax_groups']) > 1) {
?>
                 <tr>
                   <td class="main" colspan="2"><?php echo '<b>' . HEADING_PRODUCTS . '</b> <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td>
                   <td class="smallText" align="right"><b><?php echo HEADING_TAX; ?></b></td>
                   <td class="smallText" align="right"><b><?php echo HEADING_TOTAL; ?></b></td>
                 </tr>
<?php
 } else {
?>
                 <tr>
                   <td class="main" colspan="3"><?php echo '<b>' . HEADING_PRODUCTS . '</b> <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td>
                 </tr>
<?php
 }

 for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
   echo '          <tr>' . "\n" .
        '            <td class="main" align="right" valign="top" width="30">' . $order->products[$i]['qty'] . '&nbsp;x</td>' . "\n" .
        '            <td class="main" valign="top">' . $order->products[$i]['name'];

   if (STOCK_CHECK == 'true') {
     echo tep_check_stock($order->products[$i]['id'], $order->products[$i]['qty']);
   }

   if ( (isset($order->products[$i]['attributes'])) && (sizeof($order->products[$i]['attributes']) > 0) ) {
     for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) {
       echo '<br><nobr><small>&nbsp;<i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'] . '</i></small></nobr>';
     }
   }

   echo '</td>' . "\n";

   if (sizeof($order->info['tax_groups']) > 1) echo '            <td class="main" valign="top" align="right">' . tep_display_tax_value($order->products[$i]['tax']) . '%</td>' . "\n";

   echo '            <td class="main" align="right" valign="top">' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . '</td>' . "\n" .
        '          </tr>' . "\n";
 }
?>
               </table></td>
             </tr>
           </table></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td class="main"><b><?php echo HEADING_BILLING_INFORMATION; ?></b></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
         <tr class="infoBoxContents">
           <td width="30%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
             <tr>
               <td class="main"><?php echo '<b>' . HEADING_BILLING_ADDRESS . '</b> <a href="' . tep_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL') . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td>
             </tr>
             <tr>
               <td class="main"><?php echo tep_address_format($order->billing['format_id'], $order->billing, 1, ' ', '<br>'); ?></td>
             </tr>
             <tr>
               <td class="main"><?php echo '<b>' . HEADING_PAYMENT_METHOD . '</b> <a href="' . tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL') . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td>
             </tr>
             <tr>
               <td class="main"><?php echo $order->info['payment_method']; ?></td>
             </tr>
           </table></td>
           <td width="70%" valign="top" align="right"><table border="0" cellspacing="0" cellpadding="2">
<?php
 if (MODULE_ORDER_TOTAL_INSTALLED) {
   $order_total_modules->process();
   echo $order_total_modules->output();
 }
?>
           </table></td>
         </tr>
       </table></td>
     </tr>
<?php
 if (is_array($payment_modules->modules)) {
   if ($confirmation = $payment_modules->confirmation()) {
?>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td class="main"><b><?php echo HEADING_PAYMENT_INFORMATION; ?></b></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
         <tr class="infoBoxContents">
           <td><table border="0" cellspacing="0" cellpadding="2">
             <tr>
               <td class="main" colspan="4"><?php echo $confirmation['title']; ?></td>
             </tr>
<?php
     for ($i=0, $n=sizeof($confirmation['fields']); $i<$n; $i++) {
?>
             <tr>
               <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
               <td class="main"><?php echo $confirmation['fields'][$i]['title']; ?></td>
               <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
               <td class="main"><?php echo $confirmation['fields'][$i]['field']; ?></td>
             </tr>
<?php
     }
?>
           </table></td>
         </tr>
       </table></td>
     </tr>
<?php
   }
 }
?>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
<?php
 if (tep_not_null($order->info['comments'])) {
?>
     <tr>
       <td class="main"><?php echo '<b>' . HEADING_ORDER_COMMENTS . '</b> <a href="' . tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL') . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
         <tr class="infoBoxContents">
           <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
             <tr>
               <td class="main"><?php echo nl2br(tep_output_string_protected($order->info['comments'])) . tep_draw_hidden_field('comments', $order->info['comments']); ?></td>
             </tr>
           </table></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
<?php
 }
?>
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
         <tr>
           <td align="right" class="main">
<?php
 if (isset($$payment->form_action_url)) {
   $form_action_url = $$payment->form_action_url;
 } else {
   $form_action_url = tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL');
 }

 echo tep_draw_form('checkout_confirmation', $form_action_url, 'post');

 if (is_array($payment_modules->modules)) {
   echo $payment_modules->process_button();
 }

 echo tep_image_submit('button_confirm_order.gif', IMAGE_BUTTON_CONFIRM_ORDER) . '</form>' . "\n";
?>
           </td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
         <tr>
           <td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
             <tr>
               <td width="50%" align="right"><?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?></td>
               <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
             </tr>
           </table></td>
           <td width="25%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
           <td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
             <tr>
               <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
               <td><?php echo tep_image(DIR_WS_IMAGES . 'checkout_bullet.gif'); ?></td>
               <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
             </tr>
           </table></td>
           <td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
             <tr>
               <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
               <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?></td>
             </tr>
           </table></td>
         </tr>
         <tr>
           <td align="center" width="25%" class="checkoutBarFrom"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '" class="checkoutBarFrom">' . CHECKOUT_BAR_DELIVERY . '</a>'; ?></td>
           <td align="center" width="25%" class="checkoutBarFrom"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL') . '" class="checkoutBarFrom">' . CHECKOUT_BAR_PAYMENT . '</a>'; ?></td>
           <td align="center" width="25%" class="checkoutBarCurrent"><?php echo CHECKOUT_BAR_CONFIRMATION; ?></td>
           <td align="center" width="25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_FINISHED; ?></td>
         </tr>
       </table></td>
     </tr>
   </table></td>
<!-- body_text_eof //-->
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
   </table></td>
 </tr>
</table>
<!-- body_eof //-->

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


Merci à toi
decad7
Salut,

bon j'ai regardé un peu a premiére vu tu n'as pas le même code que moi.

sinon déja tu peux supprimer cette ligne qui est en double...mais je pense pas que cela changera sur le fonctionement.

CODE

// DEBUT CHECK_CONDITION
if ($HTTP_POST_VARS['conditions'] != 'true' && ($HTTP_POST_VARS['action'] != 'process')) {    
 tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_NO_CHECK_CONDITION), 'SSL'));
}
// FIN CHECK_CONDITION

if ($HTTP_POST_VARS['conditions'] != 'true' && ($HTTP_POST_VARS['action'] != 'process')) {    
 tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_NO_CHECK_CONDITION), 'SSL'));
}


supprime la deuxiéme occurance =>

CODE

if ($HTTP_POST_VARS['conditions'] != 'true' && ($HTTP_POST_VARS['action'] != 'process')) {    
 tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_NO_CHECK_CONDITION), 'SSL'));
}


Sinon il suffirait de savoir le nom de l'action qui est passé en POST est de remplacer 'process' par le nom de ton action.

Qui peux me dire le nom de l'action utilisé dans son cas ?

++
fab
decad7
sinon j'aurais également besoin du contenu du fichier checkout_paiement

++
fab
elchicco
salut,

je vais essayer ce soir, je vais supprimer la deuxième occurance pour commencer....

ci-joint le code wink.gif

CODE
<?php
/*
 $Id: checkout_payment.php,v 1.113 2003/06/29 23:03:27 hpdl Exp $

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

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');

// if the customer is not logged on, redirect them to the login page
 if (!tep_session_is_registered('customer_id')) {
   $navigation->set_snapshot();
   tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
 }

// if there is nothing in the customers cart, redirect them to the shopping cart page
 if ($cart->count_contents() < 1) {
   tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
 }

// if no shipping method has been selected, redirect the customer to the shipping method selection page
 if (!tep_session_is_registered('shipping')) {
   tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
 }

// avoid hack attempts during the checkout procedure by checking the internal cartID
 if (isset($cart->cartID) && tep_session_is_registered('cartID')) {
   if ($cart->cartID != $cartID) {
     tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
   }
 }

// Stock Check
 if ( (STOCK_CHECK == 'true') && (STOCK_ALLOW_CHECKOUT != 'true') ) {
   $products = $cart->get_products();
   for ($i=0, $n=sizeof($products); $i<$n; $i++) {
     if (tep_check_stock($products[$i]['id'], $products[$i]['quantity'])) {
       tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
       break;
     }
   }
 }

// if no billing destination address was selected, use the customers own address as default
 if (!tep_session_is_registered('billto')) {
   tep_session_register('billto');
   $billto = $customer_default_address_id;
 } else {
// verify the selected billing address
   $check_address_query = tep_db_query("select count(*) as total from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customer_id . "' and address_book_id = '" . (int)$billto . "'");
   $check_address = tep_db_fetch_array($check_address_query);

   if ($check_address['total'] != '1') {
     $billto = $customer_default_address_id;
     if (tep_session_is_registered('payment')) tep_session_unregister('payment');
   }
 }

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

 if (!tep_session_is_registered('comments')) tep_session_register('comments');

 $total_weight = $cart->show_weight();
 $total_count = $cart->count_contents();

// load all enabled payment modules
 require(DIR_WS_CLASSES . 'payment.php');
 $payment_modules = new payment;

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_PAYMENT);

 $breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
 $breadcrumb->add(NAVBAR_TITLE_2, tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<script language="javascript"><!--
var selected;

function selectRowEffect(object, buttonSelect) {
 if (!selected) {
   if (document.getElementById) {
     selected = document.getElementById('defaultSelected');
   } else {
     selected = document.all['defaultSelected'];
   }
 }

 if (selected) selected.className = 'moduleRow';
 object.className = 'moduleRowSelected';
 selected = object;

// one button is not an array
 if (document.checkout_payment.payment[0]) {
   document.checkout_payment.payment[buttonSelect].checked=true;
 } else {
   document.checkout_payment.payment.checked=true;
 }
}

function rowOverEffect(object) {
 if (object.className == 'moduleRow') object.className = 'moduleRowOver';
}

function rowOutEffect(object) {
 if (object.className == 'moduleRowOver') object.className = 'moduleRow';
}
//--></script>
<?php echo $payment_modules->javascript_validation(); ?>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
   </table></td>
<!-- body_text //-->
   <td width="100%" valign="top"><?php echo tep_draw_form('checkout_payment', tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'), 'post', 'onsubmit="return check_form();"'); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
     <tr>
       <td><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_image(DIR_WS_IMAGES . 'table_background_payment.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
<?php
 if (isset($HTTP_GET_VARS['payment_error']) && is_object(${$HTTP_GET_VARS['payment_error']}) && ($error = ${$HTTP_GET_VARS['payment_error']}->get_error())) {
?>
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
         <tr>
           <td class="main"><b><?php echo tep_output_string_protected($error['title']); ?></b></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBoxNotice">
         <tr class="infoBoxNoticeContents">
           <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
             <tr>
               <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
               <td class="main" width="100%" valign="top"><?php echo tep_output_string_protected($error['error']); ?></td>
               <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
             </tr>
           </table></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
<?php
 }
?>
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
         <tr>
           <td class="main"><b><?php echo TABLE_HEADING_BILLING_ADDRESS; ?></b></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
         <tr class="infoBoxContents">
           <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
             <tr>
               <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
               <td class="main" width="50%" valign="top"><?php echo TEXT_SELECTED_BILLING_DESTINATION; ?><br><br><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL') . '">' . tep_image_button('button_change_address.gif', IMAGE_BUTTON_CHANGE_ADDRESS) . '</a>'; ?></td>
               <td align="right" width="50%" valign="top"><table border="0" cellspacing="0" cellpadding="2">
                 <tr>
                   <td class="main" align="center" valign="top"><b><?php echo TITLE_BILLING_ADDRESS; ?></b><br><?php echo tep_image(DIR_WS_IMAGES . 'arrow_south_east.gif'); ?></td>
                   <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
                   <td class="main" valign="top"><?php echo tep_address_label($customer_id, $billto, true, ' ', '<br>'); ?></td>
                   <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
                 </tr>
               </table></td>
             </tr>
           </table></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
         <tr>
           <td class="main"><b><?php echo TABLE_HEADING_PAYMENT_METHOD; ?></b></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
         <tr class="infoBoxContents">
           <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<?php
 $selection = $payment_modules->selection();

 if (sizeof($selection) > 1) {
?>
             <tr>
               <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
               <td class="main" width="50%" valign="top"><?php echo TEXT_SELECT_PAYMENT_METHOD; ?></td>
               <td class="main" width="50%" valign="top" align="right"><b><?php echo TITLE_PLEASE_SELECT; ?></b><br><?php echo tep_image(DIR_WS_IMAGES . 'arrow_east_south.gif'); ?></td>
               <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
             </tr>
<?php
 } else {
?>
             <tr>
               <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
               <td class="main" width="100%" colspan="2"><?php echo TEXT_ENTER_PAYMENT_INFORMATION; ?></td>
               <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
             </tr>
<?php
 }

 $radio_buttons = 0;
 for ($i=0, $n=sizeof($selection); $i<$n; $i++) {
?>
             <tr>
               <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
               <td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2">
<?php
   if ( ($selection[$i]['id'] == $payment) || ($n == 1) ) {
     echo '                  <tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
   } else {
     echo '                  <tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
   }
?>
                   <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
                   <td class="main" colspan="3"><b><?php echo $selection[$i]['module']; ?></b></td>
                   <td class="main" align="right">
<?php
   if (sizeof($selection) > 1) {
     echo tep_draw_radio_field('payment', $selection[$i]['id']);
   } else {
     echo tep_draw_hidden_field('payment', $selection[$i]['id']);
   }
?>
                   </td>
                   <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
                 </tr>
<?php
   if (isset($selection[$i]['error'])) {
?>
                 <tr>
                   <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
                   <td class="main" colspan="4"><?php echo $selection[$i]['error']; ?></td>
                   <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
                 </tr>
<?php
   } elseif (isset($selection[$i]['fields']) && is_array($selection[$i]['fields'])) {
?>
                 <tr>
                   <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
                   <td colspan="4"><table border="0" cellspacing="0" cellpadding="2">
<?php
     for ($j=0, $n2=sizeof($selection[$i]['fields']); $j<$n2; $j++) {
?>
                     <tr>
                       <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
                       <td class="main"><?php echo $selection[$i]['fields'][$j]['title']; ?></td>
                       <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
                       <td class="main"><?php echo $selection[$i]['fields'][$j]['field']; ?></td>
                       <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
                     </tr>
<?php
     }
?>
                   </table></td>
                   <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
                 </tr>
<?php
   }
?>
               </table></td>
               <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
             </tr>
<?php
   $radio_buttons++;
 }
?>
           </table></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
         <tr>
           <td class="main"><b><?php echo TABLE_HEADING_COMMENTS; ?></b></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
         <tr class="infoBoxContents">
           <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
             <tr>
               <td><?php echo tep_draw_textarea_field('comments', 'soft', '60', '5'); ?></td>
             </tr>
           </table></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
         <tr class="infoBoxContents">
           <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
             <tr>
               <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
               <td class="main"><b><?php echo TITLE_CONTINUE_CHECKOUT_PROCEDURE . '</b><br>' . TEXT_CONTINUE_CHECKOUT_PROCEDURE; ?></td>
               <td class="main" align="right"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td>
               <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
             </tr>
           </table></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
         <tr>
           <td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
             <tr>
               <td width="50%" align="right"><?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?></td>
               <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
             </tr>
           </table></td>
           <td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
             <tr>
               <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
               <td><?php echo tep_image(DIR_WS_IMAGES . 'checkout_bullet.gif'); ?></td>
               <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
             </tr>
           </table></td>
           <td width="25%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
           <td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
             <tr>
               <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
               <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?></td>
             </tr>
           </table></td>
         </tr>
         <tr>
           <td align="center" width="25%" class="checkoutBarFrom"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '" class="checkoutBarFrom">' . CHECKOUT_BAR_DELIVERY . '</a>'; ?></td>
           <td align="center" width="25%" class="checkoutBarCurrent"><?php echo CHECKOUT_BAR_PAYMENT; ?></td>
           <td align="center" width="25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_CONFIRMATION; ?></td>
           <td align="center" width="25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_FINISHED; ?></td>
         </tr>
       </table></td>
     </tr>
   </table></form></td>
<!-- body_text_eof //-->
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
   </table></td>
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
<?php
 if($HTTP_GET_VARS['consult_conditions'])
  {
  echo '<input name="conditions" type="checkbox" value="true" checked>';
  }
 else
  {
  echo '<input name="conditions" type="checkbox" value="true">';
  }
 
 echo '<b>' . TEXT_CONDITIONS .'</b>';
?>


merci wink.gif
decad7
Essaye de mettre cette ligne entre les balises <BODY>

car la tu l'as completement exclut du BODY, je ne sais pas si ca viens de la, mais quoi qu'il en soit cela sera plus propre.

Je parle de cette ligne

CODE

<?php
if($HTTP_GET_VARS['consult_conditions'])
 {
 echo '<input name="conditions" type="checkbox" value="true" checked>';
 }
else
 {
 echo '<input name="conditions" type="checkbox" value="true">';
 }

echo '<b>' . TEXT_CONDITIONS .'</b>';
?>


Tiens moi au courant

++
fab
elchicco
cela veut dire quoi de mettre entre les body blink.gif , (je ne suis pas programmeur blush.gif blush.gif )

Merci....
decad7
il faut que cette ligne de code soit inserer entre la balise d'ouverture du <BODY> et la balise de fermeture </BODY>

ton ouverture est ici

CODE

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">


et ta fermeture est ici

CODE

<br>
</body>
</html>


Donc ton code peut etre n'importe haut ou tu souhaite voir apparaitre la case a cocher, mais doit etre situé comme ceci

<BODY> // ouverture de la balise body

// TON CODE ICI OU TU SOUHAITE AVOIR L'APPARITION

</BODY> // Fermeture de ta balise

la balise <body> est le contenu (le corps) de ta page html.

Voila

++
fab

PS : pour info moi n'on plus je ne suis pas un developpeur, mais je commence a me dépatouiller.
Biyyo
Fab,

J'ai essayé le code et ça fonctionne très bien, encore merci.

Au lieu d'avoir le message d'erreur en haut de la page, comment faire pour l'avoir dans une fenetre d'erreur

MErci
decad7
Pour que le message d'erreur apparaissent dans le cadre du site, il faut utiliser les la classe messagestack je crois... je ne suis pas trés sur.

j'essaye de trouver une solution

++
fab
decad7
Bon la je ne vois pas...

comment si prendre pour que le message d'erreur apparaissent directement sur la page concerné (comme create_account par exemple) ou bien qu'il soit rajouter dans la boxe javascript quand aucun module de paiement n'est selectioné ?

Merci pour votre aide

++
fab
JeanLuc
En regardant les modifs demandées dans la FAQ, le message va apparaître en rouge sur le site même (class="header_error").
En effet, si la case n'est pas cocher dans checkout_payment, le paramètre envoyé en GET vers checkout_confirmation n'est pas à "true".
Dès le débiut, checkout_confirmation redirige le visiteur vers checkout_payment avec un nouveua paramètre "error_message=blabla"
Or, dans le header appelé au début de chaque fichier, si il y a un paramètre error_message dans l'URL, ce message y est affiché selon la classe css "header_error".

Maintenant, pour que le message d'erreur soit intégrer dans la fenêtre d'erreur Javascripte qui apparait dans checkout_payment (si on n'a pas choisi de moyen de paiement):

1- EFFACER les modifications faite dans /catalog/checkout_confirmation.php:
CODE
 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_CONFIRMATION);
$breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
$breadcrumb->add(NAVBAR_TITLE_2);

// DEBUT CHECK_CONDITION
if ($HTTP_POST_VARS['conditions'] != 'true' && ($HTTP_POST_VARS['action'] != 'process')) {    
  tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_NO_CHECK_CONDITION), 'SSL'));
}
// FIN CHECK_CONDITION  


2 - EFFACER les modifications faites dans /catalog/include/language/french/checkout_confirmation.php :
CODE
define('ERROR_NO_CHECK_CONDITION', 'Pour continuer votre commande la case conditions générales de vente doit être cochée !');


3 - AJOUTER dans /catalog/include/language/french/checkout_payment:
CODE
define('JS_ERROR_NO_CHECK_CONDITION', '* Pour continuer votre commande la case conditions générales de vente doit être cochée !');


4 - dans /catalog/include/classes/payment.php, juste après ceci (vers 107):
CODE
while (list(, $value) = each($this->modules)) {
 $class = substr($value, 0, strrpos($value, '.'));
 if ($GLOBALS[$class]->enabled) {
   $js .= $GLOBALS[$class]->javascript_validation();
 }
}
AJOUTER:
CODE
// Ajout pour ajout CGV
       $js .= "\n" . '  if (!document.checkout_payment.conditions.checked) {' . "\n" .
              '    error_message = error_message + "' . JS_ERROR_NO_CHECK_CONDITION . '\n";' . "\n" .
              '    error = 1;' . "\n" .        
       '  }' . "\n";
// Fin ajout pour ajout CGV


Bon code... wink.gif
elchicco
Salut,

Decad7 ça ne fonctionne toujours pas mad.gif mad.gif , j'ai bien mis entre les body........le truc que je comprends pas est qu'apparemment ça marche bien chez un peu tout le monde.....sauf chez moi ohmy.gif

Jean luc, j'ai essayé ta solution, j'ai aussi un message en rouge "no check conditions"

merci à vous wink.gif
JeanLuc
QUOTE (elchicco @ 13 jan 2005, 23:37)
Jean luc, j'ai essayé ta solution, j'ai aussi un message en rouge "no check conditions"

merci à vous wink.gif

Il ne faut pas oublier d'effacer les modif indiquées dans la FAQ comme j'indique plus haut, dans /catalog/checkout_confirmation.php et dans /catalog/include/language/french/checkout_confirmation.php.

Bon code... wink.gif
JeanLuc
J'ai fais la modification dans la FAQ qui récapitule ce qu'il faut faire.

Bon code... wink.gif
elchicco
je vous remercie pour votre dévouement biggrin.gif , j'ai enfin réussi, je n'ai plus le message >>> j'ai dû me planter dans un des fichiers, j'ai donc suivi la faq avec des fichiers sauvegardés d'il y a plusieurs jours où aucune modif sur les CGV n'avait été faîte, et maintenant c'est OK (à part un "?>" qui se met tout en haut à gauche au dessus de mon logo juste après avoir tout coché et validé).........

encore une fois merci, j'en ai passé des heures et des heures sur ce problème wink.gif
technight
Bonsoir,

Après des heures de recherche et d'essais pour installer cette obligation d'acceptation des cgi, je tombe sur ce post, et après avoir tout lu depuis le début, je m'aperçois que ce qui en est ressorti dans la FAQ est faux car ça ne marche pas du tout chez moi.

en effet, si je suis mot pour mot les indications de la FAQ, je peux passer commande sans cocher la case de confirmation, hors, si je suis les indications de decad7 au début de ce post, ça fonctionne, je suis obligé de cocher les cgi.

En conséquent, je pense que la FAQ est erronée et qu'il manque quelque chose, à priori un code dans checkout confirmation.


cela dit, bien que j'ai enfin réussi à obliger ces cgi, si je ne coche pas la case, le message rouge stipulant qu'il faut valider les cgi ne s'affiche pas, et j'ai pourtant corrigé le premier code de decad en entrant celui qu'il donne un peu plus bas dans ce post, à savoir:

CODE
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_CONFIRMATION);
$breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
$breadcrumb->add(NAVBAR_TITLE_2);

// DEBUT CHECK_CONDITION
if ($HTTP_POST_VARS['conditions'] != 'true' && ($HTTP_POST_VARS['action'] != 'process')) {    
   tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_NO_CHECK_CONDITION), 'SSL'));
}
// FIN CHECK_CONDITION
.

Quelqu'un pourrait t'il m'aider pour que ce message rouge de non confirmation des cgi s'affiche..
Et si quelqu'un pouvait corriger la FAQ afin que d'autres amateurs comme moi ne se prennent pas la tête des heures..

Merci d'avance à tous rolleyes.gif
Ceci est une version "bas débit" de notre forum. Pour voir la version complète avec plus d'informations, la mise en page et les images, veuillez cliquer ici.
Invision Power Board © 2001-2013 Invision Power Services, Inc.