# Alternate product templates for different layouts

> Give some Shopify products a different layout: create product.<name>.json in the theme editor, assign it per product or in bulk, read template.suffix in code.

Page: https://lintelagency.com/resources/shopify-tricks/alternate-product-templates

## In short

An alternate product template is a second layout, saved as templates/product.<name>.json, that you assign to selected products: pre-order items, bundles or a launch product with extra sections. Create it in the theme editor with Create template, then pick it under Theme template on the product, or for many products in the bulk editor. Shared code can check template.suffix. A store can have up to 1,000 templates in total.

## Facts

- **File:** templates/product.<name>.json
- **Assign:** Product > Theme template, or bulk editor
- **In code:** template.suffix
- **Limit:** 1,000 templates in total
- **Last checked:** 2 November 2026

## How to use it

1. In the theme editor, open the template drop-down, choose Products > Create template, name it (for example preorder) and base it on the default product template.
2. Add, remove or reorder sections for that template and save.
3. Assign it: open the product in the admin and choose the template under Theme template, or set the Theme template column in the bulk editor.
4. Preview first with /products/<handle>?view=preorder, and branch shared snippets on template.suffix.

## Code

### template-aware-snippet.liquid

```liquid
{%- comment -%}
  Shared snippets can react to the template in use. template.suffix is nil
  on the default product template and "preorder" on product.preorder.json.
{%- endcomment -%}
{%- if template.name == 'product' and template.suffix == 'preorder' -%}
  {%- assign button_label = 'Pre-order now' -%}
{%- else -%}
  {%- assign button_label = 'Add to cart' -%}
{%- endif -%}
<button type="submit" name="add">{{ button_label }}</button>
```

### steps.txt

```text
# Create: Online Store > Edit theme > top drop-down > Products > Create template
Name: preorder   Based on: Default product
-> saved as templates/product.preorder.json
   (the JSON example uses Dawn's section types; yours come from your theme)

# Assign to one product: Products > (product) > Theme template > preorder > Save
# Assign to many: select products > Bulk edit > Columns > Theme template

# Preview before assigning
Theme editor > drop-down > Products > preorder > pick a product to preview
https://your-store.com/products/example-product?view=preorder

# Limits
up to 1,000 templates in total
the default product template can't be replaced by an alternate one
template options in the admin come from the live theme only
```

### product.preorder.json

```json
{
  "sections": {
    "main": {
      "type": "main-product",
      "settings": {}
    },
    "preorder-note": {
      "type": "rich-text",
      "settings": {}
    }
  },
  "order": ["main", "preorder-note"]
}
```

## Limits and edge cases

- The template drop-down in the admin lists templates from the live theme only; create the template in the published theme before you assign it.
- You can’t replace the default product template with an alternate one; if every product needs the change, edit the default template.
- Edits to an alternate template affect every product that uses it.
- For a layout per market or for B2B buyers, look at contextual templates (files like index.context.<market>.json) rather than a separate template.

## Questions

### How do I use a different template for one product on Shopify?

Create a product template in the theme editor, then open the product in the admin and choose it under Theme template.

### How do I change the template of many products at once?

Select the products, click Bulk edit, add the Theme template column and set it for each row.

### How do I know which template is being used in Liquid?

template.name is the type (product) and template.suffix is the alternate name, or nil on the default template.

## Shopify documentation

- [Alternate templates](https://shopify.dev/docs/storefronts/themes/architecture/templates/alternate-templates)
- [Templates: create, preview, apply](https://help.shopify.com/en/manual/online-store/themes/theme-structure/templates)

## Related

- [The ?view= parameter: render any alternate template](https://lintelagency.com/resources/shopify-tricks/alternate-templates-view-parameter)
- [Bulk editor columns you don’t see by default](https://lintelagency.com/resources/shopify-tricks/bulk-editor-hidden-columns)
- [Product bundle Shopify section](https://lintelagency.com/resources/shopify-sections/product-bundle)
- [Size chart Shopify section](https://lintelagency.com/resources/shopify-sections/size-chart)

License: MIT. Free to use in your own store and in client work.
