Location: PHPKode > scripts > Faucart > faucart/readme.txt
### Very small and lightweight e-commerce cart ###
### by Fausto Iannuzzi - 2005 ###

################################################
#
# Faucart Library
#
# by Fausto Iannuzzi - 2005 - free to use
#
# for any question please write to hide@address.com
#
################################################

A very short description
------------------------

FauCart is a free PHP shopping cart class for your ecommerce web site. 
It can be the main component of your PHP based online store. 
It's designed in PHP 4 in a very simple way. 
Developers may find it very simple to implement in their source code. 

The use of faucart is very simple. 

Instructions
------------

First of all, you have to include the main class inside your source code:

	require_once "faucart.lib.php";

then is possibile to add your item to our new shopping cart 

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

if you want to delete an element from chart:

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

after that you can also change the quantity of a product 

	$cart_object->updateQuantity($element,3);

or calculate the total cost 

	$cart_object->total();

or simply delete all items: 

	$cart_object->emptyCart();

if you want your cart is session persistent, you have to start your session with the php functions "session_start", before including faucart.lib.php

	session_start(); 
	require_once "faucart.lib.php";

and then if you want to save to session your updated shopping cart, you have to call the fuction:

	toSession();

at the end of your php page. 

NOTE
----

Please run demo files to see faucart in action.

CONTACTS
--------

For any question please write to hide@address.com
Return current item: Faucart