{{ name }},也可以透過 order 使用,例如 {{ order.name }}。兩種寫法效果相同。這些變數沿用 Shopify Order Printer 的變數,因此大多數 Order Printer 範本可直接在 Foliant 中使用。
程式碼編輯器中的 Liquid 變數分頁列出所有變數,並提供搜尋功能。本文介紹您最常用的變數。金額以分為單位;請參閱範本中的金額與幣別。
訂單
總計
請使用金額篩選器輸出總計,例如{{ total_price | money }}。
另外也可使用
current_subtotal_price、current_total_discounts、current_total_tax 和 current_total_price。
顧客與地址
每個地址(
shipping_address、billing_address 和 customer.default_address)都有 name、first_name、last_name、company、address1、address2、street、city、province、province_code、zip、country、country_code、phone 和 city_province_zip。{% if shipping_address.member_of_eu %} 可檢查該國家是否屬於歐盟。
您的商店
運送、付款和出貨
範例
小提醒
- 空值不會輸出任何內容。若沒有值時想省略標籤,請使用
{% if … != blank %}。 - 適用於所有選取訂單的範本會使用
orders(以{% for order in orders %}逐一處理)、batch和pick_list,而非單筆訂單。請參閱 Liquid 變數分頁中的 批次範本 區段。 - 若是加值稅發票,請參閱參考資料中的 加值稅 區段:
tax_breakdown、buyer.vat_number、{% include 'vat_breakdown' %}和{% include 'legal_notes' %}。另請參閱稅務與法律。