Aide - Recherche - Membres - Calendrier
Version complète : [resolu] messages d'erreurs sur ccgv
Forum osCommerce-fr > Adapter OsCommerce MS2 > Contributions
carlos101
Les messages d'erreurs ne s'affiches pas lors de la saisie de codes erronés
unsure.gif
mosaic
quels messages d'erreur, sur quels pages, avec quelle contrib, quels codes ( code barre, code d'accès ) et si c'est dans un module ( payement, expédition )

Soit plus précis excl.gif

carlos101
module ccgv05
Erreur de saisie de coupon ou de chèque cadeaux, je vois le texte de l'erreur dans la barre de lien mais rien sur la page.
mosaic
Je vais essayer de t'aider :

peux-tu afficher le fichier catalog/gv_redeem.php
Ryu007
Bonjour Carlos101,

Aurais-tu enlever ce code :
CODE
<? if (isset($_GET['error_message']) && tep_not_null($_GET['error_message'])) { ?>

<tr class="headerError"><td class="headerError" colspan="7"><? echo htmlspecialchars(urldecode($_GET['error_message'])); ?></td></tr>

<? } if (isset($_GET['info_message']) && tep_not_null($_GET['info_message'])) { ?>

<tr class="headerInfo"><td class="headerInfo" colspan="7"><? echo htmlspecialchars($_GET['info_message']); ?></td></tr>
<? } ?>

du header ?! car il censé récupérere les erreurs de ce type (coupon non valide, etc.) ...

A toi donc de le placer soit dans le header soit dans checkout_payment ...

Amicalement
carlos101
Voici le fichier gv_redeem

<?php
/*
$Id: gv_redeem.php,v 1.3.2.1 2003/04/18 15:52:40 wilt Exp $

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

Copyright © 2002 - 2003 osCommerce

Gift Voucher System v1.0
Copyright © 2001, 2002 Ian C Wilson
http://www.phesis.org

Released under the GNU General Public License
*/

require('includes/application_top.php');

// check for a voucher number in the url
if (isset($HTTP_GET_VARS['gv_no'])) {
$error = true;
$gv_query = tep_db_query("select c.coupon_id, c.coupon_amount from " . TABLE_COUPONS . " c, " . TABLE_COUPON_EMAIL_TRACK . " et where coupon_code = '" . $HTTP_GET_VARS['gv_no'] . "' and c.coupon_id = et.coupon_id");
if (tep_db_num_rows($gv_query) >0) {
$coupon = tep_db_fetch_array($gv_query);
$redeem_query = tep_db_query("select coupon_id from ". TABLE_COUPON_REDEEM_TRACK . " where coupon_id = '" . $coupon['coupon_id'] . "'");
if (tep_db_num_rows($redeem_query) == 0 ) {
// check for required session variables
if (!tep_session_is_registered('gv_id')) {
tep_session_register('gv_id');
}
$gv_id = $coupon['coupon_id'];
$error = false;
} else {
$error = true;
}
}
} else {
tep_redirect(FILENAME_DEFAULT);
}
if ((!$error) && (tep_session_is_registered('customer_id'))) {
// Update redeem status
$gv_query = tep_db_query("insert into " . TABLE_COUPON_REDEEM_TRACK . " (coupon_id, customer_id, redeem_date, redeem_ip) values ('" . $coupon['coupon_id'] . "', '" . $customer_id . "', now(),'" . $REMOTE_ADDR . "')");
$gv_update = tep_db_query("update " . TABLE_COUPONS . " set coupon_active = 'N' where coupon_id = '" . $coupon['coupon_id'] . "'");
tep_gv_account_update($customer_id, $gv_id);
tep_session_unregister('gv_id');
}
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_GV_REDEEM);

$breadcrumb->add(NAVBAR_TITLE);
?>
<!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 (getenv('HTTPS') == 'on' ? 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 width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
<td align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_specials.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="0" cellpadding="2">
<tr>
<td class="main"><?php echo TEXT_INFORMATION; ?></td>
</tr>
<?php
// if we get here then either the url gv_no was not set or it was invalid
// so output a message.
$message = sprintf(TEXT_VALID_GV, $currencies->format($coupon['coupon_amount']));
if ($error) {
$message = TEXT_INVALID_GV;
}
?>
<tr>
<td class="main"><?php echo $message; ?></td>
</tr>
<tr>
<td align="right"><br><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></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'); ?>
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.