Compare commits

...

3 Commits

Author SHA1 Message Date
merdan 1313849847 weight removed 2024-01-23 16:44:00 +05:00
merdan 9b6a83d866 Merge branch 'parse' 2023-09-22 18:19:27 +05:00
merdan 3aa44579ab debug detail2 2023-09-22 18:18:37 +05:00
1 changed files with 3 additions and 2 deletions

View File

@ -124,6 +124,7 @@ func GetProductDetails(productId string) (models.TrendyolProductDetailModel, err
productDetailModel = response.Result
return productDetailModel, nil
//test
}
// getProductDetailWithOptions returns JSON with variants
@ -208,7 +209,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 +221,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"] = weight
json["name_with_product_code"] = model.NameWithProductCode
json["url_key"] = "https://www.trendyol.com" + model.URL
json["images"] = model.Images