products.catalog.draft@1, review@1, and publish@1 run as store Commands locally. Publication records catalog.published@1 in one owner-local transaction.
Not yet: Storefront, search, and feed still do not read the published revision. Do not call publication Stable.
Source: modules/products · npm: @86d-store/products
Installation
config.json:
Configuration
Pass options to the factory when you register the Module:Enable inventory tracking by default for new products. Products with
trackInventory: false skip all inventory increment and decrement operations.Store endpoints
Store endpoints are public and return onlyactive products. Use them from your Storefront to browse, search, and display products.
Products
Query parameters for
GET /products
Categories
Collections
Admin endpoints
Admin endpoints require authentication and return all product statuses (draft, active, archived).
Products
Variants
Categories
Collections
Components
Add these components to your MDX Template files. The Module must be listed inconfig.json for the components to be available.
ProductCard
Displays a single product card with image, name, price, discount badge, and an optional Add to Cart button.
A
Product object. See the Types section for the full shape.FeaturedProducts
Responsive grid of featured products. Fetches its own data; no props required.
ProductListing
Full product listing with search, category, price, stock, and tag filters, plus sorting and pagination. Fetches its own data.
ProductDetail
Full product detail page including image gallery, variant selector, pricing, inventory status, reviews, and related products. Loaded automatically by the store’s /products/:slug catch-all route.
RelatedProducts
Horizontal grid of related products scored by shared category and tags. Fetches its own data.
CollectionCard
Displays a single collection card with image, name, and description.
CollectionGrid
Grid of collections with optional featured-only filtering. Fetches its own data.
CollectionDetail
Full collection page with image, description, product count, and products grid. Loaded automatically by the store’s /collections/:slug catch-all route.
StarDisplay
Read-only star rating display.
StarPicker
Interactive star rating input for review submission.
Callback fired when a Shopper selects a rating.
StockBadge
Inventory status badge. Displays “Out of stock”, “Only X left”, or “In stock” based on the inventory count.
ProductReviewsSection
Complete review section with rating summary, paginated review list, and a review submission form. Fetches its own data.
Types
All price fields (
price, compareAtPrice, costPrice) are stored and returned in cents. Divide by 100 to display a dollar amount. When importing products from CSV, the import pipeline converts dollar values to cents automatically.Current behavior and limits
- Store endpoints always filter to
status: "active". Admin endpoints return all statuses. - Deleting a category orphans its child categories and products rather than cascading;
categoryIdandparentIdare set toundefined. - Deleting a product cascades to all its variants. Deleting a collection cascades to collection-product links.
addProductToCollectionis idempotent. Adding a product already in a collection returns the existing link.- Inventory decrement has no floor and can go negative. Products with
trackInventory: falseskip all inventory operations. - Related products are scored by shared category (+10 points) and shared tags (+1 point each).
Related pages
- Inventory for stock records
- Collections for merchandising groups
- Checkout for the purchase path
- How commerce records relate
- Glossary
- Versioning and maturity