Interface: UseProductInfoReturn
Defined in: composables/react/useProductInfo.ts:73
State and fetch actions returned by useProductInfo.
Properties
cluster
cluster:
Cluster|null
Defined in: composables/react/useProductInfo.ts:77
The fetched cluster, or null.
clusterImageUrl
clusterImageUrl:
string
Defined in: composables/react/useProductInfo.ts:94
First image URL of the cluster's default product, or ''.
clusterName
clusterName:
string
Defined in: composables/react/useProductInfo.ts:88
Cluster name, falling back to the default product's name.
clusterPrice
clusterPrice:
number|null
Defined in: composables/react/useProductInfo.ts:92
Cluster gross price taken from the default product, or null.
clusterSku
clusterSku:
string
Defined in: composables/react/useProductInfo.ts:90
Cluster SKU, falling back to the default product's SKU.
error
error:
string|null
Defined in: composables/react/useProductInfo.ts:81
Last error message, or null.
fetchCluster
fetchCluster: (
clusterId,imageSearchFilters?,imageVariantFilters?) =>Promise<void>
Defined in: composables/react/useProductInfo.ts:85
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:83
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:79
true while a product/cluster fetch is in flight.
product
product:
Product|null
Defined in: composables/react/useProductInfo.ts:75
The fetched product, or null.