Skip to main content

Use a template for some orders only

Who gets this template? in a template's settings A template can stand in for another template for the orders that match conditions you set. For example: wholesale customers get an invoice with payment terms, orders tagged gift get a gift slip, or a store’s POS orders get an 80 mm receipt. Wherever the other template would print, matching orders get this one instead: when you print, from pre-selected templates, from PDF download links and in exports. You set this up in the template’s settings, under Who gets this template?.

Before you start

  • You need at least two templates: the one to use, and the one it stands in for.
  • A design must be bought before it can be used instead of another template, or be stood in for. See Buy a design.

Set it up

  1. Go to Templates and open the settings of the template you want to use for some orders.
  2. Under Who gets this template?, choose Only some orders.
  3. In the sentence Print this instead of [template] when the order matches all of these:, choose the template it stands in for.
  4. Set the conditions. Each row reads When (or and), a field, and its values:
    • Choose a field, then its values.
    • Click Add condition to add another row.
    • Click the delete button on a row to remove it. You always keep at least one condition.
  5. Click Save in the save bar.
Every condition must match. Within a condition, the order needs to match any one of its values.

Conditions

If Foliant can’t see your markets yet, the Market field shows a warning: open Foliant again from your Shopify admin and approve the new permission. Until you do, Market conditions match no order.

When several templates fit

You can have more than one template standing in for the same template, for example one for wholesale customers and one for orders shipping to Canada. If an order fits more than one, the first one in the templates list wins. The settings page lists them in the order they’re tried. To change it, drag the templates on the Templates page.

How it shows elsewhere

  • On the Templates page, the Prints for column of a stand-in template reads, for example, “For wholesale (B2B) customers” and “instead of Receipt / Invoice”.
  • The template it stands in for says “Some orders get: …” in the list, and “Some orders get another template instead of this one: …” in its settings.
  • When you print, stand-in templates aren’t offered as separate choices. A document picked this way says Picked automatically: and why. You can switch it for one print with Template for this order. See Which template prints for an order.

Rules

  • A stand-in template is never pre-selected on its own: making a template a stand-in clears its pre-selection.
  • A template that others stand in for can’t itself stand in for another template, and a stand-in can’t be stood in for. There are no chains.
  • Templates that render one document for all selected orders can’t stand in for another template, or be stood in for.
  • If the stand-in has a different Document type from the template it replaces, a warning explains that matching orders won’t get that template’s number. Set both to the same document type to keep numbering consistent. See Set up document numbering.
  • If you delete a template that others stand in for, those templates become normal templates, not pre-selected anywhere, and you get a message in your inbox. See Delete a template.

Turn it off

  1. Open the stand-in template’s settings.
  2. Under Who gets this template?, choose Everyone.
  3. Click Save.

Good to know

  • For common setups (wholesale invoices, a receipt per store), the ready-made setups on the Templates page are quicker. See Pick the right template automatically.
  • To check which template an order gets and why, use Test with an order.
  • Downloaded PDFs can be cached for a few minutes, so a change may take up to five minutes to show in a download link.