tags:

views:

23

answers:

1

Hay all, I'm making a website where a product can come in a variety of colours and sizes. Each item has a different 'item_code'. How could i link these together? I could have an option, so that when an admin adds a new product, it askes if this product is a variation of another product. If it is then finds ALL the linked products and all the ID's inside another table (like 'product_variations').

Any help or tips would be awesome.

Thanks

+2  A: 

a simple form would be something like:

Products:
--id
--name
--code
--price


Products_Variants:
--id
--id_product
--id_feature
--value


Features:
--id
--name

In features you would have things like color, size etc.

solomongaby
+1 Nicely normalized.
sleske