📘 公式リファレンス📦 リファレンス/オブジェクト初級
shop オブジェクト
ストアの基本情報(ID、名前、URL、通貨、言語設定など)にアクセスするグローバルオブジェクト。テーマ全体で利用可能。
用途
ストア名をヘッダーに表示したり、shop.currency でストア通貨を確認したり、shop.url で自店舗 URL をメタデータに埋め込むときに使用する。
設置場所
任意の Liquid テンプレート(.liquid ファイル)内で {{ shop.id }}、{{ shop.name }}、{{ shop.currency }} のように直接参照する。
注意点
shop.locale と shop.enabled_locales は廃止予定で、現在の言語は request.locale、公開言語リストは shop.published_locales を代わりに使用する。shop.currency で取得できるのはストアの基本通貨のみで、複数通貨対応の場合は shop.enabled_currencies で取得した配列をループして確認する。
仕様
638 行 / json{
"access": {
"global": true,
"parents": [],
"template": []
},
"deprecated": false,
"deprecation_reason": "",
"description": "",
"properties": [
{
"deprecated": false,
"deprecation_reason": "",
"description": "",
"examples": [],
"return_type": [
{
"type": "string",
"name": "",
"description": "",
"array_value": ""
}
],
"summary": "The ID of the store.",
"name": "id"
},
{
"deprecated": false,
"deprecation_reason": "",
"description": "",
"examples": [],
"return_type": [
{
"type": "string",
"name": "",
"description": "",
"array_value": ""
}
],
"summary": "The name of the store.",
"name": "name"
},
{
"deprecated": false,
"deprecation_reason": "",
"description": "",
"examples": [],
"return_type": [
{
"type": "string",
"name": "",
"description": "",
"array_value": ""
}
],
"summary": "The [description](https://help.shopify.com/manual/online-store/setting-up/preferences#edit-the-title-and-meta-description)\nof the store.",
"name": "description"
},
{
"deprecated": false,
"deprecation_reason": "",
"description": "> Tip:\n> You can get the store's currency with [`shop.currency`](/docs/api/liquid/objects/shop#shop-currency).",
"examples": [],
"return_type": [
{
"type": "array",
"name": "",
"description": "",
"array_value": "currency"
}
],
"summary": "The currencies that the store accepts.",
"name": "enabled_currencies"
},
{
"deprecated": false,
"deprecation_reason": "",
"description": "",
"examples": [],
"return_type": [
{
"type": "array",
"name": "",
"description": "",
"array_value": "shop_locale"
}
],
"summary": "The locales (languages) that are published on the store.",
"name": "published_locales"
},
{
"deprecated": true,
"deprecation_reason": "Deprecated because the name didn't make it clear that the returned locales were published.\n\nThe `shop.enabled_locales` property has been replaced by [`shop.published_locales`](/docs/api/liquid/objects/shop#shop-published_locales).",
"description": "",
"examples": [],
"return_type": [
{
"type": "array",
"name": "",
"description": "",
"array_value": "shop_locale"
},
{
"type": "array",
"name": "",
"description": "",
"array_value": "shop_locale"
}
],
"summary": "The locales (languages) that are published on the store.",
"name": "enabled_locales"
},
{
"deprecated": true,
"deprecation_reason": "Deprecated because this value is contextual to the request and not a property of the shop resource.\n\nThe `shop.locale` property has been replaced by [request.locale](/docs/api/liquid/objects/request#request-locale).",
"description": "",
"examples": [],
"return_type": [
{
"type": "shop_locale",
"name": "",
"description": "",
"array_value": ""
}
],
"summary": "The currently active locale (language).",
"name": "locale"
},
{
"deprecated": false,
"deprecation_reason": "",
"description": "",
"examples": [],
"return_type": [
{
"type": "string",
"name": "",
"description": "",
"array_value": ""
}
],
"summary": "The full URL of the store.",
"name": "url"
},
{
"deprecated": false,
"deprecation_reason": "",
"description": "",
"examples": [],
"return_type": [
{
"type": "string",
"name": "",
"description": "",
"array_value": ""
}
],
"summary": "The [sender email](https://help.shopify.com/manual/intro-to-shopify/initial-setup/setup-your-email#change-your-sender-email-address)\nof the store.",
"name": "email"
},
{
"deprecated": false,
"deprecation_reason": "",
"description": "",
"examples": [],
"return_type": [
{
"type": "string",
"name": "",
"description": "",
"array_value": ""
}
],
"summary": "The full URL of the store, with an `https` protocol.",
"name": "secure_url"
},
{
"deprecated": false,
"deprecation_reason": "",
"description": "",
"examples": [],
"return_type": [
{
"type": "string",
"name": "",
"description": "",
"array_value": ""
}
],
"summary": "The primary domain of the store.",
"name": "domain"
},
{
"deprecated": false,
"deprecation_reason": "",
"description": "",
"examples": [],
"return_type": [
{
"type": "string",
"name": "",
"description": "",
"array_value": ""
}
],
"summary": "The `.myshopify.com` domain of the store.",
"name": "permanent_domain"
},
{
"deprecated": false,
"deprecation_reason": "",
"description": "",
"examples": [],
"return_type": [
{
"type": "string",
"name": "",
"description": "",
"array_value": ""
}
],
"summary": "The phone number of the store.",
"name": "phone"
},
{
"deprecated": false,
"deprecation_reason": "",
"description": "",
"examples": [],
"return_type": [
{
"type": "string",
"name": "",
"description": "",
"array_value": ""
}
],
"summary": "The password page message of the store.",
"name": "password_message"
},
{
"deprecated": false,
"deprecation_reason": "",
"description": "",
"examples": [],
"return_type": [
{
"type": "address",
"name": "",
"description": "",
"array_value": ""
}
],
"summary": "The address of the store.",
"name": "address"
},
{
"deprecated": false,
"deprecation_reason": "",
"description": "",
"examples": [],
"return_type": [
{
"type": "boolean",
"name": "",
"description": "",
"array_value": ""
}
],
"summary": "Returns `true` if the store shows a login link. Returns `false` if not.",
"name": "customer_accounts_enabled"
},
{
"deprecated": false,
"deprecation_reason": "",
"description": "",
"examples": [],
"return_type": [
{
"type": "boolean",
"name": "",
"description": "",
"array_value": ""
}
],
"summary": "Returns `true` if customer accounts are optional to complete checkout. Returns `false` if not.",
"name": "customer_accounts_optional"
},
{
"deprecated": false,
"deprecation_reason": "",
"description": "",
"examples": [],
"return_type": [
{
"type": "string",
"name": "",
"description": "",
"array_value": ""
}
],
"summary": "The currency of the store.",
"name": "currency"
},
{
"deprecated": false,
"deprecation_reason": "",
"description": "",
"examples": [],
"return_type": [
{
"type": "currency",
"name": "",
"description": "",
"array_value": ""
}
],
"summary": "The money format of the store.",
"name": "money_format"
},
{
"deprecated": false,
"deprecation_reason": "",
"description": "",
"examples": [],
"return_type": [
{
"type": "currency",
"name": "",
"description": "",
"array_value": ""
}
],
"summary": "The money format of the store with the currency included.",
"name": "money_with_currency_format"
},
{
"deprecated": false,
"deprecation_reason": "",
"description": "> Tip:\n> To learn about how to create metafields, refer to [Create and manage metafields](/apps/metafields/manage) or visit\n> the [Shopify Help Center](https://help.shopify.com/manual/metafields).",
"examples": [],
"return_type": [],
"summary": "The [metafields](/docs/api/liquid/objects/metafield) applied to the store.",
"name": "metafields"
},
{
"deprecated": false,
"deprecation_reason": "",
"description": "The payment types are based on the store's enabled [payment providers](https://help.shopify.com/manual/payments) and\nthe customer's current region and currency.\n\n> Tip:\n> You can output an `svg` logo for each payment type with the [`payment_type_svg_tag` filter](/docs/api/liquid/filters/payment_type_svg_tag).\n> Alternatively, you can get the source URL for each `svg` with the [`payment_type_img_url` filter](/docs/api/liquid/filters/payment_type_img_url).",
"examples": [],
"return_type": [
{
"type": "array",
"name": "",
"description": "",
"array_value": "string"
}
],
"summary": "The accepted payment types on the store.",
"name": "enabled_payment_types"
},
{
"deprecated": true,
"deprecation_reason": "Deprecated because whether or not prices have taxes included is dependent on the customer's country.\n\nThe `shop.taxes_included` property has been replaced by [cart.taxes_included](/docs/api/liquid/objects/cart#cart-taxes_included).",
"description": "",
"examples": [],
"return_type": [
{
"type": "boolean",
"name": "",
"description": "",
"array_value": ""
}
],
"summary": "Returns `true` if prices include taxes. Returns `false` if not.",
"name": "taxes_included"
},
{
"deprecated": false,
"deprecation_reason": "",
"description": "",
"examples": [],
"return_type": [
{
"type": "policy",
"name": "",
"description": "",
"array_value": ""
}
],
"summary": "The refund policy for the store.",
"name": "refund_policy"
},
{
"deprecated": false,
"deprecation_reason": "",
"description": "",
"examples": [],
"return_type": [
{
"type": "policy",
"name": "",
"description": "",
"array_value": ""
}
],
"summary": "The shipping policy for the store.",
"name": "shipping_policy"
},
{
"deprecated": false,
"deprecation_reason": "",
"description": "",
"examples": [],
"return_type": [
{
"type": "policy",
"name": "",
"description": "",
"array_value": ""
}
],
"summary": "The privacy policy for the store.",
"name": "privacy_policy"
},
{
"deprecated": false,
"deprecation_reason": "",
"description": "",
"examples": [],
"return_type": [
{
"type": "policy",
"name": "",
"description": "",
"array_value": ""
}
],
"summary": "The terms of service for the store.",
"name": "terms_of_service"
},
{
"deprecated": false,
"deprecation_reason": "",
"description": "",
"examples": [],
"return_type": [
{
"type": "policy",
"name": "",
"description": "",
"array_value": ""
}
],
"summary": "The subscription policy for the store.",
"name": "subscription_policy"
},
{
"deprecated": false,
"deprecation_reason": "",
"description": "The policies are set in the store's [Policies settings](https://www.shopify.com/admin/settings/legal).",
"examples": [
{
"name": "Output the policies",
"description": "",
"syntax": "",
"path": "/",
"raw_liquid": "<ul>\n{%- for policy in shop.policies %}\n <li>{{ policy.title }}</li>\n{%- endfor %}\n</ul>",
"parameter": false,
"display_type": "text",
"show_data_tab": true
}
],
"return_type": [
{
"type": "array",
"name": "",
"description": "",
"array_value": "policy"
}
],
"summary": "The policies for the store.",
"name": "policies"
},
{
"deprecated": false,
"deprecation_reason": "",
"description": "",
"examples": [
{
"name": "Output the vendors",
"description": "",
"syntax": "",
"path": "/",
"raw_liquid": "{% for vendor in shop.vendors %}\n {{- vendor | link_to_vendor }}\n{% endfor %}",
"parameter": false,
"display_type": "text",
"show_data_tab": true
}
],
"return_type": [
{
"type": "array",
"name": "",
"description": "",
"array_value": "string"
}
],
"summary": "All of the product vendors for the store.",
"name": "vendors"
},
{
"deprecated": false,
"deprecation_reason": "",
"description": "",
"examples": [
{
"name": "Output the product types",
"description": "",
"syntax": "",
"path": "/",
"raw_liquid": "{% for type in shop.types %}\n {{- type | link_to_type }}\n{% endfor %}",
"parameter": false,
"display_type": "text",
"show_data_tab": true
}
],
"return_type": [
{
"type": "array",
"name": "",
"description": "",
"array_value": "string"
}
],
"summary": "All of the product types in the store.",
"name": "types"
},
{
"deprecated": false,
"deprecation_reason": "",
"description": "Search types are `[\"article\", \"page\", \"product\"]` by default, and can be configured in the Search & Discovery app.\nThese search types are used when a search query is performed without a `?type=` parameter.\n\n> Tip:\n> A search with a `?type=` parameter value not in the `shop.search_types` list will still return results for the specified type, if they exist.",
"examples": [],
"return_type": [
{
"type": "array",
"name": "",
"description": "",
"array_value": "string"
}
],
"summary": "The resource types searched for by default when no `type` parameter is specified.",
"name": "search_types"
},
{
"deprecated": false,
"deprecation_reason": "",
"description": "",
"examples": [],
"return_type": [
{
"type": "number",
"name": "",
"description": "",
"array_value": ""
}
],
"summary": "The number of products in the store.",
"name": "products_count"
},
{
"deprecated": false,
"deprecation_reason": "",
"description": "",
"examples": [],
"return_type": [
{
"type": "number",
"name": "",
"description": "",
"array_value": ""
}
],
"summary": "The number of collections in the store.",
"name": "collections_count"
},
{
"deprecated": false,
"deprecation_reason": "",
"description": "",
"examples": [],
"return_type": [
{
"type": "boolean",
"name": "",
"description": "",
"array_value": ""
}
],
"summary": "Returns `true` if the store accepts gift cards. Returns `false` if not.",
"name": "accepts_gift_cards"
},
{
"deprecated": false,
"deprecation_reason": "",
"description": "",
"examples": [],
"return_type": [
{
"type": "brand",
"name": "",
"description": "",
"array_value": ""
}
],
"summary": "The [brand assets](https://help.shopify.com/manual/promoting-marketing/managing-brand-assets) for the store.",
"name": "brand"
},
{
"deprecated": true,
"deprecation_reason": "The `shop.metaobjects` property has been replaced by [`metaobjects`](/docs/api/liquid/objects/metaobjects).",
"description": "",
"examples": [],
"return_type": [],
"summary": "All of the [metaobjects](/docs/api/liquid/objects/metaobject) of the store.",
"name": "metaobjects"
}
],
"summary": "Information about the store, such as the store address, the total number of products, and various settings.",
"name": "shop",
"examples": [],
"json_data": {
"path": "/",
"handle": "shop",
"data_from_file": ""
},
"return_type": []
}出典・ライセンス
- Repository:
- https://github.com/Shopify/theme-liquid-docs
- 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 行