开发者

DB schema help, linking variations of products

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 coul开发者_高级运维d 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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