</form> </div> </div> <?php echo "<div id='recap_panier'>"; echo "<h3>Récapitulatif de votre panier</h3>"; echo "<div id='titre_recap'><p class='tReca'>Titre</p><p class='tReca'>Quantité</p><p class='tReca'>Prix</p></div>"; for ($w = 0; $w < count($_SESSION['panier']['id_article']); $w++) { echo '<div class="article_recap">'; echo "<img class='img_articlePanier' src='" . $_SESSION['panier']['photo'][$w] . "' alt='" . $_SESSION['panier']['titre'][$w] . "' title='" . $_SESSION['panier']['titre'][$w] . "' >"; echo "<p class='titreA_recap'>" . $_SESSION['panier']['titre'][$w] . "</p>"; echo "<p class='quantite_recap'>" . $_SESSION['panier']['quantite'][$w] . "</p>"; if ($_SESSION['panier']['id_promo'] == 1) { echo "<p class='prix_recap'>" . $_SESSION['panier']['prix'][$w] . " €</p>"; } else { echo "<p class='prix_recap'>" . prixAvecPromo($_SESSION['panier']['id_article'][$w]) . "€</p>"; } echo "</div>"; } if (montantTotal() > 50) { echo "<div id='shipping'><p>Frais de port :</p><p>Offert</p></div>"; } else { echo "<div id='shipping'><p>Frais de port :</p><p>4,50 €</p></div>"; } echo "<div id='montant_panier'><p>Sous total :</p><p>" . montantSousTotal() . " €</p></div>"; echo "<div id='montant_panierTotal'><p>Prix total :</p><p>" . montantTotal() . " €</p></div>"; echo "</div>"; ?> </div>
echo "<div class=''>"; echo "<p class='infosArticle_design1'>Stock :</p>"; echo "<p class='infosArticle_design2'>{$ligne['stock']}</p>"; echo "</div>"; echo "<div class='separateur_hori'></div>"; echo "<div class=''>"; echo "<p class='infosArticle_design1'>Prix unitaire :</p>"; echo "<p class='infosArticle_design2'>{$ligne['prix']} €</p>"; echo "</div>"; echo "<div class='separateur_hori'></div>"; echo "<div class=''>"; echo "<p class='infosArticle_design1'>Prix avec promo :</p>"; if ($ligne['prix'] == prixAvecPromo($ligne['id_article'])) { echo "<p class='infosArticle_design2'>--</p>"; } else { echo "<p class='infosArticle_design2'>" . prixAvecPromo($ligne['id_article']) . " €</p>"; } echo "</div>"; echo "<div class='separateur_hori'></div>"; echo "<div class=''>"; echo "<p class='infosArticle_design1'>Fabrication :</p>"; echo "<p class='infosArticle_design3'>{$ligne['fabrication']}</p>"; echo "</div>"; echo "<div class='separateur_hori'></div>"; echo "<div class=''>"; echo "<p class='infosArticle_design1'>Durée de garantie :</p>"; if ($ligne['garantie'] == 1) { echo "<p class='infosArticle_design2'>{$ligne['garantie']} an</p>"; } else { echo "<p class='infosArticle_design2'>{$ligne['garantie']} ans</p>"; }
while ($article = $donnees2->fetch_assoc()) { $recup_promo = informationSurUnePromotion($article['id_article']); $promotion = $recup_promo->fetch_assoc(); $calcul_note = executeRequete("SELECT ROUND(AVG(note)*2)/2 AS moyenne FROM avis WHERE id_article = {$article['id_article']}"); $note_final = $calcul_note->fetch_assoc(); echo '<div class="articleCat">'; echo '<div class="note">'; imageNotation($note_final['moyenne']); echo '</div>'; if ($article['id_promo'] == 1) { echo '<div class="fond_prixCat">'; echo "<p>{$article['prix']} €</p>"; echo '</div>'; } else { echo '<div class="fond_prixPromoCat">'; echo "<p><span class='old_price'>{$article['prix']}€ </span> " . prixAvecPromo($article['id_article']) . "€</p>"; echo '</div>'; } echo "<a href='fiche_article.php?id_article={$article['id_article']}&categorie={$article['categorie']}'><img src='{$article['photo']}' alt='{$article['titre']}' class='img_article'></a>"; echo "<h3>{$article['titre']}</h3>"; if (utilisateurEstConnecte()) { echo "<form method='post' action='panier.php'>"; echo "<input type='hidden' name='id_article' value='{$article['id_article']}'>"; echo "<input type='hidden' name='quantite' value='1'>"; echo '<input type="submit" name="ajout_panier" value="" class="bouton btn_ajoutPanierFA btn_connect" data-tooltip="Ajouter au panier">'; echo '</form>'; echo "<a href='fiche_article.php?id_article={$article['id_article']}&categorie={$article['categorie']}' class='bouton btn_ficheDetails' data-tooltip='Voir la fiche du produit'></a>"; echo "<form method='post' action='wishlist.php'>"; echo "<input type='hidden' name='id_article' value='{$article['id_article']}'>"; echo '<input type="submit" name="ajout_wishlist" value="" class="bouton btn_wishlist" data-tooltip="Ajouter au favoris">'; echo '</form>';