Skip to content

useProductAssociations

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;
  },
): UseProductAssociationsReturn

source code

ts
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"]>;
};

source code

Was this page helpful?
UnsatisfiedSatisfied
Be the first to vote!
0.0 / 5  (0 votes)