Module Reference

Catalog

Products, variants, collections and product photos, shared by the online shop and the register.

Catalog holds what a business sells: products, their sizes and colours, collections, and product photos. The online shop (Storefront) and the register (POS) both sell from it, so a product is set up once. Stock quantities aren't Catalog's: a stocked variant points at an item in Inventory, which holds every quantity and batch.

A variant can have a Compare-at price: what it used to sell for. When it's above the price, the shop shows it struck through beside the price with a "Sale" badge. It's for one item's lasting markdown and records no discount on the order. A sale with dates, or one across a collection, is a discount in Discounts, and the shop works out its sale prices without any product's price changing.

What it handles

  • Editing a live product without the shop changing under customers. Edits save to a draft while the shop keeps showing the published product. Publishing applies the whole draft at once, a publish that fails validation keeps the draft, and a publish can be scheduled. Tested: "protected product drafts"
  • A compare-at price that isn't a markdown. A compare-at price at or below the price the variant sells at is refused, and the message names both amounts. One above the price saves and publishes, and raising the price to it later is never refused. Tested: "protected product drafts"
  • Importing a product list. The operator previews every row first. Accepted rows are committed once, and rejected rows are kept to show what was wrong. Starting stock comes in with the import. Tested: "catalog import and initial stock"
  • Register sales that arrive twice or half-finished. A till that resends a sale gets the same answer and stock goes down once, including when the stock moved but the sale's record was lost. A basket with an unknown item is refused whole, a closed stock location is refused, and staff can't sell more than is available. Tested: "Catalog: point-of-sale stock commands"
  • Photos that aren't what their names say. A JPEG saved as .png is stored as a JPEG, a script renamed as an image is refused, and a nightly job deletes uploads that were never used while keeping published photos. Tested: "Catalog: product photos"
  • Who may upload. Signed-out visitors and staff with no Catalog or Storefront permission can't request an upload, and an app without file storage says uploads are unavailable instead of failing. Tested: "storage-only media authorization"
  • Running without an online shop. Stock moves and register sales work in an app with no Storefront. Tested: "Catalog: absent storefront"
  • A record of every admin change. Catalog's admin changes, apart from draft autosaves, are written to the audit log. Tested: "Catalog: audit"

What you build on top

  • Where products are sold. Switch on Storefront to sell online and POS to sell at the register. POS adds Sell at the register to the product page's sales channels through the catalog.product-channel slot. Another channel your app adds (a marketplace feed, say) goes in the same slot. See Extend a Module.
  • Stock and purchasing. Quantities, batches and receiving come from Inventory and Supply chain.
  • Photo storage. Product photos need the optional media file storage connected to the app. Without it, products work and uploads are turned off.
  • Your words. Rename "Products" for the business (a restaurant's Menu, a gym's Classes & products) with a business type or an override.
  • In code. Your coding agent imports Catalog only through its public API: index.ts and server/index.ts in apps/web/src/modules/catalog/. See Build on a Module.

Limits

  • Catalog doesn't count stock. A variant tracks stock only when it's linked to an Inventory item.
  • Photos are uploaded files only. A product image can't be attached by URL.

Facts

Pages

WherePath
Admin/admin/catalog

Permissions

Admin holds every key. The other roles listed hold it when the app first gets the Module; after that, roles are yours to change under Settings → Roles & Permissions.

PermissionWhat it allowsOrganization roles that start with it
admin-panel:writeFull compatibility access to all module administration, including POS, catalog, storefront, and CRM staff tools.Admin
catalog:writeManage catalog products, collections, and product inventory.Admin, Manager

Data

  • Tables: collection, product, product_revision, product_slug_alias, product_media, product_option, product_option_value, product_variant, collection_product, commerce_command, import_job
  • File storage media: optional, shared across the organization

Slots

Places other Modules and your app code can add to. See Extend a Module.

  • catalog.product-channel

Tested workflows

  • protected product drafts
  • storage-only media authorization
  • Catalog: absent storefront
  • catalog import and initial stock
  • Catalog: audit
  • Catalog: point-of-sale stock commands
  • Catalog: product photos
  • The catalog on the admin home and in search