Composables
Interfaces
AppliedFiltersOptions
Properties
| Property | Type |
|---|---|
filtersPrefix | string |
ModuleOptions
Properties
| Property | Type |
|---|---|
autoImports? | boolean |
ProductListSortOptions
Properties
| Property | Type |
|---|---|
defaultSortingKey? | string |
sortingOptions | MaybeRefOrGetter<SelectedSort[]> |
ProductsForListingOptions
Properties
| Property | Type |
|---|---|
fetchingKey | MaybeRefOrGetter |
fetchingOptions | Partial<{ immediate: boolean; lazy: boolean; }> |
params | Ref<Omit<FetchProductsByCategoryParams, "category">> |
UseAppliedFiltersReturn
Properties
| Property | Type | Description |
|---|---|---|
appliedAttributeValues | ComputedRef<AppliedAttributeValues> | A computed property that returns a record mapping attribute keys to arrays of numbers representing selected values for each attribute. |
appliedBooleanValues | ComputedRef<AppliedBooleanValues> | A computed property that returns a record mapping attribute keys to their boolean values for boolean filters. |
appliedFilter | ComputedRef<ProductSearchQuery> | A computed property returning a ProductSearchQuery object based on the route's query parameters. |
appliedFiltersCount | ComputedRef<number> | A computed property that returns the total count of applied filters. Counts minPrice/maxPrice as one and counts each attribute filter separately. |
areFiltersApplied | ComputedRef<boolean> | A computed property that returns true if any filters are currently applied, otherwise false. |
UseProductListingSeoDataReturn
Properties
| Property | Type | Description |
|---|---|---|
canonicalLink | ComputedRef<CanonicalLink[]> | A computed canonical link. |
categoryBreadcrumbSchema | ComputedRef<[] | WithContext<...>> | A computed breadcrumb schema. |
robots | ComputedRef<string> | A computed robots. Value can be index,follow or noindex,follow. |
title | ComputedRef<string> | A computed string that is constructed from breadcrumb values. |
UseProductListSortReturn
Properties
| Property | Type | Description |
|---|---|---|
isDefaultSortSelected | ComputedRef<boolean> | Indicating if the default sort is selected. |
selectedSort | ComputedRef<SelectedSort | undefined> | The currently selected sorting option. |
sortLinks | ComputedRef<SortLink[]> | Deprecated This property is deprecated. Use passed sortingOptions directly instead. Links with updated query parameters for each sorting option. |
Type Aliases
AppliedAttributeValues
AppliedBooleanValues
CanonicalLink
FiltersForListingOptions
RangeTuple
SelectedSort
Type Declaration
| Name | Type |
|---|---|
key | string |
label | string |
ShopCategory
Type Declaration
| Name | Type |
|---|---|
category | Category |
SortLink
Type Declaration
| Name | Type |
|---|---|
to | RouteLocationRaw |
UrlParams
UseFiltersForListingReturn
Type Declaration
| Name | Type | Description |
|---|---|---|
availableFilters | ComputedRef<...> | Returns computed available filters. |
filteredProductCount | ComputedRef<...> | Returns the count of the products which the applied filter returns. |
UseProductsForListingReturn
Type Declaration
| Name | Type | Description |
|---|---|---|
pagination | ComputedRef<...> | A computed object containing pagination details for the product list. |
paginationOffset | ComputedRef<...> | - |
products | ComputedRef<...> | A computed array of products in the specified category. |
totalProductsCount | ComputedRef<...> | A computed offset for the current page based on the pagination data. |
Variables
breadcrumbsFactory
DEFAULT_SORTING_KEY
filtersFactory
module
SORT_DATE_NEWEST
Type Declaration
| Name | Type | Default value |
|---|---|---|
by | "new" | APISortOption.DATE_ADDED |
direction | "desc" | APISortOrder.DESCENDING |
key | string | 'date_newest' |
SORT_PRICE_ASC
Type Declaration
| Name | Type | Default value |
|---|---|---|
by | "price" | APISortOption.PRICE |
direction | "asc" | APISortOrder.ASCENDING |
key | string | 'price_asc' |
SORT_PRICE_DESC
Type Declaration
| Name | Type | Default value |
|---|---|---|
by | "price" | APISortOption.PRICE |
direction | "desc" | APISortOrder.DESCENDING |
key | string | 'price_desc' |
SORT_REDUCTION_DESC
Type Declaration
| Name | Type | Default value |
|---|---|---|
by | "reduction" | APISortOption.REDUCTION |
direction | "desc" | APISortOrder.DESCENDING |
key | string | 'reduction_desc' |
SORT_TOP_SELLER
Type Declaration
| Name | Type | Default value |
|---|---|---|
direction | "desc" | APISortOrder.DESCENDING |
key | string | 'top_seller' |
sortingKey | string | 'scayle:v1:balanced-offerings' |
Functions
useAllShopCategoriesForId()
Type Parameters
| Type Parameter | Default type |
|---|---|
DataT | ShopCategory[] |
PickKeys extends KeysOf<DataT> | KeysOf<DataT> |
DefaultT | null |
Parameters
| Parameter | Type | Default value |
|---|---|---|
__namedParameters | Partial<{ options: UseRpcOptions<..., ..., ..., ...>; params: MaybeRefOrGetter<...>; }> | {} |
key | MaybeRefOrGetter | 'useAllShopCategoriesForId' |
Returns
UseRpcReturn<"getAllShopCategoriesForId", DataT, PickKeys, DefaultT>
useAppliedFilters()
Composable to manage applied filters based on route query parameters.
Parameters
| Parameter | Type | Description |
|---|---|---|
route | RouteLocationNormalizedLoadedGeneric | Route object to handle the queries. |
options | AppliedFiltersOptions | Configuration options for applied filters. |
Returns
An object containing reactive data and computed properties for managing applied filters:
useFiltersForListing()
Composable to manage filters based on current category ID and route query parameters.
Parameters
| Parameter | Type | Description |
|---|---|---|
options | FiltersForListingOptions | Configuration options for fetching products. |
Returns
- An object containing reactive data, computed properties and async RPC call for managing filters:
useProductListingSeoData()
Composable for handling product listing SEO data.
Parameters
| Parameter | Type | Description |
|---|---|---|
breadcrumbs | MaybeRefOrGetter<BreadcrumbItem[]> | Breadcrumb items. |
route | RouteLocationNormalizedLoadedGeneric | The route object to handle queries. |
params | UrlParams | URL data for constructing the canonical link. |
isDefaultSortSelected | MaybeRefOrGetter<boolean> | If the default sort is applied on the listing. |
Returns
UseProductListingSeoDataReturn
An object containing reactive data and computed properties for managing SEO data.
useProductListSort()
Custom composable to handle product list sorting.
Parameters
| Parameter | Type | Description |
|---|---|---|
route | RouteLocationNormalizedLoadedGeneric | Route object to handle the queries and path. |
options | ProductListSortOptions | Options for configuring the sorting behavior. |
Returns
Computed properties and methods related to sorting
useProductsForListing()
Composable to fetch and manage products by category with configurable options.
Parameters
| Parameter | Type | Description |
|---|---|---|
options | Partial<ProductsForListingOptions> | Configuration options for fetching products. |
Returns
An object containing reactive data and computed properties for managing products by category.