variant test

This commit is contained in:
merdan 2023-05-03 18:59:34 +05:00
parent 10c250695a
commit 4201c053fb
1 changed files with 46 additions and 46 deletions

View File

@ -291,6 +291,8 @@ func CreateJSONFromModel(model models.TrendyolProductDetailModel) map[string]int
}
}
}
// NOTE: Modified here
if len(variants) > 0 {
for i := 0; i < len(model.AllVariants); i++ {
singleVariant := model.AllVariants[i]
@ -342,8 +344,6 @@ func CreateJSONFromModel(model models.TrendyolProductDetailModel) map[string]int
for i := 0; i < len(model.AlternativeVariants); i++ {
alternativeVariant := model.AlternativeVariants[i]
if len(variants) > 0 {
// get the first variant for attribute info
fv := variants[0]