Compare commits
3 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
1313849847 | |
|
|
9b6a83d866 | |
|
|
3aa44579ab |
|
|
@ -124,6 +124,7 @@ func GetProductDetails(productId string) (models.TrendyolProductDetailModel, err
|
||||||
productDetailModel = response.Result
|
productDetailModel = response.Result
|
||||||
|
|
||||||
return productDetailModel, nil
|
return productDetailModel, nil
|
||||||
|
//test
|
||||||
}
|
}
|
||||||
|
|
||||||
// getProductDetailWithOptions returns JSON with variants
|
// getProductDetailWithOptions returns JSON with variants
|
||||||
|
|
@ -208,7 +209,7 @@ func CreateJSONFromModel(model models.TrendyolProductDetailModel) map[string]int
|
||||||
json := map[string]interface{}{}
|
json := map[string]interface{}{}
|
||||||
|
|
||||||
// get weight from categories (Stored in helper array (RAM))
|
// 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)
|
productGroupId := strconv.Itoa(model.ProductGroupID)
|
||||||
|
|
||||||
json["_id"] = productGroupId
|
json["_id"] = productGroupId
|
||||||
|
|
@ -220,7 +221,7 @@ func CreateJSONFromModel(model models.TrendyolProductDetailModel) map[string]int
|
||||||
json["name"] = model.Name
|
json["name"] = model.Name
|
||||||
json["sellable"] = model.IsSellable
|
json["sellable"] = model.IsSellable
|
||||||
json["favorite_count"] = model.FavoriteCount
|
json["favorite_count"] = model.FavoriteCount
|
||||||
json["weight"] = weight
|
//json["weight"] = weight
|
||||||
json["name_with_product_code"] = model.NameWithProductCode
|
json["name_with_product_code"] = model.NameWithProductCode
|
||||||
json["url_key"] = "https://www.trendyol.com" + model.URL
|
json["url_key"] = "https://www.trendyol.com" + model.URL
|
||||||
json["images"] = model.Images
|
json["images"] = model.Images
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue