Author Topic: Les options d'attribut dans le desordre  (Read 792 times)

stbo

  • Guest
Les options d'attribut dans le desordre
« on: March 24, 2010, 07:07:49 pm »
Bonjour,

Mon probléme est le suivant:

Les options d'attributs liés à un article ne sont pas pas ordre croissant dans le listing de la commande.
exemple :
1 x08/ Plaque Rectangle petit modèle Plaqué-or
- 019 - Texte devant (20 caractères maxi): Je t'aime
- 029 - Texte au dos (35 caractères maxi): merci
- 201-Ajout d'une chaîne en Plaqué-or: Figaro Diamantée Réf: 23106050
- Instructions spécifiques: Le pus vite possible
- 011 - 1ère Photo OFFERTE (Format JPG, 2 Méga maxi): 3045. Grand Pere029.jpg
- 012 - 2ème Photo (Format JPG, 2 Méga maxi): 3046. Alain031.jpg
- 021 - 1ère Photo au dos (Format JPG, 2 Méga maxi): 3047. Grand Pere029.jpg
Je souhaiterai que les options s'affichent dans l'odre des numeros

1 x08/ Plaque Rectangle petit modèle Plaqué-or
- 011 - 1ère Photo OFFERTE (Format JPG, 2 Méga maxi): 3045. Grand Pere029.jpg
- 012 - 2ème Photo (Format JPG, 2 Méga maxi): 3046. Alain031.jpg
- 019 - Texte devant (20 caractères maxi): Je t'aime
- 021 - 1ère Photo au dos (Format JPG, 2 Méga maxi): 3047. Grand Pere029.jpg
- 029 - Texte au dos (35 caractères maxi): merci
- 201-Ajout d'une chaîne en Plaqué-or: Figaro Diamantée Réf: 23106050
- Instructions spécifiques: Le pus vite possible

Merci d'avance

operceval

  • Guest
Re : Les options d'attribut dans le desordre
« Reply #1 on: March 24, 2010, 09:34:37 pm »
bonjour,

 je ne comprend  bien ta phrase mais , je te donne une réponse d après ce que j ai compris

tu as il me semble ( selon la version de osc) la possibilité  de mettre un ordre dans l affichage des options.
si c est le cas et que tes produits ne sont pas dans l ordre , il y a une modif a faire du type ORDER BY dans la requête qui sert à sélectionner les options possible du produit sélectionné.

S

stbo

  • Guest
options d'attribut dans le desordre
« Reply #2 on: March 25, 2010, 05:21:07 pm »
Bonjour,
La c'est moi ,qui comprendes pas. je reexplique
 Quand je suis sur ma page article
http://www.charmbijoux.com/product_info.php?cPath=147&products_id=323
J'ai mes options d'attribut dns l'ordre mais des que je passe commande en remplissant certain champs
sur la page suivante il sont dans le desordre
1 x08/ Plaque Rectangle petit modèle Plaqué-or
- 019 - Texte devant (20 caractères maxi): Je t'aime
- 029 - Texte au dos (35 caractères maxi): merci
- 201-Ajout d'une chaîne en Plaqué-or: Figaro Diamantée Réf: 23106050
- Instructions spécifiques: Le pus vite possible
- 011 - 1ère Photo OFFERTE (Format JPG, 2 Méga maxi): 3045. Grand Pere029.jpg
- 012 - 2ème Photo (Format JPG, 2 Méga maxi): 3046. Alain031.jpg
- 021 - 1ère Photo au dos (Format JPG, 2 Méga maxi): 3047. Grand Pere029.jpg
Je souhaiterai que les options s'affichent dans l'odre des numeros

1 x08/ Plaque Rectangle petit modèle Plaqué-or
- 011 - 1ère Photo OFFERTE (Format JPG, 2 Méga maxi): 3045. Grand Pere029.jpg
- 012 - 2ème Photo (Format JPG, 2 Méga maxi): 3046. Alain031.jpg
- 019 - Texte devant (20 caractères maxi): Je t'aime
- 021 - 1ère Photo au dos (Format JPG, 2 Méga maxi): 3047. Grand Pere029.jpg
- 029 - Texte au dos (35 caractères maxi): merci
- 201-Ajout d'une chaîne en Plaqué-or: Figaro Diamantée Réf: 23106050
- Instructions spécifiques: Le pus vite possible

