Shopping Cart Application using OOP

Wahey, my first slice of object-oriented PHP actually works! This shopping cart class contains all the functions for adding, updating and deleting items from the cart, including inventory checks. First I needed to ensure my database was practical, efficient (normalise that redundancy!) and easy to expand. I am happy with the table relationships (shown below in Access format) but I'm sure they could be improved. Incidentally the customers table now contains their Email address and an encrypted password.

Shopping Cart Table Relationships

The basic cart application can be found here. Forgive my ugly abuse of tables and clunky forms, but this project is all about the PHP/MySQL not the presentation. Next I need to add some admin forms to examine orders, update stock etc. and also include some product images with thumbnails. But do I store the images themselves, or only their URLs, in the database?

© 29-08-2008 Frugi