|
|
@@ -312,8 +312,8 @@ func (self *ProductController) GetProductSizesByPid() {
|
|
|
if item.SizeType == product_model.SIZE_TYPE_1 {
|
|
|
attrList := product_model.GetProductAttrsByKId(productKeyConfig.Id)
|
|
|
for _, attr := range attrList {
|
|
|
- prod := product_model.GetProductByIdAndSizeId(product.RelateProductId, attr.Id, false)
|
|
|
- if prod != nil {
|
|
|
+ prodSize := product_model.GetProductByIdAndSizeId(product.RelateProductId, attr.Id, false)
|
|
|
+ if prodSize != nil {
|
|
|
size := &product_model.ProductAttr{}
|
|
|
size.Id = attr.Id
|
|
|
beego.BeeLogger.Warn("size_id --- %d", size.Id)
|
|
|
@@ -326,8 +326,8 @@ func (self *ProductController) GetProductSizesByPid() {
|
|
|
if item.SizeType == product_model.SIZE_TYPE_2 {
|
|
|
attrList := product_model.GetProductAttrsByKId(productKeyConfig.Id)
|
|
|
for _, attr := range attrList {
|
|
|
- prod := product_model.GetProductByIdAndColorId(product.RelateProductId, attr.Id, false)
|
|
|
- if prod != nil {
|
|
|
+ prodColor := product_model.GetProductByIdAndColorId(product.RelateProductId, attr.Id, false)
|
|
|
+ if prodColor != nil {
|
|
|
size := &product_model.ProductAttr{}
|
|
|
size.Id = attr.Id
|
|
|
beego.BeeLogger.Warn("color_id --- %d", size.Id)
|