Interface: UseProductInfoReturn
Defined in: composables/react/useProductInfo.ts:61
State and fetch actions returned by useProductInfo.
Properties
cluster
cluster:
Cluster|null
Defined in: composables/react/useProductInfo.ts:65
The fetched cluster, or null.
clusterImageUrl
clusterImageUrl:
string
Defined in: composables/react/useProductInfo.ts:82
First image URL of the cluster's default product, or ''.
clusterName
clusterName:
string
Defined in: composables/react/useProductInfo.ts:76
Cluster name, falling back to the default product's name.
clusterPrice
clusterPrice:
number|null
Defined in: composables/react/useProductInfo.ts:80
Cluster gross price taken from the default product, or null.
clusterSku
clusterSku:
string
Defined in: composables/react/useProductInfo.ts:78
Cluster SKU, falling back to the default product's SKU.
error
error:
string|null
Defined in: composables/react/useProductInfo.ts:69
Last error message, or null.
fetchCluster
fetchCluster: (
clusterId,imageSearchFilters?,imageVariantFilters?) =>Promise<void>
Defined in: composables/react/useProductInfo.ts:73
Fetches a cluster by id, optionally overriding the image filters.
Parameters
clusterId
number
imageSearchFilters?
MediaImageProductSearchInput
imageVariantFilters?
TransformationsInput
Returns
Promise<void>
fetchProduct
fetchProduct: (
productId,imageSearchFilters?,imageVariantFilters?) =>Promise<void>
Defined in: composables/react/useProductInfo.ts:71
Fetches a product by id, optionally overriding the image filters.
Parameters
productId
number
imageSearchFilters?
MediaImageProductSearchInput
imageVariantFilters?
TransformationsInput
Returns
Promise<void>
loading
loading:
boolean
Defined in: composables/react/useProductInfo.ts:67
true while a product/cluster fetch is in flight.
product
product:
Product|null
Defined in: composables/react/useProductInfo.ts:63
The fetched product, or null.