marketplace product id
This commit is contained in:
parent
41a3552a97
commit
9fcd76a3db
|
|
@ -589,13 +589,19 @@ func ImportProduct(product models.Product, db *gorm.DB) error {
|
|||
}
|
||||
|
||||
func createSellerProduct(flat *gm.ProductFlat, sellerURL string) gm.MarketplaceProduct {
|
||||
sellerID := sellers[sellerURL].ID
|
||||
|
||||
if sellerID == 0 {
|
||||
sellerID = 1
|
||||
}
|
||||
|
||||
sellerProduct := gm.MarketplaceProduct{
|
||||
MarketplaceSeller: sellers[sellerURL],
|
||||
IsApproved: true,
|
||||
Condition: "new",
|
||||
Description: "scraped",
|
||||
IsOwner: true,
|
||||
ProductID: flat.ProductID,
|
||||
MarketplaceSellerID: sellerID,
|
||||
IsApproved: true,
|
||||
Condition: "new",
|
||||
Description: "scraped",
|
||||
IsOwner: true,
|
||||
ProductID: flat.ProductID,
|
||||
}
|
||||
|
||||
for _, variant := range flat.Variants {
|
||||
|
|
|
|||
Loading…
Reference in New Issue