For the last couple of months (on and off) I have been working on building a shop for one of my previous employers.
The shop is an upgraded version of the e-commerce application that I developed whilst I worked with them. I made several amends to the system but the main one was the extension of the product system, different sections needed to display products in completely different ways, examples can be seen here
To do this I added ‘product types’, that way the base product class can be extended whenever required and the developer just chooses what methods of the core class they would like to override.
As a simple example, the default price for a simple product is taken from the products table, in the case of the blinds products though there is no such thing as a default price, the price depends on both the width and drop, in this case the ‘get_price’ method was simply extended to calculate the price based on the users input.
An unpopulated version of the system can been seen here http://pole.g3d-development.com