I am producing a shopping cart system for a friends gallery web site. I have produced a class for products so when the user adds a product it will create a new class from the data about that product. That class then needs to be set as session data. How do I allow multiple classes to added to an order?
Do I need a order class? Is there such thing as a class of classes (oder class of product classes)? Or do I need an array of product classes.
So here is the class so far:
Any advice would be greatly apprecited here.
Thanks
Do I need a order class? Is there such thing as a class of classes (oder class of product classes)? Or do I need an array of product classes.
So here is the class so far:
PHP Code:
<?PHP
Class item_class{
// a class to add the items to session
var $cat; //category of picture
var $subcat; // sub category of picture
var $product; //product identifier
var $title; //title of artwork
var $pic_cat; //legend for category and sub cat
var $frame; // the frame style
var $dims; //dimesions of product
var $price; //price fo product
var $img_link; //link to the gallery image
var $txt_link; //link to the gallery description text file
function add_to_order(){
//add whole product to the order
}
function add_frame(){
// add the picture frame part to a customisable commision order
}
function add_picture(){
// add the picture part to a customisable commision order
}
}
?>
Thanks
Comment