ready link import fx 1
This commit is contained in:
parent
e75815f183
commit
c664fecdef
|
|
@ -18,7 +18,6 @@ func ParseLink(w http.ResponseWriter, route *http.Request) {
|
|||
|
||||
linkParser := repositories.NewLinkParser(link)
|
||||
|
||||
//todo
|
||||
product, err := linkParser.ParseLink()
|
||||
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -409,7 +409,7 @@ func (importer *Importer) GetSexOption(optionName string) gm.AttributeOption {
|
|||
func (importer *Importer) updateVariant(product models.Product) (*gm.Product, error) {
|
||||
|
||||
var flat gm.ProductFlat
|
||||
err := importer.baza.Preload("Product", "Variants").First(&flat, "sku = ?", product.ProductNumber).Error
|
||||
err := importer.baza.Preload("Product").Preload("Variants").First(&flat, "sku = ?", product.ProductNumber).Error
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,6 +91,7 @@ func (pr *ProductRepo) makeProduct(imp *Importer) gm.Product {
|
|||
product.SuperAttributes = []gm.Attribute{imp.AttributesMap["size"]}
|
||||
} else {
|
||||
product.SuperAttributes = []gm.Attribute{imp.AttributesMap["boyut"]}
|
||||
product.AttributeFamilyID = 4 // todo fix hardcode
|
||||
}
|
||||
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue