Skip to main content

CatalogIntegration

This is the return value of initializing an integration with the Catalog function exported by this package.

Functions

getNavigationMenu

Get the navigation menu from the catalog vendor. If a cmsNavigationPromise is provided as a parameter, the CMS navigation and the catalog navigation are merged. CMS and catalog content are commonly combined in site navigations.

Parameters

cmsNavigationPromise

type: Promise<NavigationMenuItem | undefined> | undefined

The CMS navigation. This allows the Catalog to supplement the CMS navigation

Return Value

type: NavigationMenu

Normalized Navigation menu for rendering site navigation. If cmsNavigationPromise was provided, this return value combines the CMS navigation with the catalog navigation.

getCategoryByHandle

Parameters

handle

type: string

Cross vendor identifier for a category. Is used as the category page slug.

Return Value

type: Category

Normalized category metadata. Category objects do not return listings of products in the category. Products are fetched separately via search.

getCategoryByID

Fetch a category by vendor id

Parameters

id

type: string

Vendor id for the category

Return Value

type: Category

Normalized category metadata. Category objects do not contain a list of products in the category. Products are fetched separately via search.

getProduct

Fetch a product by reference. A product reference can either be a handle plus optional variation attributes values or an identifier to a specific variant

Parameters

productReference

type: ProductReference

Product reference to fetch

Return Value

type: Product

Normalized product model