afficher un prix
Posté : 07 déc. 2007, 20:04
Voila je suis en train de developper un site ecommerce et je souhaiterais afficher le prix des articles
mais le prix des artiles serais prix sans attribut + prix attribut voici le code que j'ai inserer dans ma page, mais le probleme c'est qu'il ne m'affiche que le prix du produit
Quelq'un serait il ou se trouve mon erreur.
D'avance merci
mais le prix des artiles serais prix sans attribut + prix attribut voici le code que j'ai inserer dans ma page, mais le probleme c'est qu'il ne m'affiche que le prix du produit
Quelq'un serait il ou se trouve mon erreur.
D'avance merci
<?php
case PRODUCTS_OPTIONS_TYPE_RADIO:
//CLR 030714 Add logic for radio buttons
$tmp_html = '<table width="180" class="formArea2">';
$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . $products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . $languages_id . "'");
$checked = false;
while ($products_options_array = tep_db_fetch_array($products_options_query)) {
$tmp_html .= '<tr><td class="main">';
$tmp_html .= tep_draw_radio_field('id[' . $products_options_name['products_options_id'] . ']', $products_options_array['products_options_values_id'], $checked);
$checked = false;
$tmp_html .= '<td class="main">' . $products_options_array['products_options_values_name'] .'</td>';
$tmp_html .=$products_options_name['products_options_comment'] ;
if ($products_options['price_prefix'] == '+') {
$tmp_html .= '<td width="70" class="main"><b>' . $currencies->display_price($product_info['products_price'] + $products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .'</b></td>';
} else if ($products_options['price_prefix'] == '-') {
$tmp_html .= '<td width="70" class="main"><b>' . $currencies->display_price($product_info['products_price'] - $products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .'</b></td>';
} else if ($products_options['price_prefix'] == '') {
$tmp_html .= '<td width="70" class="main"><b>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .'</b></td>';
}
$tmp_html .= '</tr></td>';
}
$tmp_html .= '</table><br><br>';
?>
<tr>
<td class="main" valign="top"><br>
<br>
<b><?php echo $products_options_name['products_options_name'] . ''; ?></b></td>
<td class="main"><?php echo $tmp_html; ?></td>
</tr>
<?php
break;
en haut à gauche de ce sujet.