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

store_availability オブジェクト

バリアント在庫の店舗別情報(在庫可否・ピックアップ対応・受取準備時間)を取得するオブジェクト。店舗受取機能が有効な場所のデータのみ存在する。

用途
商品ページで「この店舗で受け取り可能」「受取まで○日」といった店舗別在庫・ピックアップ情報をユーザーに表示するとき。
設置場所
product.liquid の商品詳細セクション内で `{{ product.selected_variant.store_availabilities[0].available }}` のようにアクセスし、各プロパティで在庫状況・受取対応・受取時間を参照する。
注意点
store_availability は店舗受取(local pickup)が1つ以上の場所で有効になっていることが前提。対象バリアントが在庫のない店舗では store_availability オブジェクト自体が存在しないため、ループ処理時に存在チェックが不要なカウント・配列アクセスとする。pick_up_time は Shopify 管理画面の店舗ピックアップ設定で指定した値であり、ストア側で事前設定が必須。
タグ:store-availabilityinventorylocal-pickuplocationvariant

仕様

90 行 / json
{
  "access": {
    "global": false,
    "parents": [
      {
        "object": "variant",
        "property": "store_availabilities"
      }
    ],
    "template": []
  },
  "deprecated": false,
  "deprecation_reason": "",
  "description": "If a location doesn't stock a variant, then there won't be a `store_availability` for that variant and location.\n\n> Note:\n> The `store_availability` object is defined only if one or more locations has [local pickup](https://help.shopify.com/manual/shipping/setting-up-and-managing-your-shipping/local-methods/local-pickup)\n> enabled.",
  "properties": [
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "boolean",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "Returns `true` if the variant has available inventory at the location. Returns `false` if not.",
      "name": "available"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "boolean",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "Returns `true` if the location has pickup enabled. Returns `false` if not.",
      "name": "pick_up_enabled"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "> Tip:\n> This value can be configured in the Shopify admin. To learn more, visit the [Shopify Help Center](https://help.shopify.com/en/manual/sell-in-person/shopify-pos/order-management/local-pickup-for-online-orders#manage-preferences-for-a-local-pickup-location).",
      "examples": [],
      "return_type": [
        {
          "type": "string",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The amount of time that it takes for pickup orders to be ready at the location.",
      "name": "pick_up_time"
    },
    {
      "deprecated": false,
      "deprecation_reason": "",
      "description": "",
      "examples": [],
      "return_type": [
        {
          "type": "location",
          "name": "",
          "description": "",
          "array_value": ""
        }
      ],
      "summary": "The location that the variant is stocked at.",
      "name": "location"
    }
  ],
  "summary": "A variant's inventory information for a physical store location.",
  "name": "store_availability",
  "examples": [],
  "json_data": {
    "path": "/products/health-potion?variant=39897499729985",
    "handle": "product.selected_variant.store_availabilities[0]",
    "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