开发者

DB schema help, linking variations of products

开发者 https://www.devze.com 2022-12-16 13:29 出处:网络
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 opti

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

精彩评论

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

关注公众号