Bonjour à Toutes et à Tous,
Création d'un "caddie" Réservation
Je tente de créer un site associatif, pour exemple j'ai choisi un site de vêtement :
Ce site pourra être adapté à plusieurs boutiques (Vêtement, Bijoux, Fleurs, etc...)
4 Pages :
- Femme
- Homme
- Enfant
- Accessoire
sur chacune de ces pages, des articles s'affichent
J'aimerai créer un panier uniquement de réservation d'articles
L'internaute choisi un ou plusieurs articles et les réservent puis ensuite va à la boutique les récupérer et les payer
Je ne vois vraiment pas comment m'y prendre, tableau session array()
SI table mémoire ; ajout suppression et affichage de l'article
voici mon code de ma page :
<?php
$reponse =$bdd->prepare('SELECT * FROM '.$articles_BDD.' WHERE categorie LIKE "'.$categorie.'%" ORDER BY id_article ASC');
$reponse->bindParam(':id_article', $id_article, PDO::PARAM_INT);
$reponse->bindParam(':codearticle', $codearticle, PDO::PARAM_STR);
$reponse->bindParam(':article', $article, PDO::PARAM_STR);
$reponse->bindParam(':photo', $photo, PDO::PARAM_STR);
$reponse->bindParam(':prixht', $prixht, PDO::PARAM_INT);
$reponse->bindParam(':tva', $tva, PDO::PARAM_INT);
$reponse->bindParam(':prixttc', $prixttc, PDO::PARAM_INT);
$reponse->bindParam(':taille1', $taille1, PDO::PARAM_STR);
$reponse->bindParam(':taille2', $taille2, PDO::PARAM_STR);
$reponse->bindParam(':taille3', $taille3, PDO::PARAM_STR);
$reponse->bindParam(':taille4', $taille4, PDO::PARAM_STR);
$reponse->bindParam(':taille5', $taille5, PDO::PARAM_STR);
$reponse->bindParam(':categorie', $categorie, PDO::PARAM_STR);
$reponse->bindParam(':slogan', $slogan, PDO::PARAM_STR);
$reponse->execute();
while ($ligne = $reponse->fetch())
{
$id=$ligne['id_article'];
if($ligne['slogan']<>"" ) {
$afficheslogan=$ligne['slogan'];
}
else{
$afficheslogan="<span class='pasdeslogan'> </span></br>";
}
// ---------------------------------------------------------------------------------------------------------------------
$prixht=$ligne['prixht'];
$tva=$ligne['tva'];
$montanttva = $ligne['prixht']*$ligne['tva']/100;
$prixttc=$prixht+$montanttva;
$nombre_format_francais = number_format($prixttc, 2, ',', ' ');
$photo='../img/photos/femme/';
echo "<article class='news oneThird'>
<div>";
if($ligne['slogan']<>"" ) {
echo"<h3 class='texterougegras'>".$afficheslogan."</h3>";
}else{
echo"<h3>".$afficheslogan."</h3>";
}
if($ligne['taille1']=='oui'){
$taille1 ='S';
}
if($ligne['taille2']=='oui'){
$taille2 ='-M';
}
if($ligne['taille3']=='oui'){
$taille3 ='-L';
}
if($ligne['taille4']=='oui'){
$taille4 ='-XL';
}
if($ligne['taille5']=='oui'){
$taille5 ='-XXL';
}
if($ligne['couleur']<>''){
$couleur=$ligne['couleur'];
}
echo"<img src=".$photo.'/'.$ligne['photo']." class='truc' alt=".$ligne['article']." title=".$ligne['article']."></a></br/>";
echo"<p class='titre03'>Code Produit : ".$ligne['codearticle']."</p>
<p class='titre02'>".$ligne['article']."</p>
<p class='titre02'>Prix : ".$nombre_format_francais.'€'."</p>
<p class='titre01responsive'>Taille :". $taille1.' '.$taille2.' '.$taille3.' '.$taille4.' '.$taille5."</p>";
if($ligne['marque']<>''){
echo"<p class='titre01responsive'>Marque :". $ligne['marque']."</p>";
}
if($ligne['couleur']<>''){
echo"<p class='titre01responsive'>Couleur :".$couleur."</p>";
}
echo"</div>
</article>";
}
$reponse->closeCursor();
?>
Merci Pour Votre aide
Bernard
Afficher la suite