Template code generator

Shopify Order Printer template code generator

Generate starter Shopify Order Printer template code for invoices, packing slips, 4x6 prints, and common Liquid field edits.

Quick answer

Shopify Order Printer template code generator for Shopify Order Printer

Generate a starter template and use the install notes as a safe first pass. Start in a duplicate Shopify Order Printer template, paste the Liquid in the right placement area, and preview with real orders before saving.

  1. Choose the closest starter template and copy the generated code.
  2. Create a new Order Printer template so your existing invoice stays untouched.
  3. Paste the code and preview it with several real orders.

Copy-ready example

Starter Liquid pattern

Use this as a visible pattern, then use the generator below to adjust the exact field, fallback text, layout, and test notes.

<style>
  @page { size: 4in 6in; margin: 0.12in; }
  body { font-family: Arial, sans-serif; font-size: 11px; }
</style>
<strong>{{ order.name }}</strong>
{% for line_item in line_items %}
  <p>{{ line_item.quantity }} x {{ line_item.title }}</p>
{% endfor %}

Template code generator

Shopify Order Printer template code generator

Generate a starter template and use the install notes as a safe first pass.

This starter uses 4in x 6in print CSS. Browser print dialogs and thermal printer drivers can still add margins.
Standard order with one clear product row.
Need this 4x6 layout adjusted for your printer?

Thermal printers, browser scaling, long titles, and addresses can all change the fit, so the fix is scoped around your real label output.

Adjust this 4x6 layout
Validate a 4x6 starter pack

Use this when the free starter is close but you want a polished 4x6 template pack before custom work.

Request 4x6 starter pack

Paid feature signals

Generated Liquid

Copy-paste code

<style>
  @page {
    size: 4in 6in;
    margin: 0.12in;
  }

  body {
    margin: 0;
    font-family: Arial, sans-serif;
    font-size: 11px;
    line-height: 1.3;
    color: #111;
  }

  .opk-slip {
    width: 100%;
  }

  .opk-header,
  .opk-ship-to,
  .opk-items {
    border-bottom: 1px solid #111;
    padding-bottom: 8px;
    margin-bottom: 8px;
  }

  .opk-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
  }

  .opk-order-name {
    font-size: 18px;
    font-weight: 700;
  }

  .opk-barcode {
    max-width: 1.5in;
    text-align: right;
  }

  .opk-items table {
    width: 100%;
    border-collapse: collapse;
  }

  .opk-items th,
  .opk-items td {
    padding: 4px 0;
    text-align: left;
    vertical-align: top;
  }

  .opk-qty {
    width: 28px;
    font-weight: 700;
  }

  .opk-item-title {
    overflow-wrap: anywhere;
  }

  .opk-sku {
    width: 82px;
    font-size: 10px;
  }

  .opk-muted {
    color: #555;
  }
</style>

<div class="opk-slip">
  <div class="opk-header">
    <div>
      <div class="opk-order-name">{{ order.name }}</div>
      <div>{{ order.created_at | date: "%b %d, %Y" }}</div>
    </div>
    <div class="opk-barcode">
      <s-barcode value="{{ order.name }}" />
    </div>
  </div>

  <div class="opk-ship-to">
    <strong>Ship to</strong><br>
    {{ shipping_address.name }}<br>
    {{ shipping_address.address1 }}{% if shipping_address.address2 != blank %}, {{ shipping_address.address2 }}{% endif %}<br>
    {{ shipping_address.city }}, {{ shipping_address.province_code }} {{ shipping_address.zip }}<br>
    {{ shipping_address.country }}
  </div>

  <div class="opk-items">
    <table>
      <thead>
        <tr>
          <th class="opk-qty">Qty</th>
          <th>Item</th>
          <th>SKU</th>
        </tr>
      </thead>
      <tbody>
        {% for line_item in line_items %}
          <tr>
            <td class="opk-qty">{{ line_item.quantity }}</td>
            <td class="opk-item-title">{{ line_item.title }}</td>
            <td class="opk-sku">{{ line_item.sku | default: "No SKU" }}</td>
          </tr>
        {% endfor %}
      </tbody>
    </table>
  </div>

  {% if note != blank %}
    <div class="opk-note">
      <strong>Order note</strong><br>
      {{ note }}
    </div>
  {% endif %}
</div>

Install wizard

Place the snippet before testing output.

1
Template area

New full template

2
Paste target

Replace a duplicate 4x6 test template, not the live invoice first.

3
Test order

One, three, and five item orders on the target printer

Paste location

Use this as a duplicate full template first, then tune margins in the browser and printer driver.

Test checklist

  • Duplicate the Shopify Order Printer template before editing the live one.
  • Preview with the regular order.
  • Test actual size or 100% scale before fit-to-page in the print dialog.
  • Print or save one test preview before using the template in production.