Merci d'avance


operceval

  • Guest
Re : Les options d'attribut dans le desordre
« Reply #3 on: March 29, 2010, 03:13:10 pm »
alors ça se passe au niveau de l affichage des options de ton produit dans le panier. il n y pas de tri cohérent. il faut revoir la requête qui affiche les options dans le shopping_cart.php . tu maitrises le php et sql ?

stbo

  • Guest
Les options d'attribut dans le desordre
« Reply #4 on: March 29, 2010, 09:23:30 pm »
Bonjour,
Je connais un peu php et sql je ne sais pas

T'on idee c'est quoi ??

Merci

operceval

  • Guest
Re : Les options d'attribut dans le desordre
« Reply #5 on: March 30, 2010, 12:02:44 am »
quel version de oscommence utilises tu stp ?
parce que d après ce que je vois ; ta version est deja bien modifié avec option de téléchargement d images ... 
donc le code est différent de celui d origine.
sinon pour t avancer dans le  shopping_cart.php

tu as une requête qui va chercher tout les champs indispensables a l affichage des options dans le panier

ça ressemble a ça

Quote
            $attributes = tep_db_query("select op.options_id, ot.products_options_name, o.options_type, ov.products_options_values_name, op.options_values_price, op.price_prefix
                                        from " . TABLE_PRODUCTS_ATTRIBUTES . " op,   
                                             " . TABLE_PRODUCTS_OPTIONS_VALUES . " ov,
                                             " . TABLE_PRODUCTS_OPTIONS . " o,
                                             " . TABLE_PRODUCTS_OPTIONS_TEXT . " ot
                                        where op.products_id = '" . tep_get_prid($products[$i]['id']) . "'
                                          and op.options_values_id = '" . $value . "'
                                          and op.options_id = '" . $option . "'
                                          and ov.products_options_values_id = op.options_values_id
                                          and ov.language_id = '" . (int)$languages_id . "'
                                          and o.products_options_id = op.options_id
                                          and ot.products_options_text_id = o.products_options_id
                                          and ot.language_id = '" . (int)$languages_id . "'
                                       ");
            $attributes_values = tep_db_fetch_array($attributes);

attention ce n est qu une partie du code

il faut mettre un ORDER BY selon les champs de ta table. a priori si tes options on un ordre precis dans le fiche produit. tu  dois pouvoir le reproduire ici. soit tu as un champ de tri. soit c est trié par nom d attribut.

je suis un peu dans le trouble comme tu as des contributions sur les attributs . pas facile de voir le code exacte.

S
« Last Edit: March 30, 2010, 12:22:06 am by operceval »

stbo

  • Guest
Re : Les options d'attribut dans le desordre
« Reply #6 on: March 30, 2010, 09:33:43 pm »
Bonjour,
Ma version est osCommerce Online Merchant v2.2 RC2a
effectivement le webmaster de l'époque a installer une contribution pour le telechargement des photos mais je ne sais pas laquel !!!

Mon fichier ressemble plus a cela
Code: [Select]
          //echo tep_draw_hidden_field('id[' . $products[$i]['id'] . '][' . $option . ']', $value);
          $attributes = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix
                                      from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa
                                      where pa.products_id = '" . $products[$i]['id'] . "'
                                       and pa.options_id = '" . $option . "'
                                       and pa.options_id = popt.products_options_id
                                       and pa.options_values_id = '" . $value . "'
                                       and pa.options_values_id = poval.products_options_values_id
                                       and popt.language_id = '" . $languages_id . "'
                                       and poval.language_id = '" . $languages_id . "'");
          $attributes_values = tep_db_fetch_array($attributes);
Concernant le tri je souhaiterais le faire par nom (en locurence par numero chez moi .
Je ne sais pas comment je dois inserer le tri automatique .
Merci

operceval

  • Guest
Re : Les options d'attribut dans le desordre
« Reply #7 on: March 31, 2010, 12:51:16 am »
rapidement

essai ça
Code: [Select]
          $attributes = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix
                                      from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa
                                      where pa.products_id = '" . $products[$i]['id'] . "'
                                       and pa.options_id = '" . $option . "'
                                       and pa.options_id = popt.products_options_id
                                       and pa.options_values_id = '" . $value . "'
                                       and pa.options_values_id = poval.products_options_values_id
                                       and popt.language_id = '" . $languages_id . "'
                                       and poval.language_id = '" . $languages_id . "' order by popt.products_options_name");

stbo

  • Guest
Les options d'attribut dans le desordre
« Reply #8 on: March 31, 2010, 11:08:27 am »
Bonjour,

Cela ne change rien, cela n'effectue aucun changement sur le tri des attribut

operceval

  • Guest
Re : Les options d'attribut dans le desordre
« Reply #9 on: March 31, 2010, 11:42:07 am »
donne moi l intégralité de ce fichier STP

stbo

  • Guest
Re : Les options d'attribut dans le desordre
« Reply #10 on: March 31, 2010, 10:41:46 pm »
Voila le code
Code: [Select]
<?php
/*
  $Id: shopping_cart.php,v 1.73 2003/06/09 23:03:56 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_SHOPPING_CART);

  
$breadcrumb->add(NAVBAR_TITLEtep_href_link(FILENAME_SHOPPING_CART));
?>

<!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 type="text/javascript" language="JavaScript"><!--
function DoSubmission() {
document.cart_quantity.submit();
}
//--></script>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<body vlink="#000000" alink="#000000">
<!-- header //-->
<?php require(DIR_WS_INCLUDES 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">

<!-- body_text //-->
    <td width="100%" valign="top"><?php echo tep_draw_form('cart_quantity'tep_href_link(FILENAME_SHOPPING_CART'action=update_product')); ?><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_cart.gif'HEADING_TITLEHEADING_IMAGE_WIDTHHEADING_IMAGE_HEIGHT); ?></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><?php echo tep_draw_separator('pixel_trans.gif''100%''10'); ?></td>
      </tr>
<?php
  
if ($cart->count_contents() > 0) {
?>

      <tr>
        <td>
<?php
    $info_box_contents 
= array();
    
$info_box_contents[0][] = array('align' => 'center',
                                    
'params' => 'class="productListing-heading"',
                                    
'text' => TABLE_HEADING_REMOVE);

    
$info_box_contents[0][] = array('params' => 'class="productListing-heading"',
                                    
'text' => TABLE_HEADING_PRODUCTS);

    
$info_box_contents[0][] = array('align' => 'center',
                                    
'params' => 'class="productListing-heading"',
                                    
'text' => TABLE_HEADING_QUANTITY);

    
$info_box_contents[0][] = array('align' => 'right',
                                    
'params' => 'class="productListing-heading"',
                                    
'text' => TABLE_HEADING_TOTAL);

    
$any_out_of_stock 0;
    
$products $cart->get_products();
    for (
$i=0$n=sizeof($products); $i<$n$i++) {
// Push all attributes information in an array
      
if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {
        while (list(
$option$value) = each($products[$i]['attributes'])) {
          
//clr 030714 move hidden field to if statement below
          //echo tep_draw_hidden_field('id[' . $products[$i]['id'] . '][' . $option . ']', $value);
          
$attributes tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix
                                      from " 
TABLE_PRODUCTS_OPTIONS " popt, " TABLE_PRODUCTS_OPTIONS_VALUES " poval, " TABLE_PRODUCTS_ATTRIBUTES " pa
                                      where pa.products_id = '" 
$products[$i]['id'] . "'
                                       and pa.options_id = '" 
$option "'
                                       and pa.options_id = popt.products_options_id
                                       and pa.options_values_id = '" 
$value "'
                                       and pa.options_values_id = poval.products_options_values_id
                                       and popt.language_id = '" 
$languages_id "'
                                       and poval.language_id = '" 
$languages_id "'");
          
$attributes_values tep_db_fetch_array($attributes);

          
//clr 030714 determine if attribute is a text attribute and assign to $attr_value temporarily
          
if ($value == PRODUCTS_OPTIONS_VALUE_TEXT_ID) {
            echo 
tep_draw_hidden_field('id[' $products[$i]['id'] . '][' TEXT_PREFIX $option ']',  $products[$i]['attributes_values'][$option]);
            
$attr_value $products[$i]['attributes_values'][$option];
          } else {
            echo 
tep_draw_hidden_field('id[' $products[$i]['id'] . '][' $option ']'$value);
            
$attr_value $attributes_values['products_options_values_name'];
          }

          
$products[$i][$option]['products_options_name'] = $attributes_values['products_options_name'];
          
$products[$i][$option]['options_values_id'] = $value;
          
//clr 030714 assign $attr_value
          
$products[$i][$option]['products_options_values_name'] = $attr_value ;
          
$products[$i][$option]['options_values_price'] = $attributes_values['options_values_price'];
          
$products[$i][$option]['price_prefix'] = $attributes_values['price_prefix'];
        }
      }
    }

    for (
$i=0$n=sizeof($products); $i<$n$i++) {
      if ((
$i/2) == floor($i/2)) {
        
$info_box_contents[] = array('params' => 'class="productListing-even"');
      } else {
        
$info_box_contents[] = array('params' => 'class="productListing-odd"');
      }

      
$cur_row sizeof($info_box_contents) - 1;

      
$info_box_contents[$cur_row][] = array('align' => 'center',
                                             
'params' => 'class="productListing-data" valign="top"',
                                             
'text' => tep_draw_checkbox_field('cart_delete[]'$products[$i]['id'], ' ''onClick="DoSubmission();"'));

      
$products_name '<table border="1" cellspacing="2" cellpadding="2">' .
                       
'  <tr>' .
                       
'    <td class="productListing-data" align="center"><a href="' tep_href_link(FILENAME_PRODUCT_INFO'products_id=' $products[$i]['id']) . '">' tep_image(DIR_WS_IMAGES $products[$i]['image'], $products[$i]['name'], SMALL_IMAGE_WIDTHSMALL_IMAGE_HEIGHT) . '</a></td>' .
                       
'    <td class="productListing-data" valign="top" width="100%"><a href="' tep_href_link(FILENAME_PRODUCT_INFO'products_id=' $products[$i]['id']) . '"><b>' $products[$i]['name'] . '</b></a>';

      if (
STOCK_CHECK == 'true') {
        
$stock_check tep_check_stock($products[$i]['id'], $products[$i]['quantity']);
        if (
tep_not_null($stock_check)) {
          
$any_out_of_stock 1;

          
$products_name .= $stock_check;
        }
      }

      if (isset(
$products[$i]['attributes']) && is_array($products[$i]['attributes'])) {
        
reset($products[$i]['attributes']);
        while (list(
$option$value) = each($products[$i]['attributes'])) {
          
$products_name .= '<br><small><i> - ' $products[$i][$option]['products_options_name'] . ' ' $products[$i][$option]['products_options_values_name'] . '</i></small>';
        }
      }

      
$products_name .= '    </td>' .
                        
'  </tr>' .
                        
'</table>';

      
$info_box_contents[$cur_row][] = array('params' => 'class="productListing-data"',
                                             
'text' => $products_name);

      
$info_box_contents[$cur_row][] = array('align' => 'center',
                                             
'params' => 'class="productListing-data" valign="top"',
                                             
'text' => tep_draw_input_field('cart_quantity[]'$products[$i]['quantity'], 'size="4"') . tep_draw_hidden_field('products_id[]'$products[$i]['id']));

      
$info_box_contents[$cur_row][] = array('align' => 'right',
                                             
'params' => 'class="productListing-data" valign="top"',
                                             
'text' => '<b>' $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</b>');
    }

    new 
productListingBox($info_box_contents);
?>

        </td>
      </tr>
      <tr>
        <td><?php echo tep_draw_separator('pixel_trans.gif''100%''10'); ?></td>
      </tr>
      <tr>
        <td align="right" class="main"><b><?php echo SUB_TITLE_SUB_TOTAL?> <?php echo $currencies->format($cart->show_total()); ?></b></td>
      </tr>
<?php
    
if ($any_out_of_stock == 1) {
      if (
STOCK_ALLOW_CHECKOUT == 'true') {
?>

      <tr>
        <td class="stockWarning" align="center"><br><?php echo OUT_OF_STOCK_CAN_CHECKOUT?></td>
      </tr>
<?php
      
} else {
?>

      <tr>
        <td class="stockWarning" align="center"><br><?php echo OUT_OF_STOCK_CANT_CHECKOUT?></td>
      </tr>
<?php
      
}
    }
?>

      <tr>
        <td><?php echo tep_draw_separator('pixel_trans.gif''100%''10'); ?></td>
      </tr>
      <tr>
        <td><table border="3" 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"><?php echo tep_image_submit('button_update_cart.gif'IMAGE_BUTTON_UPDATE_CART); ?></td>
<?php
    $back 
sizeof($navigation->path)-2;
    if (isset(
$navigation->path[$back])) {
?>

                <td class="main"><?php echo '<a href="' tep_href_link($navigation->path[$back]['page'], tep_array_to_string($navigation->path[$back]['get'], array('action')), $navigation->path[$back]['mode']) . '">' tep_image_button('button_continue_shopping.gif'IMAGE_BUTTON_CONTINUE_SHOPPING) . '</a>'?></td>
<?php
    
}
?>

                <td align="right" class="main"><?php echo '<a href="' tep_href_link(FILENAME_CHECKOUT_SHIPPING'''SSL') . '">' tep_image_button('button_checkout.gif'IMAGE_BUTTON_CHECKOUT) . '</a>'?></td>
                <td width="10"><?php echo tep_draw_separator('pixel_trans.gif''10''1'); ?></td>
              </tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
<?php
  
} else {
?>

      <tr>
        <td align="center" class="main"><?php new infoBox(array(array('text' => TEXT_CART_EMPTY))); ?></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 align="right" class="main"><?php echo '<a href="' tep_href_link(FILENAME_DEFAULT) . '">' tep_image_button('button_continue.gif'IMAGE_BUTTON_CONTINUE) . '</a>'?></td>
                <td width="10"><?php echo tep_draw_separator('pixel_trans.gif''10''1'); ?></td>
              </tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
<?php
  
}
?>

    </table></form></td>
<!-- body_text_eof //-->
<!-- 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'); ?>

Offline bonbec

  • Nouveau venu
  • **
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Re : Les options d'attribut dans le desordre
« Reply #11 on: March 31, 2010, 11:07:27 pm »
Bonsoir,
dans cette portion de code :
Code: [Select]
if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {
        reset($products[$i]['attributes']);
        while (list($option, $value) = each($products[$i]['attributes'])) {
          $products_name .= '<br><small><i> - ' . $products[$i][$option]['products_options_name'] . ' ' . $products[$i][$option]['products_options_values_name'] . '</i></small>';
        }
      }

A la place de reset($products[$i]['attributes']); essayer de mettre ksort($products[$i]['attributes']);
En espérant que ce soit la solution.

stbo

  • Guest
Re : Les options d'attribut dans le desordre
« Reply #12 on: March 31, 2010, 11:20:58 pm »
Desolé mais cela ne fontionne pas toujours dans le desordre

operceval

  • Guest
Re : Les options d'attribut dans le desordre
« Reply #13 on: April 01, 2010, 01:22:27 pm »
ok peux tu me mettre aussi le product_info.php STP , si le code et trop important tu peux me l envoyer en message priver

stbo

  • Guest
Les options d'attribut dans le desordre
« Reply #14 on: April 02, 2010, 08:46:31 am »
Bonjour,
 premier partie du code
Code: [Select]
<?php
/*
  $Id: product_info.php 1739 2007-12-20 00:52:16Z hpdl $

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

  
$product_check_query tep_db_query("select count(*) as total from " TABLE_PRODUCTS " p, " TABLE_PRODUCTS_DESCRIPTION " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id "'");
  
$product_check tep_db_fetch_array($product_check_query);
?>

<!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?>">
<?php include(DIR_WS_INCLUDES 'easy_meta_tags.php'); ?>
<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"><!--
function popupWindow(url) {
  window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150')
}
//--></script>
<style type="text/css">
<!--
.Style1 {
color: #000000;
font-weight: bold;
}
-->
</style>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<body vlink="#000000" alink="#000000">
<!-- header //-->
<?php require(DIR_WS_INCLUDES 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
  <tr>
   
<!-- body_text //-->
<?php 
// iii 030813 added:  File upload: 'enctype="multipart/form-data"'
// explicitly state post so that the parameters sections can be set
// It might be better to make this dependent on the presence of file fields 
// in the future.
?>

    <td width="100%" valign="top"><?php echo tep_draw_form('cart_quantity'tep_href_link(FILENAME_PRODUCT_INFOtep_get_all_get_params(array('action')) . 'action=add_product'), 'post''enctype="multipart/form-data"'); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
      <tr>
        <td><?php echo $messageStack->output('upload'); ?></td>
      </tr>
<?php
  
if ($product_check['total'] < 1) {
?>

      <tr>
        <td><?php new infoBox(array(array('text' => TEXT_PRODUCT_NOT_FOUND))); ?></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 align="right"><?php echo '<a href="' tep_href_link(FILENAME_DEFAULT) . '">' tep_image_button('button_continue.gif'IMAGE_BUTTON_CONTINUE) . '</a>'?></td>
                <td width="10"><?php echo tep_draw_separator('pixel_trans.gif''10''1'); ?></td>
              </tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
<?php
  
} else {
// BOF MaxiDVD: Modified For Ultimate Images Pack!
    
$product_info_query tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, p.products_image_med, p.products_image_lrg, p.products_image_sm_1, p.products_image_xl_1, p.products_image_sm_2, p.products_image_xl_2, p.products_image_sm_3, p.products_image_xl_3, p.products_image_sm_4, p.products_image_xl_4, p.products_image_sm_5, p.products_image_xl_5, p.products_image_sm_6, p.products_image_xl_6, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " TABLE_PRODUCTS " p, " TABLE_PRODUCTS_DESCRIPTION " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id "'");
// EOF MaxiDVD: Modified For Ultimate Images Pack!
    
$product_info tep_db_fetch_array($product_info_query);

    
tep_db_query("update " TABLE_PRODUCTS_DESCRIPTION " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id "'");

    if (
$new_price tep_get_products_special_price($product_info['products_id'])) {
      
$products_price '<s>' $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' $currencies->display_price($new_pricetep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';
    } else {
      
$products_price $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']));
    }

    if (
tep_not_null($product_info['products_model'])) {
      
$products_name $product_info['products_name'] . '<br><span class="smallText">[' $product_info['products_model'] . ']</span>';
    } else {
      
$products_name $product_info['products_name'];
    }
    if (
$new_price tep_get_products_special_price($product_info['products_id'])) {
        
$img_promotion_product tep_image_button('/images/icon_promotion.gif'TEXT_ICON_PROMOTION_PRODUCT '&nbsp;:&nbsp;' $product_info['products_name']);
    }
?>

      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td class="pageHeading" valign="top"><?php echo $img_promotion_product $products_name?></td>
            <td class="pageHeading" align="right" valign="top"><?php echo $products_price?></td>
          </tr>
        </table></td></tr>
      <tr>
        <td><?php echo tep_draw_separator('pixel_trans.gif''100%''10'); ?></td>
      </tr>
      <tr>
        <td>
        <table border="0" cellspacing="0" cellpadding="2" align="right">
           
          </table>
        </td>
      </tr>
      <tr>
        <td class="main">


<?php
    
if (tep_not_null($product_info['products_image'])) {
?>

<table border="0" cellspacing="0" cellpadding="2" align="right">
            <tr>
              <td align="center" class="smallText">
  <!-- // BOF MaxiDVD: Modified For Ultimate Images Pack! //-->
  <?php
 
if ($product_info['products_image_med']!='') {
          
$new_image $product_info['products_image_med'];
          
$image_width MEDIUM_IMAGE_WIDTH;
          
$image_height MEDIUM_IMAGE_HEIGHT;
         } else {
          
$new_image $product_info['products_image'];
          
$image_width SMALL_IMAGE_WIDTH;
          
$image_height SMALL_IMAGE_HEIGHT;}?>
<br>
  <div align="center"><?php echo PHOTONONTRA_LANG?></div>
  <br>     
  <script language="javascript"><!--
      document.write('<?php echo '<a href="javascript:popupWindow(\\\'' tep_href_link(FILENAME_POPUP_IMAGE'pID=' $product_info['products_id'] . '&image=0') . '\\\')">' tep_image(DIR_WS_IMAGES $new_imageaddslashes($product_info['products_name']), $image_width$image_height'hspace="5" vspace="5"') . '<br>' tep_image_button('image_enlarge.gif'TEXT_CLICK_TO_ENLARGE) . '</a>'?>');
//--></script>
  <noscript>
    <?php echo '<a href="' tep_href_link(DIR_WS_IMAGES $product_info['products_image_med']) . '">' tep_image(DIR_WS_IMAGES $new_image '&image=0'addslashes($product_info['products_name']), $image_width$image_height'hspace="5" vspace="5"') . '<br>' tep_image_button('image_enlarge.gif'TEXT_CLICK_TO_ENLARGE) . '</a>'?>
  </noscript>
  <!-- // EOF MaxiDVD: Modified For Ultimate Images Pack! //-->                </td>
              </tr>
            </table>
  <?php
    
}
?>
         
          <?php echo stripslashes($product_info['products_description']); ?>
<?php
// iii 030813 added: initialize $number_of_uploads
    
$number_of_uploads 0;
    
$products_attributes_query tep_db_query("select count(*) as total from " TABLE_PRODUCTS_OPTIONS " popt, " TABLE_PRODUCTS_ATTRIBUTES " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id "'");
    
$products_attributes tep_db_fetch_array($products_attributes_query);
    if (
$products_attributes['total'] > 0) {
?>

 <!-- modification couleur de fond des options disponible des produits //-->
          <table border="5" align="center" cellpadding="1" cellspacing="10" bgcolor="#f8eac9">
            <tr>
              <td class="main" colspan="2"><div align="center"><?php echo TEXT_PRODUCT_OPTIONS?></div>                </td>
            </tr>
           
           
<?php
//clr 030714 update query to pull option_type
      
$products_options_name_query tep_db_query("select distinct popt.products_options_id, popt.products_options_name, popt.products_options_type, popt.products_options_length, popt.products_options_comment from " TABLE_PRODUCTS_OPTIONS " popt, " TABLE_PRODUCTS_ATTRIBUTES " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id "' order by popt.products_options_name");
      while (
$products_options_name tep_db_fetch_array($products_options_name_query)) {
//clr 030714 add case statement to check option type
        
switch ($products_options_name['products_options_type']) {
          case 
PRODUCTS_OPTIONS_TYPE_TEXT:
            
//CLR 030714 Add logic for text option
            
$products_attribs_query tep_db_query("select distinct patrib.options_values_price, patrib.price_prefix from " TABLE_PRODUCTS_ATTRIBUTES " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = '" $products_options_name['products_options_id'] . "'");
            
$products_attribs_array tep_db_fetch_array($products_attribs_query);
            
$tmp_html '<input type="text" name ="id[' TEXT_PREFIX $products_options_name['products_options_id'] . ']" size="' $products_options_name['products_options_length'] .'" maxlength="400" '.' value="' $cart->contents[$HTTP_GET_VARS['products_id']]['attributes_values'][$products_options_name['products_options_id']] .'">  ' $products_options_name['products_options_comment'] ;
            
?>

            <tr>
              <td class="main"><?php echo $products_options_name['products_options_name'] . ':'?>
              <?php
                   if (
$products_attribs_array['options_values_price'] != '0') {
              echo '(' $products_attribs_array['price_prefix'] . $currencies->display_price($products_attribs_array['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . ')';
            }

              
?>
</td>
              <td class="main"><?php echo $tmp_html;  ?></td>
            </tr>