you don't need classes for implementing a shopping cart.
store the item id and quantity in an array - you've already done that, I think. serialize the array -> session_register it -> session_unregister it.
if you want wo delete/modify the data, modify the array and session_register it again.
if the article ids in the array are the same ids you have in your products table, you can simply generate an sql query like this.
say:
$cart[0]['id_product'] == 12
$cart[0]['quantity'] == 2
$cart[1]['id_product'] == 34
$cart[1]['quantity'] == 1
(...)
in order to create a list of the items in cart:
for($i=0; $i<count($cart); $i++)
{
$sql = "select name,price from product where id=".$cart[$i]['id_product'];
// now do the query
// and display the row for the item
// calculate the price := database price per unit * $cart[$i]['quantity']
}
I hope that gets you along.