Serializer - Product Tracking
  • Getting started
    • Introduction
    • Enable product tracking
    • Add serial numbers and other data to orders
      • Serialize items from the Admin Order page
      • Serialize items via the app (legacy)
    • Add serial numbers to the Shopify POS cart
    • Track items
    • Share item information with customers
      • Shopify notifications
      • Customer's order page
      • Order printer
    • Track custom item information
    • Development API reference
      • Metafields
      • REST API
      • Order printer's Liquid variables and filters
  • Troubleshooting
    • FAQs
    • Known issues & workarounds
      • Handle external order edits
  • Legal
    • Terms of Service
    • Privacy Policy
    • Sub-processors
Powered by GitBook
On this page
  • Variables
  • Order
  • Shop
  • Filters
  1. Getting started
  2. Development API reference

Order printer's Liquid variables and filters

PreviousREST APINextFAQs

Last updated 1 year ago

The app provides its own variation of Shopify's . Please do not confuse it with the variables and filters available in Shopify notifications, storefront's theme, etc.

Variables

The app provides variables derived/enriched from the data available in Shopify APIs. Such variables are prefixed with two underscore symbols "__", e.g. {{ order.__metafields }}. All available variables and their values can be previewed when creating or editing a template.

Order

Admin REST API

can be embedded in your template via {{ order.note }} syntax. Similarly, you could use other fields such as line_items, name, total_price, etc.

The app shares most of the data. If there are any properties in the Shopify API's documentation not available in the app, please contact me and I'll add the missing properties.

Enriched order fields

Order money fields

For convenience, the app also provides their numeric equivalents in presentment currency fields without the _set postfix. For example, __total_refunded is a numeric presentment money amount of __total_refunded_set.

  • __total_refunded_set: a total sum of all subtotal_set within all available order refund refund_line_items for allorder.refunds.

  • __net_payment_set: order.current_total_price minus order.total_outstanding.

  • __total_outstanding_set: order.total_outstanding converted to a Shopify money bag containing amounts in shop and presentment currencies.

Order line_items money fields

  • __discounted_unit_price_set: order line's price_set minus all amount_set from line's discount_allocations.

  • __total_discount_set: a sum of all line's discount_allocations'amount_sets.

  • __original_total_set: line's price_set multiplied by quantity.

  • __discounted_total_set: __original_total_set minus __total_discount_set.

  • __current_final_price_set: line's__discounted_unit_price_set multiplied by line's __current_quantity.

Other order line_items fields

  • __current_quantity: line item's quantity minus all quantity from line's refund_line_items.

Other order fields

Shop

  • name

  • contact_email

  • primary_domain

  • myshopify_domain

  • billing_address

For consistency the variable naming format matches the one of REST API and other Shopify Liquid flavours, i.e. the camel case converted to the snake case. For example, Graphql's contactEmail is available via {{ shop.contact_email }} Liquid variable.

Filters

  • money: formats a presentment (customer's) money field in the format of order's customer_locale. The filter accepts Shopify money bag fields, e.g. {{ order.total_price_set | money }} or numeric presentment money equivalent (without the _set), e.g. {{ order.total_price | money }}.

  • format_address: formats an address into an HTML string (similar to Shopify's equivalent filter) with address lines separated by the line break <br> HTML tag. Example use: {{ shop.billing_address | format_money }}.

Thank you for following the guide. If there are any filters or data fields not available in the app, please email me at hello@galmis.com. If technically possible, I'm happy to add them with no extra cost.

The app queries the data from Shopify's Order . The order resource data is available inside the order variable with the same property names as documented in Shopify API's documentation. For example, the order note field that appears in the REST order resource documentation,

Money fields postfixed with _set contains prices in presentment (customer's) and shop currencies in the format defined in Shopify order resource's documentation.

__serializer_items: an array of unique serializer items for that specific order line item sourced for serializer's order metafield. Serializer item contains fields such as serialNumber , warrantyDuration, customFields, etc., which are documented in .

__metafields - extracted from the . Metafields can be accessed via order.__metafields.[metafield namespace here].[metafield key here], e.g. order.__metafields.serializer.properties.

The shop resource is currently limited to the following fields sourced from the :

Apart from the filters built in the , the app also provides a few convenience filters:

REST Admin API
https://galmis.gitbook.io/serializer-product-tracking/getting-started/development-api-reference/metafields#order
Shopify Metafields REST API
Graphql Admin API
Liquid language
Liquid templating language