GitHub

ShopifyProductVariant

interface

import { ShopifyProductVariant } from '@daffodil/driver/shopify'

A product variant represents a different version of a product, such as differing sizes or differing colors.

interface ShopifyProductVariant {
  __typename: "ProductVariant"
  availableForSale: boolean
  barcode: string
  compareAtPrice: ShopifyMoneyV2
  compareAtPriceV2: ShopifyMoneyV2
  currentlyNotInStock: boolean
  id: string
  image: ShopifyImage
  metafield: ShopifyMetafield
  metafields: ShopifyMetafield[]
  price: ShopifyMoneyV2
  priceV2: ShopifyMoneyV2
  product: ShopifyProduct
  quantityAvailable: number
  quantityPriceBreaks: ShopifyQuantityPriceBreakConnection
  quantityRule: ShopifyQuantityRule
  requiresShipping: boolean
  selectedOptions: ShopifySelectedOption[]
  sellingPlanAllocations: ShopifySellingPlanAllocationConnection
  sku: string
  storeAvailability: ShopifyStoreAvailabilityConnection
  taxable: boolean
  title: string
  unitPrice: ShopifyMoneyV2
  unitPriceMeasurement: ShopifyUnitPriceMeasurement
  weight: number
  weightUnit: ShopifyWeightUnit
}

Properties

__typename
"ProductVariant"
availableForSale
boolean

Indicates if the product variant is available for sale.

barcode
string

The barcode (for example, ISBN, UPC, or GTIN) associated with the variant.

compareAtPrice
ShopifyMoneyV2

The compare at price of the variant. This can be used to mark a variant as on sale, when compareAtPrice is higher than price.

compareAtPriceV2
ShopifyMoneyV2

The compare at price of the variant. This can be used to mark a variant as on sale, when compareAtPriceV2 is higher than priceV2.

currentlyNotInStock
boolean

Whether a product is out of stock but still available for purchase (used for backorders).

id
string

A globally-unique ID.

image
ShopifyImage

Image associated with the product variant. This field falls back to the product image if no image is available.

metafield
ShopifyMetafield

A custom field, including its namespace and key, that's associated with a Shopify resource for the purposes of adding and storing additional information.

metafields
ShopifyMetafield[]

A list of custom fields that a merchant associates with a Shopify resource.

price
ShopifyMoneyV2

The product variant’s price.

priceV2
ShopifyMoneyV2

The product variant’s price.

product
ShopifyProduct

The product object that the product variant belongs to.

quantityAvailable
number

The total sellable quantity of the variant for online sales channels.

quantityPriceBreaks
ShopifyQuantityPriceBreakConnection

A list of quantity breaks for the product variant.

quantityRule
ShopifyQuantityRule

The quantity rule for the product variant in a given context.

requiresShipping
boolean

Whether a customer needs to provide a shipping address when placing an order for the product variant.

selectedOptions
ShopifySelectedOption[]

List of product options applied to the variant.

sellingPlanAllocations
ShopifySellingPlanAllocationConnection

Represents an association between a variant and a selling plan. Selling plan allocations describe which selling plans are available for each variant, and what their impact is on pricing.

sku
string

The SKU (stock keeping unit) associated with the variant.

storeAvailability
ShopifyStoreAvailabilityConnection

The in-store pickup availability of this variant by location.

taxable
boolean

Whether tax is charged when the product variant is sold.

title
string

The product variant’s title.

unitPrice
ShopifyMoneyV2

The unit price value for the variant based on the variant's measurement.

unitPriceMeasurement
ShopifyUnitPriceMeasurement

The unit price measurement for the variant.

weight
number

The weight of the product variant in the unit system specified with weight_unit.

weightUnit
ShopifyWeightUnit

Unit of measurement for weight.