0

I am confused about the size and color options in ecommerce products table./ You might have seen options in clothing e commerce website when we go to add to cart option for any cloth e.g shirt it asks for size and color and show results simultaneously if that size or color is available or not.

How can i achive this? I have a product table having common fields like id, name, image, category id, subcategory id, details etc... Should size and color be in it ?

Problem is that if sizes can vary in units as well like for clothes its usually M,L,XL but what if a customer went to a TV page it should have inches there...

I hope i've described it clear

Please provide some good opinion

Thanks

4

2 回答 2

1

这么理解——

  1. 产品是列出但未售出的东西。
  2. 产品具有属性。
  3. 选择所有属性后,您将其出售并称为 SKU,即 Stock Keeping Unit。

例如:Levis Jeans 是一种产品。腰围、长度、颜色、针迹是属性。Levis 牛仔裤,W32,L34,蓝色,常规版型是 SKU。

这些都存储在不同的表中,并基于键相关。

再会!享受您的电子商务设计体验。

加内什

于 2013-09-20T04:13:51.080 回答
1

我想你会有这样的东西(星号中的PK)

Products ( *ProductId, Name, Description )
Skus ( ProductId, *SkuId, Name )
Options ( *OptionId, Name, Value )
SkuOptions ( *SkuId, OptionId )

Categories(如果您认为需要,还有一个可选表)

这就是数据的样子:

产品

1, 'Sharp Aquous TV', 'LED backlit TV in a variety of sizes'
2, 'Sony Bravia TV', 'LED backlit TV in a single size'

选项

1, 'Size', '60 inches'
2, 'Size', '70 inches'
3, 'Size', '80 inches'
4, 'Colour', 'Black'
5, 'Colour', 'Silver'

货号

1, 'LC-60LE857U', 'Sharp Aquous 60 inches'
1, 'LC-70LE857U', 'Sharp Aquous 70 inches'
1, 'LC-80LE857U', 'Sharp Aquous 80 inches'
2, 'KDL-70R550A', 'Sony Bravia 70 inches'

SkuOptions

'LC-60LE857U', 1
'LC-60LE857U', 4
'LC-70LE857U', 2
'LC-70LE857U', 4
'LC-80LE857U', 3
'LC-80LE857U', 4
'KDL-70R550A', 2
'KDL-70R550A', 5

查询此数据是留给读者的练习 :)

于 2013-09-20T04:03:44.643 回答