include shopify_status

This commit is contained in:
Ben Miller
2024-11-16 05:13:47 -07:00
parent 6dd205dcbb
commit 69ec8b8cdd

View File

@ -9,6 +9,7 @@ import {
ShopifyProductSetQuery,
VariantOptionValueInput,
} from "./shopifyApi"
import * as shopify from 'shopify-admin-api-typings'
import { getCellRangeByColumnName, getRowByColumnValue } from "./sheetUtils"
export class Product {
@ -27,9 +28,10 @@ export class Product {
weight_grams: number = 0
photos: string = ""
shopify_product: ShopifyProduct
shopify_default_variant_id: string
shopify_default_option_id: string
shopify_default_option_value_id: string
shopify_default_variant_id: string = ""
shopify_default_option_id: string = ""
shopify_default_option_value_id: string = ""
shopify_status: string = ""
constructor(sku: string = "") {
if (sku == "") {
@ -127,6 +129,9 @@ export class Product {
//TODO: map category IDs
//sps.category = this.category
sps.id = this.shopify_id
if (this.shopify_status.match('DRAFT|ACTIVE|ARCHIVED')) {
sps.status = this.shopify_status
}
sps.productType = this.product_type
sps.tags = this.tags
sps.title = this.title