StorefrontLink
Overview
StorefrontLink
represents a discriminated union of different link types in the storefront. Each type specifies the target resource it navigates to, such as products, categories, pages, or custom URLs.
Possible Link Types
UrlStorefrontLink
Navigates to a custom URL.
- Attributes:
to
: literal = 'url'url
: stringtitle
: string
ProductStorefrontLink
Navigates to a specific product page.
- Attributes:
to
: literal = 'product'product
: ProductReference
CategoryStorefrontLink
Navigates to a specific category page.
- Attributes:
to
: literal = 'category'category
: CategoryReference
HomeStorefrontLink
Navigates to the homepage.
- Attributes:
to
: literal = 'home'
PageStorefrontLink
Navigates to a predefined page.
- Attributes:
to
: literal = 'page'page
: PageName
CartStorefrontLink
Navigates to the shopping cart.
- Attributes:
to
: literal = 'cart'
OrderConfirmationStorefrontLink
Navigates to the order confirmation page for a specific order.
- Attributes:
to
: literal = 'orderConfirmation'id
: string
ContentPageStorefrontLink
Navigates to a custom content page.
- Attributes:
to
: literal = 'contentPage'handle
: string
SearchResultsStorefrontLink
Navigates to the search results page.
- Attributes:
to
: literal = 'searchResults'params
: Record<string, any> (optional)