I need to design an online 'PC builder/customiser' similar to the one on the Dell website which allows users to customise their PCs before buying it. I've checked on the net for some scripts with similar functions but they don't seem as good as the Dell one! SO, I have decided to code my own in PHP/MySQL. BUT, i'm not sure on how to design it. This is the idea i have @ the moment: the page pulls the PCs components e.g. hard drive, memory, processor from a table and then displays them in separate drop down lists. When the user selects for example a 120GB hard drive from the menu, it updates the price displayed on the page. BUT, it also will need to detect imcompatible component configurations like attempting to buy an P4 motherboard with an AMD processor...Ideas anyone?
which will allow your program to display products in a tree structure.
But if you're going down a 'wizard' style route where the various products are chosen in a specific sequence (e.g. processor then motherboard) then a hierarchy wouldn't be needed, just a more specific set of categories, then just use a query to select the appropriate motherboards after the processor has been chosen, e.g. if an AMD processor is selected (excuse the rusty SQL):
SELECT * FROM product, category
WHERE product.category = category.category_id
AND category.category_name = 'AMD Motherboard';
Those weren't supposed to be part of the table. I was just listening different categories, sorry!