Exemplo n.º 1
0
<?php

include '../model/mCart.php';
include '../model/mCategory.php';
include '../model/mProductLister.php';
if (mCart::is_empty()) {
    $cart_count = 0;
} else {
    $cart_count = mCart::get_cart_products_number();
}
$categories = mCategory::get_categories($_GET['c']);
$products = mProductLister::get_category_list($_GET['c']);
$cat_name = mCategory::get_category($_GET['c']);
$shortcut = mCategory::get_shortcut($_GET['c']);
Exemplo n.º 2
0
<?php

include '../model/mCart.php';
include '../model/mCategory.php';
include '../model/mProductLister.php';
if (isset($_POST['added'])) {
    mCart::add_to_cart($_POST['product_id'], $_POST['name'], $_POST['quantity'], $_POST['price']);
    /*
    echo '<pre>';
    print_r($_POST);
    print_r($_SESSION);
    echo '</pre>';
    */
}
if (mCart::is_empty()) {
    $cart_count = 0;
} else {
    $cart_count = mCart::get_cart_products_number();
}
$categories = mCategory::get_categories(0);
$products = mProductLister::get_product($_GET['p']);