weight fix

This commit is contained in:
merdan 2023-05-03 15:26:04 +05:00
parent e8910eca48
commit 10c250695a
1 changed files with 2 additions and 2 deletions

View File

@ -208,7 +208,7 @@ func CreateJSONFromModel(model models.TrendyolProductDetailModel) map[string]int
json := map[string]interface{}{}
// get weight from categories (Stored in helper array (RAM))
weight := helper.GetCategoryWeight(model.Category.BeautifiedName)
//weight := helper.GetCategoryWeight(model.Category.BeautifiedName)
productGroupId := strconv.Itoa(model.ProductGroupID)
json["_id"] = productGroupId
@ -220,7 +220,7 @@ func CreateJSONFromModel(model models.TrendyolProductDetailModel) map[string]int
json["name"] = model.Name
json["sellable"] = model.IsSellable
json["favorite_count"] = model.FavoriteCount
json["weight"] = weight
json["weight"] = 0
json["name_with_product_code"] = model.NameWithProductCode
json["url_key"] = "https://www.trendyol.com" + model.URL
json["images"] = model.Images