商品sku數量怎麼改?1、SKU:庫存量單位SKU(Stock Keeping Unit)是指商品庫存量的最小單位如果一個商品有多個型号、顔色、版本等多種維度時,可以通過設置SKU屬性來細分,倉管可以根據SKU來盤點庫存數量,我來為大家講解一下關于商品sku數量怎麼改?跟着小編一起來看一看吧!
1、SKU:庫存量單位
SKU(Stock Keeping Unit)是指商品庫存量的最小單位。如果一個商品有多個型号、顔色、版本等多種維度時,可以通過設置SKU屬性來細分,倉管可以根據SKU來盤點庫存數量。
比如:一款球鞋,有顔色和碼數兩個維度;顔色有白色、紅色和黑色,碼數有38碼、...、43碼等,根據維度生成相應的笛卡爾積(SKU組合),總共有3*6=18個SKU組合。在編輯商品SKU數據時,就需要對這18個組合的圖片、庫存編碼、價格、數量進行完善。
2、SKU數據庫設計
屬性組表:ben_attribute_class
id:自增主鍵
prouct_class_id:商品分類ID
product_id:商品ID(null:公用的屬性組;>0:某個商品的自定義屬性組)
class_name:SKU屬性組名稱
attribute_count:SKU屬性項數量
order_id:排序ID
屬性項表:ben_attribute_item
id:自增主鍵
attribute_class_id:SKU屬性組ID
item_name:SKU屬性項名稱
img_url:圖片url
order_id:排序ID
屬性項更新表:ben_attribute_update
某個商品,對共用屬性項的更新調整
id:自增主鍵
product_id:商品ID
attribute_class_id:SKU屬性組ID
attribute_item_id:SKU屬性項ID
attribute_name:屬性項名稱(編輯更新的值)
img_url:圖片url
商品SKU庫存表:ben_product_stock
id:自增主鍵
product_id:商品ID
attribute_class_id1:一級SKU屬性組ID
attribute_id1:一級SKU屬性項ID
attribute_class_id2:二級SKU屬性組ID
attribute_id2:二級SKU屬性項ID
attribute_class_id3:三級SKU屬性組ID
attribute_id3:三級SKU屬性項ID
stock_code:庫存編碼
price:銷售價格
stock_count:庫存數量
img_url:圖片
商品SKU庫存變化日志表:ben_product_stock_log
id:自增主鍵
product_id:商品ID
stock_id:商品SKU ID
start_count:開始數量
end_count:結束數量
change_count:調整的數量
order_id:關聯的訂單ID
order_detail_id:關聯的訂單詳情ID
商品表:ben_product
id:自增主鍵
class_id:商品分類
product_name:商品名稱
product_code:商品編碼
sku_attribute:商品SKU屬性,商品有SKU時,存放組成成的SKU屬性值,方便前端展示
stock_count:庫存數量
price:銷售價格
sku_attribute的值:
[{
"id": 34,
"className": "顔色",
"attributes": [{
"productId": 2558,
"attributeClassId": 34,
"attributeItemId": 99,
"attributeName": "紅色",
"imgUrl": null
}, {
"productId": 2558,
"attributeClassId": 34,
"attributeItemId": 98,
"attributeName": "白色",
"imgUrl": null
}]
}]
更多精彩资讯请关注tft每日頭條,我们将持续为您更新最新资讯!