Liquid Snippets by ALSEL
📘 公式リファレンス📦 リファレンス/オブジェクト初級

fulfillment オブジェクト

注文の配送実績情報を保持するオブジェクト。配送日時、追跡番号、配送事業者、配送対象商品などを参照できる。

用途
注文確認メールや顧客アカウントページで、配送状況と追跡情報をユーザーに表示するとき。
設置場所
Liquid テンプレート内で `{{ line_item.fulfillment.tracking_number }}` や `{{ line_item.fulfillment.created_at | date: '%Y年%m月%d日' }}` のように参照する。line_item を経由して fulfillment にアクセスするため、商品ループの内側で使う。
注意点
fulfillment は line_item に紐づくため、未配送の商品に対して fulfillment プロパティを参照すると `nil` が返される。tracking_number と tracking_url も同様に未設定なら `nil` となるため、テンプレート内では `{% if line_item.fulfillment %} ... {% endif %}` で存在確認してから出力する。created_at は UNIX タイムスタンプであり、表示時には必ず date フィルターで日本語形式に整形する。
タグ:fulfillmentorderline-itemtrackingshipment

仕様

138 行 / json
{
  "access": {
    "global": false,
    "parents": [
      {
        "object": "line_item",
        "property": "fulfillment"
      }
    ],
    "template": []
  },
  "deprecated": false,
  "deprecation_reason": "",
  "description": "",
  "properties": [
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "> Tip:\n> Use the [`date` filter](/docs/api/liquid/filters/date) to format the timestamp.",
      "examples": [],
      "return_type": [
        {
          "type": "string",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "A timestamp for when the fulfillment was created.",
      "name": "created_at"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "number",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The number of items in the fulfillment.",
      "name": "item_count"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "array",
          "name": "",
          "description": "",
          "array_value": "line_item"
        }
      ],
      "summary": "The line items in the fulfillment.",
      "name": "fulfillment_line_items"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "string",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The name of the fulfillment service.",
      "name": "tracking_company"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "array",
          "name": "",
          "description": "",
          "array_value": "string"
        }
      ],
      "summary": "An array of the fulfillment's tracking numbers.",
      "name": "tracking_numbers"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "If there's no tracking number, then `nil` is returned.",
      "examples": [],
      "return_type": [
        {
          "type": "string",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The fulfillment's tracking number.",
      "name": "tracking_number"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "If there's no tracking number, then `nil` is returned.",
      "examples": [],
      "return_type": [
        {
          "type": "string",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The URL for the fulfillment's tracking number.",
      "name": "tracking_url"
    }
  ],
  "summary": "An order [fulfillment](https://help.shopify.com/manual/orders/fulfillment), which includes information like the line items\nbeing fulfilled and shipment tracking.",
  "name": "fulfillment",
  "examples": [],
  "json_data": {
    "path": "/",
    "handle": "customer.orders[4].line_items[0].fulfillment",
    "data_from_file": ""
  },
  "return_type": []
}

出典・ライセンス

License:
MIT

このコードは Shopify 著作の MIT ライセンスソースです。 原本の著作権は Shopify が保有します。日本語訳は ALSEL によるものです。

関連項目

📘 公式リファレンス📦 リファレンス/オブジェクト初級

content_for_header オブジェクト

Shopify が必要とするスクリプト(分析・チェックアウト・言語設定など)をすべて動的に出力するオブジェクト。theme.liquid の <head> タグ内に埋め込む必須要素。

📁 theme-liquid-docs·MIT·20
📘 公式リファレンス📦 リファレンス/オブジェクト中級

metaobjects オブジェクト

ストア全体のメタオブジェクト定義にアクセスするグローバルオブジェクト。個別のメタオブジェクトはタイプとハンドルで参照でき、メタオブジェクト定義のエントリをループで反復処理できる。

📁 theme-liquid-docs·MIT·20
📘 公式リファレンス📦 リファレンス/オブジェクト初級

additional_checkout_buttons オブジェクト

PayPal Express Checkout など、オフサイト決済に対応した外部決済プロバイダーがストアに設定されているかを真偽値で返す。`content_for_additional_checkout_buttons` と組み合わせて、該当するチェックアウトボタンを条件付きで表示する。

📁 theme-liquid-docs·MIT·27
📘 公式リファレンス📦 リファレンス/オブジェクト初級

canonical_url オブジェクト

現在のページの正規 URL を取得するオブジェクト。Google などの検索エンジンに対してどのページ版が正規であるかを指定するために使用する。

📁 theme-liquid-docs·MIT·27
📘 公式リファレンス📦 リファレンス/オブジェクト初級

content_for_index オブジェクト

ホームページに表示するセクションの内容を動的に返すオブジェクト。Liquid インデックステンプレートで必ず使用する。

📁 theme-liquid-docs·MIT·27
📘 公式リファレンス📦 リファレンス/オブジェクト初級

content_for_additional_checkout_buttons オブジェクト

PayPal、Apple Pay、Google Pay など複数の決済プロバイダが有効になっているとき、その決済ボタンを HTML として出力するオブジェクト。`additional_checkout_buttons` で有無を判定したうえで、このオブジェクトで実際のボタンを表示する。

📁 theme-liquid-docs·MIT·27