|
|
@@ -304,6 +304,7 @@ func (self *ProductController) GetProductSizesByPid() {
|
|
|
if product != nil {
|
|
|
list := product_model.GetProductConfigAttrsByPId(pId)
|
|
|
for _, item := range list {
|
|
|
+ attrTypeList := []*product_model.ProductAttr{}
|
|
|
productKeyConfig := product_model.GetProductAttrKey(item.AttrKeyId)
|
|
|
if productKeyConfig != nil {
|
|
|
if item.SizeType == product_model.SIZE_TYPE_1 {
|
|
|
@@ -313,8 +314,9 @@ func (self *ProductController) GetProductSizesByPid() {
|
|
|
if prod == nil {
|
|
|
continue
|
|
|
}
|
|
|
- productKeyConfig.ProductAttr = append(productKeyConfig.ProductAttr, attr)
|
|
|
+ attrTypeList = append(attrTypeList, attr)
|
|
|
}
|
|
|
+ productKeyConfig.ProductAttr = attrTypeList
|
|
|
ret.Size = productKeyConfig
|
|
|
}
|
|
|
if item.SizeType == product_model.SIZE_TYPE_2 {
|
|
|
@@ -324,8 +326,9 @@ func (self *ProductController) GetProductSizesByPid() {
|
|
|
if prod == nil {
|
|
|
continue
|
|
|
}
|
|
|
- productKeyConfig.ProductAttr = append(productKeyConfig.ProductAttr, attr)
|
|
|
+ attrTypeList = append(attrTypeList, attr)
|
|
|
}
|
|
|
+ productKeyConfig.ProductAttr = attrTypeList
|
|
|
ret.Color = productKeyConfig
|
|
|
}
|
|
|
}
|