J'ai donc plusieurs page concernant des collections differentes (colelction homme, femme, enfants...etc).
Chaque pages sont contituées de la liste des produits de la collection en question avec pour chacun, une checkbox et les couleurs et tailles les concernants.
Se que je voudrais faire, c'est choisir ces produits dans une collection, mettre en memoire session les produit coché lorsqu'on clique sur le lien d'une autre collection.
Se qui permetterai de passer d'une collection à l'autre en gardant en memoire tous les produits déjà selectionnés.
Comment je peux faire ca, j'ai vu comment fonctionne la mise en mémoire dans la session d'une variable, mais il faut valider un fomulaire pour faire la mise en memoire non?
Je laisse une de mes pages colelction pour montrer comment est formé ma page:
Code : Tout sélectionner
<!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">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<tr>
<td width="720">
<table border="0" cellpadding="0" cellspacing="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->
</table>
</td>
</tr>
<tr>
<td width="720">
<!-- body //-->
<table align="center" border="0" width="720" cellspacing="0" cellpadding="0">
<tr>
<!-- body_text //-->
<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td align="center" class="pageHeading" height="18" width="200"><?php echo HEADING_TITLE; ?></td>
<td class="pageheadingFonce" height="18" width="520"></td>
</tr>
</table></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '3'); ?></td>
</tr>
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td class="main"><?php echo TEXT_INFORMATION; ?></td>
</tr>
</table></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '3'); ?></td>
</tr>
<tr>
<td>
<?php echo tep_draw_form('directbuy', tep_href_link(FILENAME_DIRECTBUY_CONFIRM), 'post'); ?>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td colspan="6">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="main" align="center" width="178" height="25"><a class="directbuy" href="directbuy_femme.php" title="Collection Femme">Collection Femme</a></td>
<td width="3" height="15"></td>
<td class="main" align="center" width="178" height="25"><a class="directbuy" href="directbuy_homme.php" title="Collection Homme">Collection Homme</a></td>
<td width="3" height="15"></td>
<td class="main" align="center" width="178" height="25"><a class="directbuy" href="directbuy_enfant.php" title="Collection Enfant">Collection Enfant</a></td>
<td width="3" height="15"></td>
<td class="main" align="center" width="178" height="25"><a class="directbuy" href="directbuy_accessoire.php" title="Collection Accessoires">Accessoires</a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '3'); ?></td>
</tr>
<tr>
<td class="main" colspan="6" height="10"></td>
</tr>
<tr>
<td class="titre_directbuy" colspan="6" height="25" align="center">COLLECTION HOMME</td>
</tr>
<tr>
<td class="main" colspan="6" height="10"></td>
</tr>
<tr>
<td class="main" align="center"><?php echo DIRECTBUY_CHECK; ?></td>
<td class="main" align="center"><?php echo DIRECTBUY_REF; ?></td>
<td class="main" align="center"><?php echo DIRECTBUY_PRODUCT; ?></td>
<td class="main" align="center"><?php echo DIRECTBUY_COLOR; ?></td>
<td class="main" align="center"><?php echo DIRECTBUY_SIZE; ?></td>
<td class="main" align="center"><?php echo DIRECTBUY_QUANTITY; ?></td>
</tr>
<tr>
<td class="main" colspan="6" height="10"></td>
</tr>
<?php
$request = tep_db_query("SELECT c.parent_id, pd.products_id, pd.products_name, p.products_ref, p.products_price, s.specials_new_products_price, taille.products_options_values_id, couleur.products_options_values_id, couleur.products_options_values_name AS couleur, taille.products_options_values_name AS taille, pa.options_values_price, (
pa.options_values_price + p.products_price ) AS final_price, (pa.options_values_price + s.specials_new_products_price ) AS final_price_promo
FROM products_stock ps, products_description pd LEFT JOIN specials s USING(products_id), products_options_values couleur, products_options_values taille, products_attributes pa, products p, products_to_categories p2c, categories c
WHERE pd.products_id = ps.products_id
AND pd.products_id = pa.products_id
AND pd.products_id = p.products_id
AND p2c.products_id = pd.products_id
AND p2c.categories_id = c.categories_id
AND c.parent_id = 2
AND SUBSTRING( ps.products_stock_attributes FROM 3 FOR 2 ) = couleur.products_options_values_id
AND SUBSTRING( ps.products_stock_attributes FROM 8 FOR 2 ) = taille.products_options_values_id
AND pa.options_values_id = taille.products_options_values_id
ORDER BY pd.products_name, couleur.products_options_values_id, taille.products_options_values_id ");
while($data = mysql_fetch_assoc($request))
{
if ($data['final_price_promo'] == '') {
$final_price = $data['final_price'];
} else {
$final_price = $data['final_price_promo'];
}
echo '<tr>
<td class="directbuy" width="90" align="center"><input type="checkbox" name="select[]" value="p' . $data['products_id'] . 'c' . $data['couleur'] . 't' . $data['taille'] . '-' . $data['products_name'] . '-' . $data['taille'] . '-' . $data['couleur'] . '-' . $final_price . '" /></td>
<td class="directbuy_ref" width="50">' . $data['products_ref'] . '</td>
<td class="directbuy_nom" width="260">' . $data['products_name'] . '</td>
<td class="directbuy" width="130" align="center">' . $data['couleur'] . '</td>
<td class="directbuy" width="90" align="center">' .$data['taille'] . '</td>
<td class="directbuy_check" width="100" align="center"><input class="quantite" type="text" name="p' . $data['products_id'] . 'c' . $data['couleur'] . 't' . $data['taille'] . '" /></td>
</tr>';
}
?>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '3'); ?></td>
</tr>
</table>
</td>
</tr>
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="0" class="infoBox">
<tr class="infoBoxContents">
<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td width="10" class="main"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
<td class="main" align="right"><?php echo tep_image_submit('button_visionner_commande.gif', IMAGE_BUTTON_VISIONNER_COMMANDE); ?></td>
<td width="10" class="main"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr>
</table></form></td>
</tr>
</table></td>
</tr>
</table></td>
<!-- body_text_eof //-->
<!-- body_eof //-->
</td>
</tr>
<tr>
<td height="3"></td>
</tr>
<tr>
<td width="720">
<table border="0" cellpadding="0" cellspacing="0">
<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
</table>
</td>
</tr>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>