kategoria tekst
This commit is contained in:
parent
f445740f4a
commit
f751ae301a
|
|
@ -329,9 +329,6 @@ func ImportProduct(product models.Product, db *gorm.DB) error {
|
|||
return errProductMainFlat
|
||||
}
|
||||
|
||||
tx.Rollback()
|
||||
return nil
|
||||
|
||||
if len(product.ColorVariants) > 0 {
|
||||
product.ColorVariants = append([]models.Product{product}, product.ColorVariants...)
|
||||
|
||||
|
|
@ -345,11 +342,15 @@ func ImportProduct(product models.Product, db *gorm.DB) error {
|
|||
colorOption := gm.GetAttributeOption(db, AttributesMap["color"].ID, colorVariant.Color)
|
||||
|
||||
colorSavePoint := "ColorSavePoint" + string(colorIndex)
|
||||
|
||||
if len(colorVariant.SizeVariants) > 0 {
|
||||
|
||||
for index, sizeVariant := range colorVariant.SizeVariants {
|
||||
|
||||
savePoint := "Size" + string(colorIndex) + "sp" + string(index)
|
||||
|
||||
log.Println(savePoint)
|
||||
|
||||
tx.SavePoint(savePoint)
|
||||
|
||||
sku := fmt.Sprintf("%s-%s-%d-col-size", colorVariant.ProductGroupID, colorVariant.ProductNumber, sizeVariant.ItemNumber)
|
||||
|
|
|
|||
Loading…
Reference in New Issue