Exemplo n.º 1
0
<?php

if (session_status() < 2) {
    session_start();
}
echo '<meta http-equiv="Content-type" content="text/html;charset=UTF-8">';
if (isset($_POST['product_id'])) {
    $item = $_POST['product_id'];
}
if (isset($_POST['product_size'])) {
    $size = $_POST['product_size'];
}
if ($size === '30') {
    $price = $_POST['price30'];
}
if ($size === '60') {
    $price = $_POST['price60'];
}
require 'functions.php';
$cart = new smallCart();
$cart->add($item, $size, $price);
header('location: pizza.php');
Exemplo n.º 2
0
if (session_status() < 2) {
    session_start();
}
echo '<meta charset="utf-8">';
echo '<div class="small_cart_header">' . '<a>Ваш заказ</a>' . '<a><img src="pics/glyphs/pocket.png" width=20px heiht=20px></a>' . '</div>';
require_once 'functions.php';
$cart = new smallCart();
$cart->load();
if (isset($_GET['clear'])) {
    unset($_SESSION['current_order']);
    header('location:' . $_SERVER['HTTP_REFERER']);
}
if (isset($_GET['increase'])) {
    require_once 'functions.php';
    $cart = new smallCart();
    $cart->increase($_GET['increase']);
    header('location:' . $_SERVER['HTTP_REFERER']);
}
if (isset($_GET['decrease'])) {
    require_once 'functions.php';
    $cart = new smallCart();
    $cart->decrease($_GET['decrease']);
    header('location:' . $_SERVER['HTTP_REFERER']);
}
if (isset($_GET['delete'])) {
    require_once 'functions.php';
    $cart = new smallCart();
    $cart->delete($_GET['delete']);
    header('location:' . $_SERVER['HTTP_REFERER']);
}
Exemplo n.º 3
0
        <div class="container">
            <div id="confirmation">
            </div>
        </div>
        <div class="container">
            <div class="row">
                <div class="col-lg-9 col-md-9 col-sm-12 col-xs-12">
                      <!--плитка здесь-->
                        <?php 
$items = new Items();
$items->loadGrid();
?>
                </div>
                <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
                   <div class="small_cart">
                        <!--корзина здесь--> <a id="your_order_label">Ваш заказ</a>
                        <i class="fa fa-cart-plus"></i>                    
                            <?php 
$cart = new smallCart();
$cart->load();
?>
                    </div>
                </div>
            </div>
        </div>    
        <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
        <!-- Include all compiled plugins (below), or include individual files as needed -->
        <script src="js/bootstrap.js"></script>
    </body>
</html>