1
This commit is contained in:
@@ -431,7 +431,7 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
|
||||
if isNeedUpdatePrice {
|
||||
skus[0]["price"] = foodData["price"]
|
||||
}
|
||||
skus[0]["stock"] = stockCount2Mtwm(model.MaxStoreSkuStockQty)
|
||||
skus[0]["stock"] = stockCount2Mtwm(storeSku.Stock)
|
||||
if storeSku.Upc != "" {
|
||||
skus[0]["upc"] = storeSku.Upc
|
||||
}
|
||||
@@ -606,6 +606,9 @@ func SwitchAttr(apiObj *mtwmapi.API, vendorStoreID string, vendorCatID int64, na
|
||||
}
|
||||
|
||||
func stockCount2Mtwm(stock int) (mtwmStock string) {
|
||||
if stock == 0 {
|
||||
stock = model.MaxStoreSkuStockQty
|
||||
}
|
||||
return utils.Int2Str(stock)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user