Page 1 of 1

shopping cart

Posted: Sun Dec 16, 2007 8:38 pm
by thatsme
I want to make a simple shopping cart using oop.

The table structure is:

category
cat_id
cat_name

sub_category
sub_cat_id
cat_id
sub_cat_name


product
sub_cat_id
product_id
product_name
product_qty
product_price
product_image


size
size_id
size_name

member
member_id
member_name
member_name
member_country
member_state
member_city
member_zip
member_address

cart
cart_id
product_id
size_id
qty


order
member_id
order_status
order_date


As this is the first attempt in OOP, i am not sure which method should go to which class?

Posted: Sun Dec 16, 2007 10:46 pm
by feyd
Define your classes, then we may be able to help further.

Posted: Sun Dec 16, 2007 10:48 pm
by s.dot
I'm no OOP expert (in fact, just beginning)

I'd start with a base class with a method to addItem()

Posted: Sat Dec 22, 2007 8:28 pm
by thatsme
Class category
{
function addCat($cat_id)
{
//add or edit depending of the existence of cat_id

}

function delCat($cat_id)
{


}

function listCat()
{


}

}

same pattern repeats for sub_category, product, size, member

This is how i am planning to start