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