Country of origin invoice

Add country of origin to a Shopify invoice

Generate Shopify Order Printer Liquid for printing country of origin from product or variant metafields on commercial invoices.

Quick answer

Add country of origin to a Shopify invoice for Shopify Order Printer

Choose product or variant origin storage, copy the Liquid block, and test orders with filled and missing origin values. Start in a duplicate Shopify Order Printer template, paste the Liquid in the right placement area, and preview with real orders before saving.

  1. Create or confirm a metafield such as custom.country_of_origin on products or variants.
  2. Use product metafields only when every variant has the same origin.
  3. Use variant metafields when color, size, supplier, or manufacturing batch can change the origin.

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.

{% for line_item in line_items %}
  <p>
    {{ line_item.title }} -
    HS {{ line_item.product.metafields.custom.hs_code.value | default: "Missing HS code" }},
    {{ line_item.product.metafields.custom.country_of_origin.value | default: "Missing origin" }}
  </p>
{% endfor %}

Country of origin invoice

Add country of origin to a Shopify invoice

Choose product or variant origin storage, copy the Liquid block, and test orders with filled and missing origin values.

Standard order with one clear product row.
Need customs fields aligned with item rows?

Commercial invoice fields are safest when HS code, origin, description, quantity, and item title stay together in the item table.

Add customs fields to my item table
Validate a commercial invoice starter pack

Use this when you need a focused commercial invoice starter with item-level HS code, origin, and description fields.

Request commercial invoice pack

Paid feature signals

Generated Liquid

Copy-paste code

{% for line_item in line_items %}
  <div class="opk-customs-row">
    <strong>{{ line_item.title }}</strong>
    <ul>
      <li><strong>HS code:</strong> {{ line_item.product.metafields.custom.hs_code.value | default: "Missing HS code" }}</li>
      <li><strong>Country of origin:</strong> {{ line_item.product.metafields.custom.country_of_origin.value | default: "Missing origin" }}</li>
      <li><strong>Customs description:</strong> {{ line_item.product.metafields.custom.customs_description.value | default: line_item.title }}</li>
    </ul>
  </div>
{% endfor %}

Install wizard

Place the snippet before testing output.

1
Template area

Commercial invoice item table

2
Paste target

Paste inside the item loop or commercial-invoice item table so each line gets its own customs data.

3
Test order

Cross-border order with HS code, origin, and missing-field cases

Paste location

Paste inside the item loop or commercial-invoice item table so each line gets its own customs data.

Test checklist

  • Duplicate the Shopify Order Printer template before editing the live one.
  • Preview with the regular order.
  • Use an order whose product, variant, customer, or order data has the field filled in.
  • Print or save one test preview before using the template in production.

Common failure

  • Country of origin is stored on variants, but the template prints the product metafield.
  • The origin column is pasted in the header instead of inside the item table.
  • Some products have blank origin values and the invoice still shows an empty column.

Mock preview

#1048Standard order with one clear product row.
  • HS code: 6912.00
  • Country of origin: United States
  • Customs description: Blue ceramic mug

Use case

When to use this tool

Best for merchants whose commercial invoice or customs document needs origin printed per line item, especially when variants can have different origins.

Separates country of origin from HS code so merchants can test the exact field they searched for.

Explains why product-level origin can be wrong for variants manufactured in different countries.

Keeps origin output inside the item loop next to item title, quantity, and customs fields.

Covers blank origin fallback behavior before the document reaches a carrier or broker.

Links naturally to commercial invoice, HS code, and metafield pages.

Free tool fit

Use the snippet when the edit is narrow.

Choose product or variant origin storage, copy the Liquid block, and test orders with filled and missing origin values.

  • 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 commercial invoice template when origin needs to be aligned with HS code, customs description, EORI notes, and item rows.

  • 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 Create or confirm a metafield such as custom.country_of_origin on products or variants.
  2. Step Use product metafields only when every variant has the same origin.
  3. Step Use variant metafields when color, size, supplier, or manufacturing batch can change the origin.
  4. Step Generate the origin Liquid block and paste it inside the item loop on the invoice table.
  5. Step Place country of origin near HS code, customs description, quantity, and item title.
  6. Step Preview orders with multiple products, missing origin values, and variant-specific origin values.
  7. Step Verify origin wording and documentation needs with the merchant's customs workflow before shipping.

Problem diagnosis

Match the symptom before changing Liquid.

Use these checks to decide whether the issue is field data, snippet placement, print settings, or a template merge problem.

Country of origin is blank on the invoice.

Likely cause
The selected product or variant metafield is not filled on the products in the test order.
Fix
Fill the origin metafield on the correct owner object and preview an order that contains that product or variant.

Every variant prints the same origin.

Likely cause
The template uses product-level origin even though variants come from different manufacturing countries.
Fix
Move origin data to variant metafields and print line_item.variant.metafields.custom.country_of_origin.value.

Origin appears once instead of per item.

Likely cause
The origin block was placed in the document header or footer rather than the invoice item loop.
Fix
Place origin in the item table next to each line item's title, quantity, HS code, or customs description.

FAQ

Common Shopify Order Printer issues

Where should country of origin print on a commercial invoice?

It usually belongs in the item table so each product row can show its own origin beside HS code, description, and quantity.

Should origin be stored on product or variant?

Use product metafields when every variant has the same origin. Use variant metafields when origin changes by variant, supplier, size, or manufacturing batch.

Can I print a fallback when origin is missing?

Yes. Use fallback text during testing, but missing origin values should be fixed in Shopify before using the document for shipment.

Does this create a certificate of origin?

No. It only prints stored origin data in an Order Printer template. Separate documents may still be required.

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.

Commercial invoice fields

Shopify commercial invoice template for Order Printer

Best for cross-border merchants preparing document templates that need item-level customs data in a printable layout.

Open related fix

HS code Order Printer

Add HS codes to Shopify Order Printer

Best for cross-border merchants who need an HS code column on a commercial invoice, customs packing slip, or export document built in Shopify Order Printer.

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

Packing slip metafield

Add a metafield to a Shopify packing slip

Best for merchants adding HS codes, country of origin, pick notes, wholesale fields, or product specs to warehouse documents.

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

Alternative comparison

Order Printer Pro alternative for small fixes

Compare one-off Liquid edits with full invoice automation.

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.

Template code generator

free Shopify Order Printer template code generator

Start with a printable template before adding fields.

Open tool

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

Liquid objects

Fields this page usually touches

  • line_item.product.metafields.custom.country_of_origin.value
  • line_item.variant.metafields.custom.country_of_origin.value
  • line_item.product.metafields.custom.hs_code.value
  • line_item.product.metafields.custom.customs_description.value
  • line_item.title
  • line_item.quantity

Common errors

Watch these before saving

  • Country of origin is stored on variants, but the template prints the product metafield.
  • The origin column is pasted in the header instead of inside the item table.
  • Some products have blank origin values and the invoice still shows an empty column.
  • The store prints a country name that does not match the carrier or internal customs wording.
  • The merchant treats the invoice template as proof of origin without checking source data.

Limits

What this does not replace

  • This is template code help, not customs, origin, or legal advice.
  • Origin rules and document requirements vary by product, destination, and trade program.
  • The generator cannot verify source-of-truth product data.
  • Certificates of origin or carrier forms may still be required outside Order Printer.