Wocart

@wocart/storefront v3.1.0


@wocart/storefront / index / getProductView

Function: getProductView()

getProductView(product): ProductView

Parameters

product

category?

{ createdAt: string; description?: string; id: string; image?: { height?: number; key: string; url: string; width?: number; }; metaDescription?: string; metaKeywords?: string; metaTitle?: string; name: string; parentId?: string; position: number; slug: string; updatedAt: string; }

category.createdAt

string

category.description?

string

category.id

string

category.image?

{ height?: number; key: string; url: string; width?: number; }

category.image.height?

number

category.image.key

string

category.image.url

string

category.image.width?

number

category.metaDescription?

string

category.metaKeywords?

string

category.metaTitle?

string

category.name

string

category.parentId?

string

category.position

number

category.slug

string

category.updatedAt

string

categoryId?

string

compareAtPrice?

number

currency

string

description?

string

descriptionFormat

"html" | "text"

descriptionPlain?

string

handle

string

hasVariants

boolean

id

string

images

object[]

inventory

number

lowStockThreshold

number

metaDescription?

string

metaTitle?

string

name

string

offers

object[]

price

number

quantityPricing?

{ name: string; offerId: string; tiers: object[]; triggerVariantId?: string; }

quantityPricing.name

string

quantityPricing.offerId

string

quantityPricing.tiers

object[]

quantityPricing.triggerVariantId?

string

reviewStats?

{ avgRating: number; reviewCount: number; }

reviewStats.avgRating

number

reviewStats.reviewCount

number

sku?

string

tags

string[]

trackInventory

boolean

type

"DIGITAL" | "PHYSICAL"

variantOptions?

object[]

variants

object[]

Returns

ProductView