Commerce
High Velocity Commerce package exposes a vendor agnostic interface to the cart and catalog providers.
Integration Functions
The @hv/commerce
package exposes functions that insantiate cart and catalog integrations.
Catalog
The Catalog
function provides the vendor agnostic interface to
The catalog provider. It is intended to be used in server components
or route handlers
Example usage:
const { getCategoryByHandle } = Catalog({
locale: 'en-US',
});
const categoryResult = await getCategoryByHandle('clothing');
Catalog Functions
name | description |
---|---|
getNavigationCatalog | Returns a navigation tree from the commerce vendor for navigation |
getCategoryByHandle | Fetches a category by handle/slug |
getCategoryByID | Fetch a category by ID |
getProductByID | Fetch a product by ID |
getProductByHandle | Fetch a product by handle/slug |
getProductBySKU | Fetch a product by sku |