Storefront

Storefront settings by UI Add-on

This plugin allows you to set global properties to customize the front-end experience. Think of them as Front-end feature flags or feature methods.

Hook

Storefront

Props

productsDepth: int

This prop lets you set the query depth for retrieving customizations. Default is 2. This prop can be used in cases where you want to get nested level of customizations that are more than the default one. For instance, when you want to support nested categories and you want to show kind of a breadcrumb for the level of the product you can customize the value of this prop to get the data needed.

🚧

Server support

Since UI queries are sent to a GraphQL API, the resolver needs to support the data structure retrieved. This resolver currently doesn't support a recursive structure but it will be available soon and this callout will be removed. If you want to track it, give https://yalochat.atlassian.net/browse/PG-1459 a look.

Example

import { StorefrontPlugins } from '@engyalo/storefront-types'

export const plugins = {
  Storefront: {
    props: {
      productsDepth: 3 // Default: 2
    }
  }
} as StorefrontPlugins

Did this page help you?