if ($supArt) { // On supprime un article du panier $supPanier = new Panier(); $supPanier->numdetail = $supArt; $supPanier->supprimerArticle(); } else { if ($action == "maj") { //on met à jour la quantité d'articles dans le panier $modifPanier = new Panier(); $modifPanier->numcom = $_SESSION['numcom']; $list_art = $modifPanier->listerArticles(); for ($i = 0; $i < count($list_art); $i++) { $article = $list_art[$i]; $modifQte = "textQte" . $article["numdetail"]; $modifPanier->numdetail = $article["numdetail"]; $modifPanier->miseAJourQteArticle(${$modifQte}); } $mes = "Votre panier a été mis à jour"; } else { if ($action == "confirmerCom") { //clic sur bouton Etape2 $laCom = new Commande(); $laCom->numcom = $_SESSION['numcom']; if (!$prix) { //Ce n'est pas un article créé à la volée $laCom->pays = $selectPays; $laCom->modifierPays(); } //if ($_SESSION['numclient']) $etape=3; else $etape=2; //if (($prix &&!$_SESSION['numclient']) || !$_SESSION['numclient']) $etape=2; else $etape=3; if (!$_SESSION['numclient']) {