# 顧客のタグを出力したい

**URL:** <https://community.shopify.com/t/topic/293504>\
**Category:** 技術的なQ＆A\
**Tags:** css, html\
**Created:** [February 7, 2024, 5:52am UTC](https://community.shopify.com/t/topic/293504 "2024-02-07T05:52:41Z")\
**Posts on this page:** 2\
**Page:** 1

## AI-generated summary

ユーザーがShopify Flowを使用して顧客の会員ランク（ブロンズ、シルバー、ゴールド）を作成し、顧客が自分のランクを確認できるようにタグを表示したいと質問しています。

**使用環境:**
- テーマ: Dawn
- 参考記事を基に実装中

**提案された解決策:**
回答者は、`account.liquid`などのアカウントページ関連ファイルに以下のようなコードを追加することを提案:

```liquid
{% for tag in customer.tags %}
  {% if tag contains "ブロンズ" or tag contains "シルバー" or tag contains "ゴールド" %}
    {{ tag }}
  {% endif %}
{% endfor %}
```

このコードは顧客のタグをループし、特定のランク名を含むタグのみを表示します。ただし、回答者はタグの全体像やテーマの詳細を把握していないため、詳細な回答は難しいと注記しています。

<div class="post-metadata">

**Author:** ![mira0](https://avatars.discourse-cdn.com/v4/letter/m/e68b1a/32.png) [@mira0](https://community.shopify.com/u/mira0)\
**Post date:** [February 7, 2024, 5:52am UTC](https://community.shopify.com/t/topic/293504/1 "2024-02-07T05:52:41Z")

</div>

現在、以下の記事を参考にしながらshopify flowを使用してお客様の会員ランクの作成をしています。

テーマはDawnを使用しています。

[https://rewired.cloud/shopify-flow-customer-rank/](https://rewired.cloud/shopify-flow-customer-rank/)

ブロンズランク、シルバーランク、ゴールドランクがあり、お客様は自分自身のランクを確認できるようにしたいです。

アカウントページなどに、付与したランクのタグを出力する方法などありましたら教えていただければ幸いです。

---

<div class="post-metadata">

**Author:** ![Anonymous\_44fbe07fc59d9ccaacd70575fd5a5155](https://yyz1.discourse-cdn.com/shopifyforum/user_avatar/community.shopify.com/anonymous_44fbe07fc59d9ccaacd70575fd5a5155/32/194200_2.png) [@Anonymous\_44fbe07fc59d9ccaacd70575fd5a5155](https://community.shopify.com/u/Anonymous_44fbe07fc59d9ccaacd70575fd5a5155)\
**Post date:** [February 7, 2024, 9:45am UTC](https://community.shopify.com/t/topic/293504/2 "2024-02-07T09:45:17Z")

</div>

Mira0様

ご質問を確認いたしました。

タグの全貌やテーマを把握していないため、詳細は回答できかねますが、

accout.liquid等アカウントページに関するファイルに、以下のようなコードを記載すれば良いのではないでしょうか？

```markup
{% for tag in customer.tags %}
  {% if tag contains "ブロンズ" or tag contains "シルバー" or tag contains "ゴールド" %}
    {{ tag }}
  {% endif %}
{% endfor %}

```

ご参考までに。
