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