Пример #1
0
            }
            break;
        case 'update':
            $donnees = $_POST["datas"];
            foreach ($donnees as $data) {
                if ($data['quantity'] == 0) {
                    unset($_SESSION['panier'][$data['idProduit']]);
                } else {
                    $_SESSION['panier'][$data['idProduit']] = $data['quantity'];
                }
            }
            echo json_encode("sucess");
            die;
            break;
        case 'clear':
            $panier->viderPanier();
            break;
    }
}
?>
<!DOCTYPE html>

<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!--[if lt IE 7 ]> <html class="ie6"> <![endif]-->
<!--[if IE 7 ]> <html class="ie7"> <![endif]-->
<!--[if IE 8 ]> <html class="ie8"> <![endif]-->
<!--[if IE 9 ]> <html class="ie9"> <![endif]-->
<!--[if IE 7]>
<script type="text/javascript">