Structuré le panier dans un tableau
ciranox
Messages postés
387
Date d'inscription
Statut
Membre
Dernière intervention
-
ciranox Messages postés 387 Date d'inscription Statut Membre Dernière intervention -
ciranox Messages postés 387 Date d'inscription Statut Membre Dernière intervention -
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 :
Merci d'avance.
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') . ' 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 voir également:
- Structuré le panier dans un tableau
- Tableau word - Guide
- Trier un tableau excel - Guide
- Tableau ascii - Guide
- Imprimer un tableau excel - Guide
- Tableau croisé dynamique - Guide