unset shopify properties if search fails
This commit is contained in:
@ -68,6 +68,10 @@ export function columnOnEditHandler(e: GoogleAppsScript.Events.SheetsOnEdit) {
|
|||||||
toastAndLog(updateString)
|
toastAndLog(updateString)
|
||||||
updateProductToShopify(row)
|
updateProductToShopify(row)
|
||||||
break
|
break
|
||||||
|
case "compare_at_price":
|
||||||
|
toastAndLog(updateString)
|
||||||
|
updateProductToShopify(row)
|
||||||
|
break
|
||||||
default:
|
default:
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|||||||
@ -83,6 +83,12 @@ export class Product {
|
|||||||
let product = shop.GetProductBySku(this.sku)
|
let product = shop.GetProductBySku(this.sku)
|
||||||
if (product == undefined || product.id == undefined || product.id == "") {
|
if (product == undefined || product.id == undefined || product.id == "") {
|
||||||
console.log("MatchToShopifyProduct: no product matched")
|
console.log("MatchToShopifyProduct: no product matched")
|
||||||
|
this.shopify_id = ""
|
||||||
|
this.shopify_product = {} as shopify.Product
|
||||||
|
this.shopify_default_variant_id = ""
|
||||||
|
this.shopify_default_option_id = ""
|
||||||
|
this.shopify_default_option_value_id = ""
|
||||||
|
this.shopify_status = ""
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.shopify_product = product
|
this.shopify_product = product
|
||||||
|
|||||||
Reference in New Issue
Block a user