Skip to main content
Version: 2.0.0

Product Types

Navigate to yStore → Products → Product Types.

Product types in yStore are fully configurable — you create and manage them like any other setting. Each type controls what fields a product has, whether it supports variants, how SKUs are formatted, and how the product's URL is built per site. You are not limited to the built-in types.


Built-in system types

Five types are installed automatically and are protected — their handles cannot be changed and they cannot be deleted.

NameHandleDimensionsVariantsDescription
SimplesimpleYesNoPhysical product, single SKU, no options
DigitaldigitalNoNoDownloadable or online product, no shipping
Gift Cardgift-cardYesNoPhysical gift card — shipped + code emailed
Gift Card (Digital)gift-card-digitalNoNoEmail-only gift card, no shipping
BundlebundleYesNoCurated set of other products sold together — fixed components plus optional customer-configurable options. Enterprise edition.
System types

System types can be edited (name, description, field layouts, SKU format, routing, tax group) but their handle is locked and they cannot be deleted or disabled.

The Simple type is the default — it is pre-selected when creating a new product unless you change the default type.


Creating a custom product type

  1. Go to yStore → Products → Product Types.
  2. Click New Product Type.
  3. Enter a Name — the handle is generated automatically (kebab-case).
  4. Optionally add a Description (internal, not shown to customers).
  5. Configure the type settings (see Settings below).
  6. Set up the Product Field Layout and Variant Field Layout tabs.
  7. Click Save.

Product type settings

SettingDescription
NameDisplay name shown in the "New Product" type selector and product list
HandleAuto-generated kebab-case identifier — used in templates, Twig queries, and the API. Immutable on system types.
DescriptionInternal note about what this type is for
ActiveWhen disabled, the type is hidden from the "New Product" selector — existing products are unaffected
DefaultPre-selects this type when creating a new product. Only one type can be the default.
Has DimensionsEnables weight, length, width, height fields on products of this type. Disable for digital/virtual products.
Has Multiple VariantsEnables the variant matrix — products of this type can have multiple purchasable variants with individual SKUs, prices, and stock. See Variants below.
SKU FormatTemplate used to auto-generate the product SKU on save. Supports object template tokens.
Variant SKU FormatTemplate for auto-generating variant SKUs. Only applies when Has Multiple Variants is enabled.
Variant Title FormatTemplate for auto-generating variant display titles (e.g., {color} / {size}).
SKU Caselowercase or uppercase — the generated SKU is converted to this case.
Allow Numbers in SKUWhen off, numbers are stripped from auto-generated SKUs.
Tax Category GroupDefault tax category group assigned to new products of this type. Can be overridden per product.

Field layouts

Each product type has two independent field layouts, configured in their own tabs on the type edit page:

LayoutApplies toPurpose
Product Field LayoutThe product itselfCustom Craft fields on the main product record — descriptions, metadata, images, custom attributes
Variant Field LayoutEach variantCustom Craft fields on individual variants — per-variant custom data beyond SKU, price, stock

Field layouts use the standard Craft field layout designer. Add any Craft field type — including yStore's own field types — by dragging fields into tabs.

Separate concerns

Keep the product layout for data that applies to the whole product (e.g., brand, category, description). Use the variant layout for data that differs between purchasable options (e.g., colour swatch, material, warranty period).


Variants

Any product type can support multiple purchasable variants by enabling Has Multiple Variants. When enabled:

  • Products of this type display a Variants tab in the editor
  • Each variant has its own SKU, price, weight, and stock
  • The variant matrix is built from the product's selected attributes and their values
  • The storefront presents option selectors (dropdowns, swatches) that resolve to the matching variant

When Has Multiple Variants is disabled, each product has exactly one variant (one SKU, price, stock level) — this is what the built-in Simple and Digital types use.

See Configurable Products for the full workflow.


SKU format tokens

SKU formats use Craft's object template syntax — any property of the product or variant object is available as a token:

TokenResolves to
{handle}Product handle (slug)
{id}Product element ID
{title}Product title
{sku}Current SKU value (useful in variant format for inheriting the product SKU)

Examples:

FormatResult
{handle}-{id}blue-sneakers-412
PROD-{id}PROD-412
{title|upper}-{id}BLUE-SNEAKERS-412

Leave the format empty to let admins type the SKU manually. The format is only applied on new products/variants — editing an existing record does not regenerate the SKU.


Per-site routing

Each product type can define a URI format and template per site. This works identically to Craft entry type routing.

FieldExampleDescription
URI Formatshop/products/{slug}URL pattern for product pages of this type. Supports any product property as a token.
Templateshop/productTwig template path in your theme used to render the product page.

Configure per-site routing in the Routing section of the type edit page. Each site listed in Settings → Sites gets its own row — useful for multi-language or multi-region stores where product URLs differ per locale.

Headless mode

If Craft is running in headless mode, routing is unused — products are served via the API. The routing section is hidden when headless mode is active.


Managing product types

Reordering

Drag types in the list to change their order. The order determines how types appear in the "New Product" type selector.

Enabling and disabling

Disable a type to hide it from the "New Product" selector without deleting it or affecting existing products of that type. Re-enable it at any time.

System types cannot be disabled

The five built-in system types (simple, digital, gift-card, gift-card-digital, bundle) cannot be disabled.

Deleting

Custom (non-system) types can be deleted from the type list. Before deleting, reassign or remove any products that use the type — deleting a type does not automatically delete its products, but those products will lose their type association.


Built-in type reference