add Shopify category to product
This commit is contained in:
@ -115,13 +115,11 @@ export class Product {
|
||||
}
|
||||
|
||||
ShopifyCategory(): string {
|
||||
return vlookupByColumns("values", "product_type", this.category, "shopify_category")
|
||||
return vlookupByColumns("values", "product_type", this.product_type, "shopify_category")
|
||||
}
|
||||
|
||||
ToShopifyProductSet() {
|
||||
let sps = new ShopifyProductSetInput()
|
||||
//TODO: map category IDs
|
||||
//sps.category = this.category
|
||||
if (this.shopify_id != "") {
|
||||
sps.id = this.shopify_id
|
||||
}
|
||||
@ -129,7 +127,10 @@ export class Product {
|
||||
sps.status = this.shopify_status
|
||||
}
|
||||
sps.productType = this.product_type
|
||||
let category = this.ShopifyCategory()
|
||||
if (category !== "") {
|
||||
sps.category = this.ShopifyCategory()
|
||||
}
|
||||
sps.tags = this.tags
|
||||
sps.title = this.title
|
||||
sps.descriptionHtml = this.description
|
||||
|
||||
Reference in New Issue
Block a user