MixProductPage
All functionality for the product page
Methods
Method | Description | Parameters |
---|---|---|
emitGTMEvent | GTM event emitter | - |
onQuantityChange | Handler for changing quantity | value (Number) |
addToCartClick | Action for clicking the add to cart button | - |
replaceProduct | Replace product data without reloading the page. Used for changing between product variants | alias (String) |
sizeChangeHandler | Handler for changing the sku | data (Object) |
quantityThresholdHandler | Handler for reaching quantity threshold | - |
switchToCanonical | Switching to canonical url if different from route path | - |
Computed
Computed | Type | Description | From Store |
---|---|---|---|
productImages | Array | Quick ref to product images | No |
prodAlias | String | Alias used to fetch product data, using replaceAlias if it has a value | No |
widgetAreaFilters | Array | Returns array of widget filters | No |
breadcrumbsCurrent | Object | Current breadcrumb object | No |
relatedProductsRelated | Array | Related product with relation RELATED | No |
relatedProductsAccessories | Array | Related product with relation ACCESSORIES | No |
relatedProductsSimilar | Array | Related product with relation SIMILAR | No |
imgSrc | [String, Boolean] | Image src used for meta image | No |
MixIns
MixIn |
---|
MixMetaReplacement |
MixApolloRefetch |
Watch
Name | Description | Parameters |
---|---|---|
undefined | Watching currentStock.totalStock to change quantity if set higher than totalStock | - |
prodAlias | Watching prodAlias to fetch request when alias state change | - |