useProductAssociations ​
Category:
Product
Get product association entity.
Types ​
ts
export function useProductAssociations(
product: ComputedRef<Schemas["Product"]>,
options?: {
/**
* @deprecated Ignored, only cross-selling is loaded. Will be removed in the next major release.
*/
associationContext?: "cross-selling" | "reviews";
includeSeoUrls?: boolean;
},
): UseProductAssociationsReturnts
export type UseProductAssociationsReturn = {
/**
* Loads the cross-selling groups of the product.
*/
loadAssociations(params?: {
/**
* @deprecated Ignored, the request is always sent as `POST`. Will be removed in the next major release.
*/
method?: "post" | "get";
/**
* @deprecated Ignored. Will be removed in the next major release.
*/
searchParams?: Schemas["Criteria"];
}): Promise<void>;
/**
* If it's loading - indicator
*/
isLoading: ComputedRef<boolean>;
/**
* Product associations, like CrossSelling[]
*/
productAssociations: ComputedRef<Schemas["CrossSellingElementCollection"]>;
};