Shopify の注文確認メール、納品書、スタッフ向けの注文通知には、購入者がパーソナライズした内容ではなく商品が表示されます。Customix はすべての注文明細にデザイン画像とオプションをすでに保存しています。各テンプレートに短いコードを貼り付けると、パーソナライズされた商品ごとに次の内容が表示されます。

  • デザイン画像
  • 購入者が選択したオプション(技術的なフィールドは非表示で、アップロードされた写真は "View image" リンクになります)
  • メールでは、デザインを開き直せる "View your design" リンク

デザインのない商品はこれまでどおり表示されます。

コードは Customix アプリの 設定 > 連携 > Store notifications にある 通知テンプレート用コード カードで確認できます。テンプレートごとにタブがあり、各コードに コピー ボタンがあります。手順 1 のテンプレート名は、Shopify admin で該当のテンプレートを開くリンクです。

注文確認メール(注文確認 タブ)

1. テンプレートを開きます: Shopify admin > Settings > Notifications > Customer notifications > Order confirmation > Edit code(https://YOUR-STORE.myshopify.com/admin/email_templates/order_confirmation/edit)。

2. コード内で最初の {{ line.variant.title }} を探し、その後ろにある {% endif %} の直後に次のコードを貼り付けます。

<div class="customix-options">
  {% for property in line.properties %}
    {% if property.first == '_cm-thumb-url' and property.last != blank %}
      <img src="{{ property.last }}" width="120" alt="" style="display:block;width:120px;max-width:120px;height:auto;margin:4px 0;border-radius:8px;"/>
    {% endif %}
  {% endfor %}
  {% for property in line.properties %}
    {% assign cm_first_char = property.first | slice: 0 %}
    {% if property.last != blank and cm_first_char != '_' %}
      {{ property.first }}: {% if property.last contains 'https://' %}<a href="{{ property.last }}">View image</a>{% else %}{{ property.last }}{% endif %}<br/>
    {% endif %}
    {% if property.first == '_cm-customization-url' and property.last != blank %}
      <a href="{{ property.last }}">View your design</a><br/>
    {% endif %}
  {% endfor %}
</div>

3. Shopify のバンドルを販売していますか? 最初の {{ component.quantity }} を探し、その後ろにある <br> の直後に次のコードを貼り付けます。

<div class="customix-options">
  {% for property in component.properties %}
    {% if property.first == '_cm-thumb-url' and property.last != blank %}
      <img src="{{ property.last }}" width="120" alt="" style="display:block;width:120px;max-width:120px;height:auto;margin:4px 0;border-radius:8px;"/>
    {% endif %}
  {% endfor %}
  {% for property in component.properties %}
    {% assign cm_first_char = property.first | slice: 0 %}
    {% if property.last != blank and cm_first_char != '_' %}
      {{ property.first }}: {% if property.last contains 'https://' %}<a href="{{ property.last }}">View image</a>{% else %}{{ property.last }}{% endif %}<br/>
    {% endif %}
    {% if property.first == '_cm-customization-url' and property.last != blank %}
      <a href="{{ property.last }}">View your design</a><br/>
    {% endif %}
  {% endfor %}
</div>

4. テンプレートを保存し、テスト注文を行って確認します。

納品書(納品書 タブ)

1. テンプレートを開きます: Shopify admin > Settings > Shipping and delivery > Packing slips > Edit(https://YOUR-STORE.myshopify.com/admin/settings/packing_slip_template)。

2. 最初の {{ line_item.sku }} を探し、その後ろにある </p> の直後に次のコードを貼り付けます。

<div class="customix-options">
  {% for property in line_item.properties %}
    {% if property.first == '_cm-thumb-url' and property.last != blank %}
      <img src="{{ property.last }}" width="120" alt="" style="display:block;width:120px;max-width:120px;height:auto;margin:4px 0;border-radius:8px;"/>
    {% endif %}
  {% endfor %}
  {% for property in line_item.properties %}
    {% assign cm_first_char = property.first | slice: 0 %}
    {% if property.last != blank and cm_first_char != '_' %}
      {{ property.first }}: {% if property.last contains 'https://' %}<a href="{{ property.last }}">View image</a>{% else %}{{ property.last }}{% endif %}<br/>
    {% endif %}
  {% endfor %}
</div>

3. テンプレートを保存します。

納品書は印刷物のため、"View your design" リンクはありません。

スタッフ向け通知メール(新規注文 タブ)

1. テンプレートを開きます: Shopify admin > Settings > Notifications > Staff notifications > New order > Edit code(https://YOUR-STORE.myshopify.com/admin/email_templates/new_order_notification/edit)。

2. 最初の {{ line.sku }} を探し、その後ろにある {% endif %} の直後に、注文確認の手順 2 と同じコードを貼り付けます。

3. バンドルを販売していますか? 最初の {{ component_display }} を探し、その後ろにある <br> の直後に、バンドル用コード(注文確認の手順 3)を貼り付けます。

4. バンドルを販売していますか? 最初の {{ component.quantity }} を探し、その後ろにある {% endif %} の直後に、バンドル用コードを貼り付けます。

5. テンプレートを保存します。

補足

  • 手順は Shopify の標準テンプレートに基づいています。テンプレートを変更している場合は、商品名またはオプションが表示されている箇所にコードを貼り付けてください。
  • バンドル用の手順は、Shopify のバンドルを販売している場合のみ必要です。
  • 元に戻すには、貼り付けたコードを削除するか、Shopify の Revert to default を使用します。
  • コード内の "View image" と "View your design" の文言や、画像の幅(120)は変更できます。
  • デザイン画像がない場合 購入者がカートに商品を追加したときにデザイン画像を保存できなかった場合、その明細にはオプションのみが画像なしで表示されます。