8797 sujets

Développement web côté serveur, CMS

Bonjour,

Je travail actuellement sur un site de vente , j'utilise oscommerce 2.3.

Je souhaite modifier l'apparence de la page panier et mettre les différents éléments dans un tableau comme ci-dessou.

IMAGE PRODUIT | NOM DU PRODUIT | PRIX | QUANTITE | BOUTON MISE A JOUR | BOUTON SUPPRIMER
voici le code :

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<?php

    for ($i=0, $n=sizeof($products); $i<$n; $i++) {
      echo '      <tr>';

      $products_name = '<table border="0" cellspacing="2" cellpadding="2">' .
                       '  <tr>' .
                       '    <td 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_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>' .
                       '    <td valign="top"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '"><strong>' . $products[$i]['name'] . '</strong></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 .= '<br /><br />' . tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4"') . tep_draw_hidden_field('products_id[]', $products[$i]['id']) . tep_draw_button(IMAGE_BUTTON_UPDATE, 'refresh') . '&nbsp;&nbsp;&nbsp;or <a href="' . tep_href_link(FILENAME_SHOPPING_CART, 'products_id=' . $products[$i]['id'] . '&action=remove_product') . '">remove</a>';

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

    
	
	
	echo '        <td valign="top">' . $products_name . '</td>' .
           '        <td align="right" valign="top"><strong>' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</strong></td>' .
           '      </tr>';
    }
?>

    </table>

   
    <p align="right"><strong><?php echo SUB_TITLE_SUB_TOTAL; ?> <?php echo $currencies->format($cart->show_total()); ?></strong></p>



Merci d'avance.
a+ Smiley biggrin
L'idéal serait sans doute de te rendre sur le forum de oscommerce...

Ce genre de CMS utilise un système de template qu'il te faudra éditer et dont la structure dynamique est propre à chaque CMS. Ici on peut t'aider à vérifier que tes codes xhtml et css sont corrects, mais on aura du mal à te dire quoi écrire.

La communauté oscommerce saura très certainement mieux t'aider que nous
Salut pixelb,

J'aurais bien aimer poser ma question sur le forum d'oscommerce. Mais le forum est vraiment désertique,il n'y a quasi personne.

Je vais travailler dessus aujourd'hui, Je vais sûrement y arriver.

a+
Smiley biggrin