Skip to main content
Experimental. This Module has no test or production evidence recorded yet. Read it, run it locally, and hold off on real Orders. See maturity levels.
The Collections Module groups products for merchandising. You can curate a collection by hand or define rules that build it automatically, feature it on the Storefront, and control its ordering and SEO metadata.
The Products package still stores its own collection-link records. Check which endpoint owns the operation you are calling, and do not write through both paths for one change.
Source: modules/collections · npm: @86d-store/collections

Installation

Then register the Module in your store’s config.json:

Configuration

string
default:"\"500\""
Maximum number of products allowed in a single collection. Requests that would exceed this limit are rejected.

Store endpoints

Store endpoints are public and return only active collections.

Admin endpoints

Admin endpoints require authentication and return collections of all statuses.

Components

Add these components to your MDX Template files. The collections Module must be listed in config.json.

CollectionList

Renders a grid of all active collections. Fetches its own data; no props required.

FeaturedCollections

Renders featured collection cards. Fetches its own data; no props required.

Types

Notes

  • Slugs must be unique. The create and update endpoints validate for conflicts.
  • Adding a product that already exists in a collection is idempotent. The operation returns the existing entry rather than creating a duplicate.
  • Deleting a collection cascades and removes all associated CollectionProduct records.
  • Automatic collections store conditions as JSON. The Store Runtime evaluates these conditions at query time.
  • Store endpoints return only active collections. Admin endpoints return all collections regardless of status.
  • Products within a collection are ordered by position ascending.