Location: PHPKode > scripts > Faucart > faucart/faucart_demo1.php
<?
session_start();

require_once "faucart.lib.php";

$cart_object->addItem(new faucartelement("Tower Computer","Very big computer",1240.12));
$cart_object->addItem(new faucartelement("Chicken","chicken on the grill",5));

$element = new faucartelement("Compact disc player","supporting both dvds and cds",45);
$cart_object->addItem($element);
$cart_object->updateQuantity($element,3);
$cart_object->updateQuantity($element,-1);
$cart_object->delItem($element);
$cart_object->total();

echo $cart_object->_total;
$cart_object->emptyCart();

toSession();
#var_dump($_SESSION);
?>
Return current item: Faucart