📘 公式リファレンス🔧 リファレンス/フィルター初級
login_button フィルター(顧客ログインボタンの生成)
Shop アカウントでの顧客ログイン、または Shop アプリ内でのストアフォロー機能付きのボタンを HTML として生成する。
用途
ストアヘッダーやナビゲーションメニュー内にログインボタンを配置するとき。顧客の認証と同時に Shop アプリでのフォロー動線を提供したい場合に使用する。
設置場所
header やナビゲーション関連のテンプレート内で `{{ shop | login_button }}` または `{{ shop | login_button: action: 'follow' }}` の形で使う。
注意点
このフィルターを使う場合、`shop` オブジェクトがテンプレート内で有効に読み込まれていることが前提となる。`action: 'follow'` オプションを指定する場合、Shop アプリでのフォロー機能を有効化する別途の設定が必要になる。詳細は Shopify 管理画面のショップ設定と Shop アプリドキュメントで確認する。
仕様
50 行 / json{
"category": "customer",
"deprecated": false,
"deprecation_reason": "",
"description": "> Note:\n> The presence of the [shop](/docs/api/liquid/objects/shop) object is required for validation purposes only.",
"parameters": [
{
"description": "The action to be performed. Accepts the following values: default, follow.",
"name": "action",
"positional": false,
"required": false,
"types": [
"string"
]
}
],
"return_type": [
{
"type": "string",
"name": "",
"description": "",
"array_value": ""
}
],
"examples": [
{
"name": "",
"description": "",
"syntax": "",
"path": "",
"raw_liquid": "",
"parameter": false,
"display_type": "text",
"show_data_tab": true
},
{
"name": "action",
"description": "Controls the behavior of the button after authentication.\n\nAccepts the following values:\n\n- `default` - Authentication only\n- `follow` - Performs a side-effect after authentication which follows the current shop in the Shop app. Requires additional configuration. [Learn more](https://help.shopify.com/manual/online-store/themes/customizing-themes/follow-on-shop)\n\n```liquid\n{{ shop | login_button: action: 'follow' }}\n```\n",
"syntax": "shop | login_button: action: string",
"path": "",
"raw_liquid": "",
"parameter": true,
"display_type": "text",
"show_data_tab": true
}
],
"summary": "Generates an HTML Button that enables a customer to either sign in to the storefront using their Shop account or follow the shop in the Shop App.",
"syntax": "shop | login_button",
"name": "login_button"
}出典・ライセンス
- Repository:
- https://github.com/Shopify/theme-liquid-docs
- License:
- MIT
このコードは Shopify 著作の MIT ライセンスソースです。 原本の著作権は Shopify が保有します。日本語訳は ALSEL によるものです。
関連項目
📘 公式リファレンス🔧 リファレンス/フィルター初級
avatar フィルター(顧客アバター画像HTML生成)
顧客アバターが存在する場合、それを表示する HTML タグを生成するフィルター。customer オブジェクトに対して使用する。
📁 theme-liquid-docs·MIT·19 行
📘 公式リファレンス🔧 リファレンス/フィルター初級
default_errors フィルター(フォーム送信エラーを日本語化)
form.errors の各エラーコードに対応する既定のエラーメッセージを自動生成するフィルター。フォーム送信時の入力値不正や必須項目空白などのエラーを言語別に出力する。
📁 theme-liquid-docs·MIT·19 行
📘 公式リファレンス🔧 リファレンス/フィルター初級
date フィルター(日付を指定形式でフォーマット)
日付値を指定されたフォーマット文字列に従って整形する。フォーマット文字列が空の場合は元の値がそのまま返される。入力が日付に変換できない場合も元の値が返される。
📁 theme-liquid-docs·MIT·19 行
📘 公式リファレンス🔧 リファレンス/フィルター初級
payment_terms フィルター(Shop Pay分割払いバナーを生成)
product フォームまたは cart フォームに対して使用し、Shop Pay の分割払いオプションを表示するための HTML を生成するフィルター。顧客が購入時に分割払いプランを選択できるようにする。
📁 theme-liquid-docs·MIT·19 行
📘 公式リファレンス🔧 リファレンス/フィルター初級
abs フィルター(数値の絶対値を取得)
負の数を正の数に変換する。数値の絶対値(ゼロからの距離)を返すフィルター。
📁 theme-liquid-docs·MIT·30 行
📘 公式リファレンス🔧 リファレンス/フィルター初級
append フィルター(文字列の末尾に追加)
文字列の末尾に別の文字列を連結するフィルター。URL パスの結合やテキストの接尾辞追加に使う。
📁 theme-liquid-docs·MIT·30 行