Common failure

  • Replacing a working template without saving a backup first.
  • Adding custom fields before the base invoice or packing slip prints cleanly.
  • Using variables from theme Liquid that are not available in Order Printer templates.

Mock preview

#1048|||| ||| ||||
Avery Chen
218 Market Street, Austin, TX
2Blue ceramic mugMUG-BLUE-01

Pack with care. Gift note included.

Use case

When to use this tool

Best for merchants who need template code they can paste into Shopify Order Printer without installing a full invoice app.

Starts with a real printable template instead of a generic article.

Keeps the workflow inside Shopify Order Printer.

Links to barcode, metafield, and 4x6 tools for specific edits.

Free tool fit

Use the snippet when the edit is narrow.

Generate a starter template and use the install notes as a safe first pass.

  • You know which Shopify Order Printer template you want to edit.
  • You can test in a duplicate template before touching the live one.
  • The field or layout change maps to the Liquid objects listed on this page.

Manual fix fit

Request help when placement is risky.

Send your current template and get a scoped version adjusted for your document type.

  • Your current template already has custom loops, tables, CSS, or app-specific fields.
  • The snippet works in isolation but prints blank, repeats, or breaks layout in your real template.
  • The document is customer-facing, B2B, VAT, customs, or warehouse-critical and needs careful test notes.

Install steps

Copy into Shopify Order Printer carefully.

The preview uses sample data. Always test the template with real orders before using it for fulfillment, accounting, customs, or customer-facing documents.

  1. Step Choose the closest starter template and copy the generated code.
  2. Step Create a new Order Printer template so your existing invoice stays untouched.
  3. Step Paste the code and preview it with several real orders.
  4. Step Add barcode, metafield, VAT, or PO snippets only after the base layout prints correctly.

FAQ

Common Shopify Order Printer issues

Is this a Shopify app?

No. It is an independent code tool for Shopify Order Printer templates.

Should I overwrite my current template?

No. Create a duplicate or new template first, then test with real orders before replacing anything.

Can this generate invoice and packing slip templates?

It can create starter code and point you to specific snippets. Polished full templates are better handled as a code fix.

Related exact fixes

Follow the next likely Order Printer problem.

These links connect adjacent search intents, such as blank metafields, item-level customs fields, B2B invoice data, and one-off template fixes.

Packing slip template code

Shopify packing slip template code

Best for stores that want a warehouse-friendly packing slip without a monthly PDF invoice app.

Open related fix

Barcode snippet generator

Add a barcode to a Shopify packing slip

Best for merchants who need a scannable order number, SKU, variant barcode, or tracking number on a packing slip without installing a full PDF invoice app.

Open related fix

Metafield Liquid generator

Add metafields to Shopify Order Printer

Best for merchants adding product specs, HS codes, country of origin, VAT notes, wholesale fields, or customer fields to printed documents.

Open related fix

Commercial invoice fields

Shopify commercial invoice template fields

Place HS code, origin, customs description, and EORI notes in the right row.

Open related fix

Line item properties

print Shopify line item properties

Show gift options, personalization, and bundle details without private fields.

Open related fix

VAT invoice fields

Shopify VAT invoice template fields

Add VAT IDs, tax notes, and B2B invoice fields with cautious scope.

Open related fix

PO number invoice

add a PO number to Shopify invoices

Handle B2B purchase order data without repeating it inside item rows.

Open related fix

HS code Order Printer

add HS codes to Shopify Order Printer

Print item-level HS codes from product or variant metafields.

Open related fix

Common Order Printer fixes

Keep editing the same Shopify template.

These are the highest-signal internal paths for merchants who need template code, packing slip layout, barcodes, metafields, or 4x6 print fixes.

Packing slip template code

Shopify packing slip template code

Build the base pick-pack document for warehouse use.

Open tool

Barcode snippet generator

add a barcode to a Shopify packing slip

Print order, SKU, variant, tracking, or QR codes.

Open tool

Metafield Liquid generator

Shopify Order Printer metafields

Print product, variant, order, or customer metafields.

Open tool

4x6 packing slip starter

Shopify 4x6 packing slip template

Test thermal printer layout, margins, and item overflow.

Open tool

Line item properties

Shopify Order Printer line item properties

Show personalization, bundle details, and gift options.

Open tool

Liquid objects

Fields this page usually touches

  • order
  • line_items
  • shipping_address
  • billing_address
  • transactions
  • tax_lines

Common errors

Watch these before saving

  • Replacing a working template without saving a backup first.
  • Adding custom fields before the base invoice or packing slip prints cleanly.
  • Using variables from theme Liquid that are not available in Order Printer templates.

Limits

What this does not replace

  • This page provides starter code, not a full visual invoice designer.
  • Automatic installation into Shopify admin is intentionally out of scope for the first version.
  • Complex accounting, VAT, or customs rules need merchant review.