注文確認メールに「チケットを表示する」ボタンを設置する方法

注文確認メールに「チケットを表示する」ボタンを設置する方法

「チケット&予約管理.amp」では、Shopifyの注文確認メールに チケットを表示する ボタンを設置できます。 お客様がボタンを押すとストアに移動し、チケット一覧が自動で開きます。

注文確認メールに表示された「チケットを表示する」ボタン

💡未ログインの場合は「チケットの一覧は、ログインすることで確認できます。」と表示されます。表示のログインリンクからログイン後は元のページに戻り、チケット一覧が開きます。

💡ご利用には、テーマでアプリ埋め込み「Ticket List Floating Bar」が有効になっている必要があります。

■設定の流れ

1. 4つのパターンから、ご運用に合うものを選びます。

2. (パターン3・4を使う場合)チケット対象商品に商品タグを設定します。

3. Shopify管理画面の注文確認メールのテンプレートにコードを貼り付けます。

4. 必要に応じて文言・色・タグ名を変更します。

■1. パターンを選ぶ

ご運用に合わせて、次の4つからお選びください。

「スニペットのみ」はテンプレートの任意の位置に貼り付けるコードです。「メール全体コード」はテンプレート全体を置き換えるコードで、デフォルトのテンプレートの「注文サマリー」の直前にボタンが入った状態になります。

💡すでにメールテンプレートを独自に変更されている場合、メール全体コード(パターン2・4)に置き換えるとその変更内容は失われます。独自の変更がある場合は、パターン1または3のスニペットをお使いください。

■パターン1:全注文に表示(スニペットのみ)

すべての注文で常にボタンを表示します。チケット対象外の商品のみを購入された場合も表示されます。

{% comment %}==== チケット表示ボタン ここから ====

  文言を変える場合: ticket_button_label の値を変更
  色を変える場合  : 既定ではメール内の他のボタンと同じ色になります。
                    変える場合は下の <td class="button__cell"> に
                    bgcolor="#RRGGBB" style="background-color:#RRGGBB;" を追加

==== {% endcomment %}
{%- assign ticket_button_label = 'チケットを表示する' -%}
<table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr>
    <td align="center" style="padding: 15px 0;">
      <table class="button" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="button__cell">
            <a href="{{ shop.url }}?open-tickets=1" class="button__text">{{ ticket_button_label }}</a>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
{% comment %}==== チケット表示ボタン ここまで ===={% endcomment %}

■パターン2:全注文に表示(メール全体コード)

パターン1を組み込み済みのメール全体コードです。

パターン2のコードを表示する
{% assign delivery_method_types = delivery_agreements | map: 'delivery_method_type' | uniq %}
{% assign has_split_cart = false %}
{% assign non_none_count = 0 %}
{% for type in delivery_method_types %}
  {% unless type == 'none' %}
    {% assign non_none_count = non_none_count | plus: 1 %}
  {% endunless %}
{% endfor %}
{% if non_none_count > 1 %}
  {% assign has_split_cart = true %}
{% endif %}

{% assign non_none_agreements_count = 0 %}
{% for agreement in delivery_agreements %}
  {% unless agreement.delivery_method_type == 'none' %}
    {% assign non_none_agreements_count = non_none_agreements_count | plus: 1 %}
  {% endunless %}
{% endfor %}

{% capture email_title %}
  ご注文頂きありがとうございました。
{% endcapture %}
{% capture email_body %}
  {% if has_pending_payment %}
    {% if buyer_action_required %}
      支払い完了後、確認メールが届きます。
    {% else %}
      決済が処理されています。注文が確認されるとメールが届きます。
    {% endif %}
  {% elsif payment_charged_on_fulfillment %}
    {{ customer.last_name }}様 様、ご注文を承りました。ご注文の発送準備が整った時点で、決済方法に請求されます。商品が発送されましたら、お知らせいたします。
  {% else %}
    {% if requires_shipping %}
      {% if has_split_cart %}
        {% case split_cart_delivery_method %}
          {% when 'pick-up' %}
            注文の受取の準備が整うと、メールが届きます。
          {% when 'local' %}
            {{ customer.last_name }}様様、ご注文の品を配達する準備を行っております。
          {% when 'shipping' %}
            注文の発送準備を行なっております。商品を発送いたしましたら、改めてお知らせいたします。
          {% else %}
            注文の発送準備を行なっております。商品を発送いたしましたら、改めてお知らせいたします。
        {% endcase %}
      {% else %}
        {% case delivery_method %}
          {% when 'pick-up' %}
            注文の受取の準備が整うと、メールが届きます。
          {% when 'local' %}
            {{ customer.last_name }}様様、ご注文の品を配達する準備を行っております。
          {% else %}
            注文の発送準備を行なっております。商品を発送いたしましたら、改めてお知らせいたします。
        {% endcase %}
      {% endif %}
        {% if delivery_instructions != blank  %}
          <p><b>配達情報:</b> {{ delivery_instructions }}</p>
        {% endif %}
      {% unless delivery_method_types.size > 1 %}
        {% if consolidated_estimated_delivery_time %}
          {% if non_none_agreements_count > 1 %}
            <h3 class="estimated_delivery__title">配達予定</h3>
            <p>{{ consolidated_estimated_delivery_time }}</p>
          {% else %}
            <p>
              配達予定 <b>{{ consolidated_estimated_delivery_time }}</b>
            </p>
          {% endif %}
        {% endif %}
      {% endunless %}
    {% endif %}
  {% endif %}
  {% assign gift_card_line_items = line_items | where: "gift_card" %}
  {% assign found_gift_card_with_recipient_email = false %}
  {% for line_item in gift_card_line_items %}
    {% if line_item.properties["__shopify_send_gift_card_to_recipient"] and line_item.properties["Recipient email"] %}
      {% assign found_gift_card_with_recipient_email = true %}
      {% break %}
    {% endif %}
  {% endfor %}
  {% if found_gift_card_with_recipient_email %}
    <p>ギフトカードの受取人には、ギフトカードコードが記載されたメールが届きます。</p>
  {% elsif gift_card_line_items.first %}
    <p>ギフトカードの個別のメールが届きます。</p>
  {% endif %}
{% endcapture %}

<!DOCTYPE html>
<html lang="ja">
  <head>
  <title>{{ email_title }}</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta name="viewport" content="width=device-width">
  <link rel="stylesheet" type="text/css" href="/assets/notifications/styles.css">
  <style>
    .button__cell { background: {{ shop.email_accent_color }}; }
    .actions-buttons .button__cell--primary { background-color: {{ shop.email_accent_color }}; }
    a, a:hover, a:active, a:visited { color: {{ shop.email_accent_color }}; }
  </style>
</head>

  <body>
    <table class="body">
      <tr>
        <td>
          <table class="header row">
  <tr>
    <td class="header__cell">
      <center>

        <table class="container">
          <tr>
            <td>

              <table class="row">
                <tr>
                  <td class="shop-name__cell">
                    {%- if shop.email_logo_url %}
                      <img src="{{shop.email_logo_url}}" alt="{{ shop.name }}" width="{{ shop.email_logo_width }}">
                    {%- else %}
                      <h1 class="shop-name__text">
                        <a href="{{shop.url}}">{{ shop.name }}</a>
                      </h1>
                    {%- endif %}
                  </td>

                    <td>
                      <table class="order-po-number__container">
                        <tr>
                          <td class="order-number__cell">
                            <span class="order-number__text">
                              注文 {{ order_name }}
                            </span>
                          </td>
                        </tr>
                        {%- if po_number %}
                            <tr>
                              <td class="po-number__cell">
                                <span class="po-number__text">
                                  注文書番号 #{{ po_number }}
                                </span>
                              </td>
                            </tr>
                        {%- endif %}
                      </table>
                    </td>
                </tr>
              </table>

            </td>
          </tr>
        </table>

      </center>
    </td>
  </tr>
</table>

          <table class="row content">
  <tr>
    <td class="content__cell">
      <center>
        <table class="container">
          <tr>
            <td>
              
            <h2>{{ email_title }}</h2>
            <p>{{ email_body }}</p>
            {% assign transaction_count = transactions | size %}
  {% if transaction_count > 0 %}
    {% for transaction in transactions %}
      {% if transaction.show_buyer_pending_payment_instructions? %}
        <p> {{transaction.buyer_pending_payment_notice}} </p>
        <p>
        <table class="row">
          <tr>
            {% for instruction in transaction.buyer_pending_payment_instructions %}
              <td>{{ instruction.header }}</td>
            {% endfor %}
            <td>金額</td>
          </tr>
          <tr>
            {% for instruction in transaction.buyer_pending_payment_instructions %}
              <td>{{ instruction.value }}</td>
            {% endfor %}
            <td>{{transaction.amount | money}}</td>
          </tr>
        </table>
        </p>
      {% endif %}
    {% endfor%}
  {% endif %}

            {% if order_status_url %}
              {% if shop_app_tracking_url and shop_app_tracking_button_variant_key %}
                {% if shop_app_tracking_button_variant_key == "track_with_shop" %}
                <table class="row actions">
  <tr>
    <td class="empty-line">&nbsp;</td>
  </tr>
  <tr>
    <td class="actions__cell">
      {% capture shop_logo_img %}<img src="{{ 'mailer/shop_logo.png' | cdn_asset_url }}" alt="Shop" width="42" height="17" class="button__shop-logo">{% endcapture %}
      <table class="actions-buttons" width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="button__cell button__cell--primary" width="50%">
            <a href="{{ order_status_url }}" class="button__text">注文を表示する</a>
          </td>
          <td class="button__cell--separator"></td>
          <td class="button__cell button__cell--shop-app" width="50%">
            <a href="{{ shop_app_tracking_url }}" class="button__text button__text--shop-app">{{ shop_logo_img }}で注文を追跡する</a>
          </td>
        </tr>
      </table>
        <div class="actions__group">
        {% if shop.url %}
    <table class="link secondary-action-cell">
      <tr>
        <td class="link__cell">または<a href="{{ shop.url }}">ショップにアクセスする</a></td>
      </tr>
    </table>
{% endif %}

        </div>
    </td>
  </tr>
</table>

                {% else %}
                <table class="row actions">
  <tr>
    <td class="empty-line">&nbsp;</td>
  </tr>
  <tr>
    <td class="actions__cell">
      {% capture shop_logo_img %}<img src="{{ 'mailer/shop_logo.png' | cdn_asset_url }}" alt="Shop" width="42" height="17" class="button__shop-logo">{% endcapture %}
      <table class="actions-buttons" width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="button__cell button__cell--primary" width="50%">
            <a href="{{ order_status_url }}" class="button__text">注文を表示する</a>
          </td>
          <td class="button__cell--separator"></td>
          <td class="button__cell button__cell--shop-app" width="50%">
            <a href="{{ shop_app_tracking_url }}" class="button__text button__text--shop-app">ダウンロードして {{ shop_logo_img }} で追跡</a>
          </td>
        </tr>
      </table>
        <div class="actions__group">
        {% if shop.url %}
    <table class="link secondary-action-cell">
      <tr>
        <td class="link__cell">または<a href="{{ shop.url }}">ショップにアクセスする</a></td>
      </tr>
    </table>
{% endif %}

        </div>
    </td>
  </tr>
</table>

                {% endif %}
              {% else %}
                <table class="row actions">
  <tr>
    <td class="empty-line">&nbsp;</td>
  </tr>
  <tr>
    <td class="actions__cell">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td valign="middle">
            <table class="button main-action-cell">
              <tr>
                <td class="button__cell"><a href="{{ order_status_url }}" class="button__text">注文を表示する</a></td>
              </tr>
            </table>
          </td>
          <td valign="middle" style="padding-left: 15px; vertical-align: middle;">
            {% if shop.url %}
    <table class="link secondary-action-cell" style="margin-top: 0; vertical-align: middle;">
      <tr>
        <td class="link__cell">または<a href="{{ shop.url }}">ショップにアクセスする</a></td>
      </tr>
    </table>
{% endif %}

          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>

              {% endif %}
            {% else %}
              {% if shop.url %}
    <table class="row actions">
      <tr>
        <td class="actions__cell">
          <table class="button main-action-cell">
            <tr>
              <td class="button__cell"><a href="{{ shop.url }}" class="button__text">ショップにアクセスする</a></td>
            </tr>
          </table>
        </td>
      </tr>
    </table>
{% endif %}

            {% endif %}

            </td>
          </tr>
        </table>
      </center>
    </td>
  </tr>
</table>

          <table class="row section">
  <tr>
    <td class="section__cell">
      <center>
        <table class="container">
          <tr>
            <td>
{% comment %}==== チケット表示ボタン ここから ====

  文言を変える場合: ticket_button_label の値を変更
  色を変える場合  : 既定ではメール内の他のボタンと同じ色になります。
                    変える場合は下の <td class="button__cell"> に
                    bgcolor="#RRGGBB" style="background-color:#RRGGBB;" を追加

==== {% endcomment %}
{%- assign ticket_button_label = 'チケットを表示する' -%}
<table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr>
    <td align="center" style="padding: 15px 0;">
      <table class="button" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="button__cell">
            <a href="{{ shop.url }}?open-tickets=1" class="button__text">{{ ticket_button_label }}</a>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
{% comment %}==== チケット表示ボタン ここまで ===={% endcomment %}
              <h3>注文サマリー</h3>
            </td>
          </tr>
        </table>
        <table class="container">
          <tr>
            <td>
              
            {% if delivery_method_types.size > 1 %}
              
<table class="row">
  {% for line in subtotal_line_items %}
    {% unless line.delivery_agreement %}
        {% if line.groups.size == 0 %}
          {% assign legacy_separator = true %}
          
{% comment %} Skip child add-ons since they will be rendered under the parent line item {% endcomment %}
{% unless line.nested_line_child? %}

  {% assign is_parent = false %}
  {% assign is_nested_line_parent = line.nested_line_parent? %}
  {% if line.bundle_parent? or line.nested_line_parent? %}
    {% assign is_parent = true %}
  {% endif %}
  {% if is_nested_line_parent %}
    {% assign css_order_list_cell_nested_line_parent_class = 'order-list__parent-cell' %}
    {% assign css_order_list_parent_image_cell_nested_line_parent_class = 'order-list__nested-parent-image-cell' %}
  {% endif %}

  <tr class="order-list__item">
    <td class="order-list__item__cell {{ css_order_list_cell_nested_line_parent_class }}">
      <table height="100%">
        <td style="padding-bottom: 0px;">
          <table height="100%">
            <tr valign="top">
              {% if false and is_parent %}
                <td class="order-list__parent-image-cell {{ css_order_list_parent_image_cell_nested_line_parent_class }}">
                  {% if line.image %}
                    <img src="{{ line | img_url: 'compact_cropped' }}" align="left" width="60" height="60" class="order-list__product-image"/>
                  {% else %}
                    <div class="order-list__no-image-cell">
                      <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" class="order-list__no-product-image"/>
                    </div>
                  {% endif %}
                </td>
              {% else %}
                <td class="order-list__image-cell">
                  {% if line.image %}
                    <img src="{{ line | img_url: 'compact_cropped' }}" align="left" width="60" height="60" class="order-list__product-image"/>
                  {% else %}
                    <div class="order-list__no-image-cell">
                      <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="60" height="60" class="order-list__no-product-image"/>
                    </div>
                  {% endif %}
                </td>
              {% endif %}
            </tr>
            {% if is_nested_line_parent %}
              <tr height="100%">
                <td style="padding: 0px;" height="100%">
                  <table height="100%">
                    <tr>
                      <td height="100%" class="nested-line-item-spacer-cell">
                        <div class="nested-line-item-spacer"></div>
                      </td>
                      <td height="100%" class="parent-vertical-line__cell">
                        <div class="parent-vertical-line__content"></div>
                      </td>
                    </tr>
                  </table>                        
                </td>
              </tr>
            {% endif %}
          </table>
        </td>

        <td class="order-list__product-description-cell">
          {% if line.presentment_title %}
            {% assign line_title = line.presentment_title %}
          {% elsif line.title %}
            {% assign line_title = line.title %}
          {% else %}
            {% assign line_title = line.product.title %}
          {% endif %}
          {% if line.quantity < line.quantity %}
            {% capture line_display %}
              {{ line.quantity }}/{{ line.quantity }}個
            {% endcapture %}
          {% else %}
            {% assign line_display = line.quantity %}
          {% endif %}

          <span class="order-list__item-title">{{ line_title }}&nbsp;&times;&nbsp;{{ line_display }}</span><br/>

          {% if line.variant.title != 'Default Title' and is_parent == false %}
            <span class="order-list__item-variant">{{ line.variant.title }}</span><br/>
          {% elsif line.variant.title != 'Default Title' and line.nested_line_parent? %}
            <span class="order-list__item-variant">{{ line.variant.title }}</span><br/>
          {% elsif line.variant.title != 'Default Title' and line.bundle_parent? and false == false %}
            <span class="order-list__item-variant">{{ line.variant.title }}</span><br/>
          {% endif %}

          {% if false %}
            {% for child_line in line.bundle_components %}
              
{% if true %}
  {% assign css_class = 'order-list__bundle-item' %}
  {% assign css_image_class = 'order-list__image-cell' %}
  {% assign css_description_class = 'order-list__product-description-cell' %}
{% else %}
  {% assign css_class = 'order-list__deliverable-item_abandoned' %}
  {% assign css_image_class = 'order-list__image-cell--nested-line-item' %}
  {% assign css_description_class = 'order-list__product-description-cell--nested-line-item' %}
  {% if false %}
    {% assign css_curved_line_cell_container_class = 'curved-line-cell-container__top-spacer-cell--show-border' %}
    {% assign css_hide_vertical_line_class = 'vertical-line__content--hide' %}
    {% assign css_curved_line_cell_container_cell__no_padding_class = 'curved-line-cell-container__cell--no-padding' %}
  {% endif %}
{% endif %}

<table height="100%">
  <tr class="order-list__item">
    <td class="{{ css_class }}" height="100%">
      <table height="100%">
        <td class="{{ css_image_class }}">
          {% if child_line.image %}
            <img src="{{ child_line | img_url: 'compact_cropped' }}" align="left" width="40" height="40" class="order-list__product-image small"/>
          {% else %}
            <div class="order-list__no-image-cell small">
              <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="20" height="20" class="order-list__no-product-image small"/>
            </div>
          {% endif %}
        </td>

        <td class="{{ css_description_class }}">
          {% if child_line.product.title %}
            {% assign item_title = child_line.product.title %}
          {% else %}
            {% assign item_title = child_line.title %}
          {% endif %}

          {% assign item_display = child_line.quantity %}

            <span class="order-list__item-title">{{ item_display }}&nbsp;&times;&nbsp;{{ item_title }}</span><br>

          {% if child_line.variant.title != 'Default Title'%}
            <span class="order-list__item-variant">{{ child_line.variant.title }}</span><br/>
          {% endif %}
          {% if child_line.selling_plan_allocation %}
            <span class="order-list__item-variant">{{ child_line.selling_plan_allocation.selling_plan.name }}</span>
          {% endif %}
        </td>
      </table>
    </td>
  </tr>
</table>
            {% endfor %}
          {% else %}
            {% for group in line.groups %}
              {% if group.deliverable? %}
                <span class="order-list__item-variant">対象:{{ group.display_title }}</span><br/>
              {% else %}
                <span class="order-list__item-variant">{{ group.display_title }}の一部</span><br/>
              {% endif %}
            {% endfor %}
          {% endif %}

            {% if line.gift_card and line.properties["__shopify_send_gift_card_to_recipient"] %}
              {% for property in line.properties %}
  {% assign property_first_char = property.first | slice: 0 %}
  {% if property.last != blank and property_first_char != '_' %}
    <div class="order-list__item-property">
      <dt>{{ property.first }}:</dt>
      <dd>
      {% if property.last contains '/uploads/' %}
        <a href="{{ property.last }}" class="link" target="_blank">
        {{ property.last | split: '/' | last }}
        </a>
      {% else %}
        {{ property.last }}
      {% endif %}
      </dd>
    </div>
  {% endif %}
{% endfor %}

            {% endif %}

          {% if line.selling_plan_allocation %}
            <span class="order-list__item-variant">{{ line.selling_plan_allocation.selling_plan.name }}</span><br/>
          {% endif %}

          {% if line.refunded_quantity > 0 %}
            <span class="order-list__item-refunded">返金済み</span>
          {% endif %}

          {% if line.discount_allocations %}
            {% for discount_allocation in line.discount_allocations %}
              {% if discount_allocation.discount_application.target_selection != 'all' %}
              <p>
                <span class="order-list__item-discount-allocation">
                  <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
                  <span>
                    {{ discount_allocation.discount_application.title | upcase }}
                    (-{{ discount_allocation.amount | money }})
                  </span>
                </span>
              </p>
              {% endif %}
            {% endfor %}
          {% endif %}
        </td>
          {% if false and is_parent %}
            <td class="order-list__parent-price-cell">
          {% else %}
            <td class="order-list__price-cell">
          {% endif %}
          {% if line.original_line_price != line.final_line_price %}
            <del class="order-list__item-original-price">{{ line.original_line_price | money }}</del>
          {% endif %}
            <p class="order-list__item-price">
              {% if line.final_line_price > 0 %}
                {{ line.final_line_price | money }}
                {% if line.unit_price_measurement %}
  <div class="order-list__unit-price">
    {{- line.unit_price | unit_price_with_measurement: line.unit_price_measurement -}}
  </div>
{% endif %}
              {% else %}
                無料
              {% endif %}
            </p>
          </td>
        {% if line.nested_line_parent? %}
          {% for child_line in line.nested_lines %}
            
{% if false %}
  {% assign css_class = 'order-list__bundle-item' %}
  {% assign css_image_class = 'order-list__image-cell' %}
  {% assign css_description_class = 'order-list__product-description-cell' %}
{% else %}
  {% assign css_class = 'order-list__deliverable-item_abandoned' %}
  {% assign css_image_class = 'order-list__image-cell--nested-line-item' %}
  {% assign css_description_class = 'order-list__product-description-cell--nested-line-item' %}
  {% if forloop.last %}
    {% assign css_curved_line_cell_container_class = 'curved-line-cell-container__top-spacer-cell--show-border' %}
    {% assign css_hide_vertical_line_class = 'vertical-line__content--hide' %}
    {% assign css_curved_line_cell_container_cell__no_padding_class = 'curved-line-cell-container__cell--no-padding' %}
  {% endif %}
{% endif %}

<table height="100%">
  <tr class="order-list__item">
    <td class="{{ css_class }}" height="100%">
      <table height="100%">
          <td class="nested-line-item-spacer-cell"style="padding: 1px;">
            <div class="nested-line-item-spacer"></div>
          </td>
          <td class="curved-line-cell-container" valign="top">
            <div style="width: 0px;">
              <table>
                <tr>
                  <td class="{{ css_curved_line_cell_container_cell__no_padding_class }}" style="mso-padding-right-alt: 10px;">
                    <div class="curved-line-cell-container__top-spacer {{ css_curved_line_cell_container_class }}"></div>
                  </td>
                </tr>
                <tr>
                  <td class="curved-line-cell-container__curvedLine-cell">
                    <div class="curved-line-cell-container__curvedLine-cell__curvedLine"></div>
                  </td>
                </tr>
              </table>
            </div>
          </td>
          <td class="vertical-line" height="100%">
            <div class="vertical-line__content {{ css_hide_vertical_line_class }}"></div>
          </td>
          <td class="nested-line-item-spacer-cell--right">
            <div class="nested-line-item-spacer"></div>
          </td>
        <td class="{{ css_image_class }}">
          {% if child_line.image %}
            <img src="{{ child_line | img_url: 'compact_cropped' }}" align="left" width="40" height="40" class="order-list__product-image small"/>
          {% else %}
            <div class="order-list__no-image-cell small">
              <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="20" height="20" class="order-list__no-product-image small"/>
            </div>
          {% endif %}
        </td>

        <td class="{{ css_description_class }}">
          {% if child_line.product.title %}
            {% assign item_title = child_line.product.title %}
          {% else %}
            {% assign item_title = child_line.title %}
          {% endif %}

          {% assign item_display = child_line.quantity %}

            <span class="order-list__item-title">{{ item_title }}&nbsp;&times;&nbsp;{{ item_display }}</span><br>

          {% if child_line.variant.title != 'Default Title'%}
            <span class="order-list__item-variant">{{ child_line.variant.title }}</span><br/>
          {% endif %}
          {% if child_line.selling_plan_allocation %}
            <span class="order-list__item-variant">{{ child_line.selling_plan_allocation.selling_plan.name }}</span>
          {% endif %}
        </td>
      </table>
    </td>
  </tr>
</table>
          {% endfor %}
        {% endif %}
      </table>
    </td>
  </tr>

{% endunless %}

        {% endif %}
    {% endunless %}
  {% endfor %}

    {% for line_item_group in line_item_groups %}
      {% unless line_item_group.components.first.delivery_agreement %}
        {% assign legacy_separator = true %}
        
{% assign final_line_price = 0 %}
{% assign original_line_price = 0 %}
{% assign discount_keys_str = "" %}
{% assign parent_line_item = nil %}

{% if line_item_group.deliverable? == false %}
  {% assign line_item_group_class = "order-list__item__cell" %}
  {% for component in line_item_group.components %}
    {% assign final_line_price = final_line_price | plus: component.final_line_price %}
    {% assign original_line_price = original_line_price | plus: component.original_line_price %}

    {% for da in component.discount_allocations %}
      {% if da.discount_application.target_selection != 'all' %}
        {% assign discount_key = da.discount_application.title | append: da.discount_application.type %}
        {% assign discount_keys_str = discount_keys_str | append: discount_key | append: "," %}
      {% endif %}
    {% endfor %}
  {% endfor %}
{% endif %}

{% if line_item_group.deliverable? %}
  {% assign parent_line_item = line_item_group.parent_sales_line_item %}
  {% assign final_line_price = parent_line_item.final_line_price %}
  {% assign original_line_price = parent_line_item.original_line_price %}
  {% assign line_item_group_class = "order-list__parent_item__cell" %}
  {% assign padding_bottom_none_class = "padding-bottom-none" %}
{% endif %}

{% assign discount_keys = discount_keys_str | split: "," | uniq %}

<tr class="order-list__item">
  <td class="{{ line_item_group_class }}" style="padding: 15px 0 0px 1px;">
    <table height="100%">
        <td class="order-list__parent-image-cell">
          <table height="100%">
            <tr>
              <td class="{{ padding_bottom_none_class }}" valign="top">
                {% if parent_line_item and parent_line_item.image %}
                  <img src="{{ parent_line_item | img_url: 'compact_cropped' }}" align="left" width="60" height="60" class="order-list__product-image"/>
                {% elsif line_item_group.image %}
                  <img src="{{ line_item_group | img_url: 'compact_cropped' }}" align="left" width="60" height="60" class="order-list__product-image"/>
                {% else %}
                  <div class="order-list__no-image-cell">
                    <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="30" height="30" class="order-list__no-product-image"/>
                  </div>
                {% endif %}
              </td>
            </tr>
            {% if line_item_group.deliverable? == true %}
              <tr height="100%">
                <td height="100%" class="parent-vertical-line__cell">
                  <table height="100%" style="width: auto;">
                    <tr>
                      <td height="100%" class="nested-line-item-spacer-cell">
                        <div style="width: 6px;"></div>
                      </td>
                      <td height="100%" class="parent-vertical-line__cell">
                        <div class="parent-vertical-line__content"></div>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            {% endif %}
          </table>
        </td>

        <td class="order-list__product-description-cell">
          <table>
            <tr>
              <td class="order-list__product-description-cell" colspan="2">
                <span class="order-list__item-title">{{ line_item_group.display_title }}&nbsp;&times;&nbsp;{{ line_item_group.quantity }}</span><br/>
                {% if line_item_group.variant and line_item_group.variant.title != 'Default Title' %}
                  <span class="order-list__item-variant">{{ line_item_group.variant.title }}</span>
                {% endif %}

                {% if line_item_group.deliverable? %}
                  {% if parent_line_item.discount_allocations %}
                    {% for discount_allocation in parent_line_item.discount_allocations %}
                      {% if discount_allocation.discount_application.target_selection != 'all' %}
                        <p>
                          <span class="order-list__item-discount-allocation">
                            <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
                            <span>
                              {{ discount_allocation.discount_application.title | upcase }}
                              (-{{ discount_allocation.amount | money }})
                            </span>
                          </span>
                        </p>
                      {% endif %}
                    {% endfor %}
                  {% endif %}
                {% else %}
                  {% for discount_key in discount_keys %}
                    {% assign discount_amount = 0 %}

                    {% for component in line_item_group.components %}
                      {% for da in component.discount_allocations %}
                        {% assign key = da.discount_application.title | append: da.discount_application.type %}
                        {% if da.discount_application.target_selection != 'all' and key == discount_key %}
                          {% assign discount_amount = discount_amount | plus: da.amount %}
                          {% assign discount_title = da.discount_application.title %}
                        {% endif %}
                      {% endfor %}
                    {% endfor %}

                    <p>
                      <span class="order-list__item-discount-allocation">
                        <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
                        <span>
                          {{ discount_title | upcase }}
                          (-{{ discount_amount | money }})
                        </span>
                      </span>
                    </p>
                  {% endfor %}
                {% endif %}
              </td>

                <td class="order-list__parent_price-cell">
                  {% if original_line_price != final_line_price %}
                    <del class="order-list__item-original-price">{{ original_line_price | money }}</del>
                  {% endif %}
                  <p class="order-list__item-price">
                    {% if final_line_price > 0 %}
                      {{ final_line_price | money }}
                    {% else %}
                      {{ 'notifications.views.mailers.notifications.discount_free' | t }}
                    {% endif %}
                  </p>
                </td>
            </tr>

            {% if line_item_group.deliverable? == false %}
              {% for component in line_item_group.components %}
                
{% if true %}
  {% assign order_list_item_class = "order-list__bundle-item" %}
  {% assign css_image_class = 'order-list__image-cell' %}
  {% assign order_list_product_description_class = 'order-list__product-description-cell' %}
{% else %}
  {% assign order_list_product_description_class = 'order-list__product-description-cell--nested-line-item' %}
  {% if false %}
    {% assign css_curved_line_cell_container_class = 'curved-line-cell-container__top-spacer-cell--show-border' %}
    {% assign css_hide_vertical_line_class = 'vertical-line__content--hide' %}
    {% assign css_curved_line_cell_container_cell__no_padding_class = 'curved-line-cell-container__cell--no-padding' %}
  {% endif %}
{% endif %}

<tr height="100%">
    <td class="{{ order_list_item_class }} {{ css_image_class }}" valign="top">
        {% if component.image %}
        <img src="{{ component | img_url: 'compact_cropped' }}" align="left" width="40" height="40" class="order-list__product-image"/>
        {% else %}
        <div class="order-list__no-image-cell small">
            <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="20" height="20" class="order-list__no-product-image small"/>
        </div>
        {% endif %}
    </td>

    <td class="{{ order_list_product_description_class }}" valign="top">
        {% if component.product.title %}
            {% assign component_title = component.product.title %}
        {% else %}
            {% assign component_title = component.title %}
        {% endif %}

        {% if line_item_group.deliverable? %}
            <span class="order-list__item-title">{{ component_title }}&nbsp;&times;&nbsp;{{ component.quantity }}</span>
        {% else %}
            <span class="order-list__item-title">{{ component.quantity }}&nbsp;&times;&nbsp;{{ component_title }}</span>
        {% endif %}
        <br>
        {% if component.variant.title != 'Default Title' %}
            <span class="order-list__item-variant">{{ component.variant.title }}</span>
        {% endif %}

        {% if line_item_group.deliverable? %}
            {% if component.discount_allocations %}
                {% for discount_allocation in component.discount_allocations %}
                    {% if discount_allocation.discount_application.target_selection != 'all' %}
                        <p>
                            <span class="order-list__item-discount-allocation">
                            <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
                            <span>
                                {{ discount_allocation.discount_application.title | upcase }}
                                (-{{ discount_allocation.amount | money }})
                            </span>
                            </span>
                        </p>
                    {% endif %}
                {% endfor %}
            {% endif %}
        {% endif %}
    </td>

    {% if line_item_group.deliverable? %}
    <td class="order-list__price-cell">
        {% if component.original_line_price != component.final_line_price %}
            <del class="order-list__item-original-price">{{ component.original_line_price | money }}</del>
        {% endif %}
        <p class="order-list__item-price">
        {% if component.final_line_price > 0 %}
            {{ component.final_line_price | money }}
        {% else %}
            無料
        {% endif %}
        </p>
    </td>
    {% endif %}
</tr>

              {% endfor %}
            {% endif %}
          </table>
        </td>
    </table>
    {% if line_item_group.deliverable? %}
      <td height="100%">
        {% for component in line_item_group.components %}

          <tr>
            <td class="order-list__deliverable-item" height="100%" style="padding: 0;">
              <table height="100%">
                
{% if false %}
  {% assign order_list_item_class = "order-list__bundle-item" %}
  {% assign css_image_class = 'order-list__image-cell' %}
  {% assign order_list_product_description_class = 'order-list__product-description-cell' %}
{% else %}
  {% assign order_list_product_description_class = 'order-list__product-description-cell--nested-line-item' %}
  {% if forloop.last %}
    {% assign css_curved_line_cell_container_class = 'curved-line-cell-container__top-spacer-cell--show-border' %}
    {% assign css_hide_vertical_line_class = 'vertical-line__content--hide' %}
    {% assign css_curved_line_cell_container_cell__no_padding_class = 'curved-line-cell-container__cell--no-padding' %}
  {% endif %}
{% endif %}

<tr height="100%">
    <td class="nested-line-item-spacer-cell" style="padding: 1px;">
        <div class="nested-line-item-spacer"></div>
    </td>
    <td class="curved-line-cell-container" valign="top">
        <div style="width: 0px;">
            <table>
                <tr>
                    <td class="{{ css_curved_line_cell_container_cell__no_padding_class }}" style="mso-padding-right-alt: 10px;">
                        <div class="curved-line-cell-container__top-spacer {{ css_curved_line_cell_container_class }}"></div>
                    </td>
                </tr>
                <tr>
                    <td class="curved-line-cell-container__curvedLine-cell">
                        <div class="curved-line-cell-container__curvedLine-cell__curvedLine"></div>
                    </td>
                </tr>
            </table>
        </div>
    </td>
    <td class="vertical-line" height="100%">
        <div class="vertical-line__content {{ css_hide_vertical_line_class }}"></div>
    </td>
    <td class="nested-line-item-spacer-cell--right">
        <div class="nested-line-item-spacer"></div>
    </td>
    <td class="{{ order_list_item_class }} {{ css_image_class }}" valign="top">
        {% if component.image %}
        <img src="{{ component | img_url: 'compact_cropped' }}" align="left" width="40" height="40" class="order-list__product-image"/>
        {% else %}
        <div class="order-list__no-image-cell small">
            <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="20" height="20" class="order-list__no-product-image small"/>
        </div>
        {% endif %}
    </td>

    <td class="{{ order_list_product_description_class }}" valign="top">
        {% if component.product.title %}
            {% assign component_title = component.product.title %}
        {% else %}
            {% assign component_title = component.title %}
        {% endif %}

        {% if line_item_group.deliverable? %}
            <span class="order-list__item-title">{{ component_title }}&nbsp;&times;&nbsp;{{ component.quantity }}</span>
        {% else %}
            <span class="order-list__item-title">{{ component.quantity }}&nbsp;&times;&nbsp;{{ component_title }}</span>
        {% endif %}
        <br>
        {% if component.variant.title != 'Default Title' %}
            <span class="order-list__item-variant">{{ component.variant.title }}</span>
        {% endif %}

        {% if line_item_group.deliverable? %}
            {% if component.discount_allocations %}
                {% for discount_allocation in component.discount_allocations %}
                    {% if discount_allocation.discount_application.target_selection != 'all' %}
                        <p>
                            <span class="order-list__item-discount-allocation">
                            <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
                            <span>
                                {{ discount_allocation.discount_application.title | upcase }}
                                (-{{ discount_allocation.amount | money }})
                            </span>
                            </span>
                        </p>
                    {% endif %}
                {% endfor %}
            {% endif %}
        {% endif %}
    </td>

    {% if line_item_group.deliverable? %}
    <td class="order-list__price-cell">
        {% if component.original_line_price != component.final_line_price %}
            <del class="order-list__item-original-price">{{ component.original_line_price | money }}</del>
        {% endif %}
        <p class="order-list__item-price">
        {% if component.final_line_price > 0 %}
            {{ component.final_line_price | money }}
        {% else %}
            無料
        {% endif %}
        </p>
    </td>
    {% endif %}
</tr>

              </table>
            </td>
          </tr>
        {% endfor %}
      </td>
    {% endif %}
  </td>
</tr>

      {% endunless %}
    {% endfor %}
</table>

{% if legacy_separator %}
  <hr class="order-list__delivery-method-type-separator">
{% endif %}

{% for delivery_agreement in delivery_agreements %}
  {% if delivery_agreement.line_items != blank %}
    {% if delivery_agreements.size > 1 %}
      <h4 class="order-list__delivery-method-type">
        {{ delivery_agreement.delivery_method_name }} 個のアイテム
      </h4>
      {% if delivery_agreement.delivery_method_type == 'pick-up' %}
        {% if delivery_agreement.estimated_delivery_date %}
          <p class="order-list__estimated-delivery">
            配達予定 &middot; <strong>{{ delivery_agreement.estimated_delivery_date }}</strong>
          </p>
        {% endif %}
        <p class="order-list__estimated-delivery">
          注文の受取の準備が整うと、メールが届きます。
        </p>
      {% elsif delivery_agreement.delivery_method_type == 'shipping'
        or delivery_agreement.delivery_method_type == 'local'
        or delivery_agreement.delivery_method_type == 'pickup-point' %}
        {% if delivery_agreement.presentment_title %}
          {% if delivery_agreement.estimated_delivery_date %}
            <p class="order-list__estimated-delivery">
              配達予定
            </p>
          {% endif %}
          <p class="order-list__estimated-delivery">
            {{ delivery_agreement.presentment_title }}{% if delivery_agreement.estimated_delivery_date %} &middot; {{ delivery_agreement.estimated_delivery_date }}{% endif %}
          </p>
        {% endif %}
      {% endif %}
    {% endif %}

    <table class="row">
      {% for line in delivery_agreement.non_parent_line_items %}
          {% if line.groups.size == 0 %}
            
{% comment %} Skip child add-ons since they will be rendered under the parent line item {% endcomment %}
{% unless line.nested_line_child? %}

  {% assign is_parent = false %}
  {% assign is_nested_line_parent = line.nested_line_parent? %}
  {% if line.bundle_parent? or line.nested_line_parent? %}
    {% assign is_parent = true %}
  {% endif %}
  {% if is_nested_line_parent %}
    {% assign css_order_list_cell_nested_line_parent_class = 'order-list__parent-cell' %}
    {% assign css_order_list_parent_image_cell_nested_line_parent_class = 'order-list__nested-parent-image-cell' %}
  {% endif %}

  <tr class="order-list__item">
    <td class="order-list__item__cell {{ css_order_list_cell_nested_line_parent_class }}">
      <table height="100%">
        <td style="padding-bottom: 0px;">
          <table height="100%">
            <tr valign="top">
              {% if false and is_parent %}
                <td class="order-list__parent-image-cell {{ css_order_list_parent_image_cell_nested_line_parent_class }}">
                  {% if line.image %}
                    <img src="{{ line | img_url: 'compact_cropped' }}" align="left" width="60" height="60" class="order-list__product-image"/>
                  {% else %}
                    <div class="order-list__no-image-cell">
                      <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" class="order-list__no-product-image"/>
                    </div>
                  {% endif %}
                </td>
              {% else %}
                <td class="order-list__image-cell">
                  {% if line.image %}
                    <img src="{{ line | img_url: 'compact_cropped' }}" align="left" width="60" height="60" class="order-list__product-image"/>
                  {% else %}
                    <div class="order-list__no-image-cell">
                      <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="60" height="60" class="order-list__no-product-image"/>
                    </div>
                  {% endif %}
                </td>
              {% endif %}
            </tr>
            {% if is_nested_line_parent %}
              <tr height="100%">
                <td style="padding: 0px;" height="100%">
                  <table height="100%">
                    <tr>
                      <td height="100%" class="nested-line-item-spacer-cell">
                        <div class="nested-line-item-spacer"></div>
                      </td>
                      <td height="100%" class="parent-vertical-line__cell">
                        <div class="parent-vertical-line__content"></div>
                      </td>
                    </tr>
                  </table>                        
                </td>
              </tr>
            {% endif %}
          </table>
        </td>

        <td class="order-list__product-description-cell">
          {% if line.presentment_title %}
            {% assign line_title = line.presentment_title %}
          {% elsif line.title %}
            {% assign line_title = line.title %}
          {% else %}
            {% assign line_title = line.product.title %}
          {% endif %}
          {% if line.quantity < line.quantity %}
            {% capture line_display %}
              {{ line.quantity }}/{{ line.quantity }}個
            {% endcapture %}
          {% else %}
            {% assign line_display = line.quantity %}
          {% endif %}

          <span class="order-list__item-title">{{ line_title }}&nbsp;&times;&nbsp;{{ line_display }}</span><br/>

          {% if line.variant.title != 'Default Title' and is_parent == false %}
            <span class="order-list__item-variant">{{ line.variant.title }}</span><br/>
          {% elsif line.variant.title != 'Default Title' and line.nested_line_parent? %}
            <span class="order-list__item-variant">{{ line.variant.title }}</span><br/>
          {% elsif line.variant.title != 'Default Title' and line.bundle_parent? and false == false %}
            <span class="order-list__item-variant">{{ line.variant.title }}</span><br/>
          {% endif %}

          {% if false %}
            {% for child_line in line.bundle_components %}
              
{% if true %}
  {% assign css_class = 'order-list__bundle-item' %}
  {% assign css_image_class = 'order-list__image-cell' %}
  {% assign css_description_class = 'order-list__product-description-cell' %}
{% else %}
  {% assign css_class = 'order-list__deliverable-item_abandoned' %}
  {% assign css_image_class = 'order-list__image-cell--nested-line-item' %}
  {% assign css_description_class = 'order-list__product-description-cell--nested-line-item' %}
  {% if false %}
    {% assign css_curved_line_cell_container_class = 'curved-line-cell-container__top-spacer-cell--show-border' %}
    {% assign css_hide_vertical_line_class = 'vertical-line__content--hide' %}
    {% assign css_curved_line_cell_container_cell__no_padding_class = 'curved-line-cell-container__cell--no-padding' %}
  {% endif %}
{% endif %}

<table height="100%">
  <tr class="order-list__item">
    <td class="{{ css_class }}" height="100%">
      <table height="100%">
        <td class="{{ css_image_class }}">
          {% if child_line.image %}
            <img src="{{ child_line | img_url: 'compact_cropped' }}" align="left" width="40" height="40" class="order-list__product-image small"/>
          {% else %}
            <div class="order-list__no-image-cell small">
              <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="20" height="20" class="order-list__no-product-image small"/>
            </div>
          {% endif %}
        </td>

        <td class="{{ css_description_class }}">
          {% if child_line.product.title %}
            {% assign item_title = child_line.product.title %}
          {% else %}
            {% assign item_title = child_line.title %}
          {% endif %}

          {% assign item_display = child_line.quantity %}

            <span class="order-list__item-title">{{ item_display }}&nbsp;&times;&nbsp;{{ item_title }}</span><br>

          {% if child_line.variant.title != 'Default Title'%}
            <span class="order-list__item-variant">{{ child_line.variant.title }}</span><br/>
          {% endif %}
          {% if child_line.selling_plan_allocation %}
            <span class="order-list__item-variant">{{ child_line.selling_plan_allocation.selling_plan.name }}</span>
          {% endif %}
        </td>
      </table>
    </td>
  </tr>
</table>
            {% endfor %}
          {% else %}
            {% for group in line.groups %}
              {% if group.deliverable? %}
                <span class="order-list__item-variant">対象:{{ group.display_title }}</span><br/>
              {% else %}
                <span class="order-list__item-variant">{{ group.display_title }}の一部</span><br/>
              {% endif %}
            {% endfor %}
          {% endif %}

            {% if line.gift_card and line.properties["__shopify_send_gift_card_to_recipient"] %}
              {% for property in line.properties %}
  {% assign property_first_char = property.first | slice: 0 %}
  {% if property.last != blank and property_first_char != '_' %}
    <div class="order-list__item-property">
      <dt>{{ property.first }}:</dt>
      <dd>
      {% if property.last contains '/uploads/' %}
        <a href="{{ property.last }}" class="link" target="_blank">
        {{ property.last | split: '/' | last }}
        </a>
      {% else %}
        {{ property.last }}
      {% endif %}
      </dd>
    </div>
  {% endif %}
{% endfor %}

            {% endif %}

          {% if line.selling_plan_allocation %}
            <span class="order-list__item-variant">{{ line.selling_plan_allocation.selling_plan.name }}</span><br/>
          {% endif %}

          {% if line.refunded_quantity > 0 %}
            <span class="order-list__item-refunded">返金済み</span>
          {% endif %}

          {% if line.discount_allocations %}
            {% for discount_allocation in line.discount_allocations %}
              {% if discount_allocation.discount_application.target_selection != 'all' %}
              <p>
                <span class="order-list__item-discount-allocation">
                  <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
                  <span>
                    {{ discount_allocation.discount_application.title | upcase }}
                    (-{{ discount_allocation.amount | money }})
                  </span>
                </span>
              </p>
              {% endif %}
            {% endfor %}
          {% endif %}
        </td>
          {% if false and is_parent %}
            <td class="order-list__parent-price-cell">
          {% else %}
            <td class="order-list__price-cell">
          {% endif %}
          {% if line.original_line_price != line.final_line_price %}
            <del class="order-list__item-original-price">{{ line.original_line_price | money }}</del>
          {% endif %}
            <p class="order-list__item-price">
              {% if line.final_line_price > 0 %}
                {{ line.final_line_price | money }}
                {% if line.unit_price_measurement %}
  <div class="order-list__unit-price">
    {{- line.unit_price | unit_price_with_measurement: line.unit_price_measurement -}}
  </div>
{% endif %}
              {% else %}
                無料
              {% endif %}
            </p>
          </td>
        {% if line.nested_line_parent? %}
          {% for child_line in line.nested_lines %}
            
{% if false %}
  {% assign css_class = 'order-list__bundle-item' %}
  {% assign css_image_class = 'order-list__image-cell' %}
  {% assign css_description_class = 'order-list__product-description-cell' %}
{% else %}
  {% assign css_class = 'order-list__deliverable-item_abandoned' %}
  {% assign css_image_class = 'order-list__image-cell--nested-line-item' %}
  {% assign css_description_class = 'order-list__product-description-cell--nested-line-item' %}
  {% if forloop.last %}
    {% assign css_curved_line_cell_container_class = 'curved-line-cell-container__top-spacer-cell--show-border' %}
    {% assign css_hide_vertical_line_class = 'vertical-line__content--hide' %}
    {% assign css_curved_line_cell_container_cell__no_padding_class = 'curved-line-cell-container__cell--no-padding' %}
  {% endif %}
{% endif %}

<table height="100%">
  <tr class="order-list__item">
    <td class="{{ css_class }}" height="100%">
      <table height="100%">
          <td class="nested-line-item-spacer-cell"style="padding: 1px;">
            <div class="nested-line-item-spacer"></div>
          </td>
          <td class="curved-line-cell-container" valign="top">
            <div style="width: 0px;">
              <table>
                <tr>
                  <td class="{{ css_curved_line_cell_container_cell__no_padding_class }}" style="mso-padding-right-alt: 10px;">
                    <div class="curved-line-cell-container__top-spacer {{ css_curved_line_cell_container_class }}"></div>
                  </td>
                </tr>
                <tr>
                  <td class="curved-line-cell-container__curvedLine-cell">
                    <div class="curved-line-cell-container__curvedLine-cell__curvedLine"></div>
                  </td>
                </tr>
              </table>
            </div>
          </td>
          <td class="vertical-line" height="100%">
            <div class="vertical-line__content {{ css_hide_vertical_line_class }}"></div>
          </td>
          <td class="nested-line-item-spacer-cell--right">
            <div class="nested-line-item-spacer"></div>
          </td>
        <td class="{{ css_image_class }}">
          {% if child_line.image %}
            <img src="{{ child_line | img_url: 'compact_cropped' }}" align="left" width="40" height="40" class="order-list__product-image small"/>
          {% else %}
            <div class="order-list__no-image-cell small">
              <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="20" height="20" class="order-list__no-product-image small"/>
            </div>
          {% endif %}
        </td>

        <td class="{{ css_description_class }}">
          {% if child_line.product.title %}
            {% assign item_title = child_line.product.title %}
          {% else %}
            {% assign item_title = child_line.title %}
          {% endif %}

          {% assign item_display = child_line.quantity %}

            <span class="order-list__item-title">{{ item_title }}&nbsp;&times;&nbsp;{{ item_display }}</span><br>

          {% if child_line.variant.title != 'Default Title'%}
            <span class="order-list__item-variant">{{ child_line.variant.title }}</span><br/>
          {% endif %}
          {% if child_line.selling_plan_allocation %}
            <span class="order-list__item-variant">{{ child_line.selling_plan_allocation.selling_plan.name }}</span>
          {% endif %}
        </td>
      </table>
    </td>
  </tr>
</table>
          {% endfor %}
        {% endif %}
      </table>
    </td>
  </tr>

{% endunless %}

          {% endif %}
      {% endfor %}

        {% for line_item_group in delivery_agreement.line_item_groups %}
          {% if line_item_group.deliverable? == false %}
            
{% assign final_line_price = 0 %}
{% assign original_line_price = 0 %}
{% assign discount_keys_str = "" %}
{% assign parent_line_item = nil %}

{% if line_item_group.deliverable? == false %}
  {% assign line_item_group_class = "order-list__item__cell" %}
  {% for component in line_item_group.components %}
    {% assign final_line_price = final_line_price | plus: component.final_line_price %}
    {% assign original_line_price = original_line_price | plus: component.original_line_price %}

    {% for da in component.discount_allocations %}
      {% if da.discount_application.target_selection != 'all' %}
        {% assign discount_key = da.discount_application.title | append: da.discount_application.type %}
        {% assign discount_keys_str = discount_keys_str | append: discount_key | append: "," %}
      {% endif %}
    {% endfor %}
  {% endfor %}
{% endif %}

{% if line_item_group.deliverable? %}
  {% assign parent_line_item = line_item_group.parent_sales_line_item %}
  {% assign final_line_price = parent_line_item.final_line_price %}
  {% assign original_line_price = parent_line_item.original_line_price %}
  {% assign line_item_group_class = "order-list__parent_item__cell" %}
  {% assign padding_bottom_none_class = "padding-bottom-none" %}
{% endif %}

{% assign discount_keys = discount_keys_str | split: "," | uniq %}

<tr class="order-list__item">
  <td class="{{ line_item_group_class }}" style="padding: 15px 0 0px 1px;">
    <table height="100%">
        <td class="order-list__parent-image-cell">
          <table height="100%">
            <tr>
              <td class="{{ padding_bottom_none_class }}" valign="top">
                {% if parent_line_item and parent_line_item.image %}
                  <img src="{{ parent_line_item | img_url: 'compact_cropped' }}" align="left" width="60" height="60" class="order-list__product-image"/>
                {% elsif line_item_group.image %}
                  <img src="{{ line_item_group | img_url: 'compact_cropped' }}" align="left" width="60" height="60" class="order-list__product-image"/>
                {% else %}
                  <div class="order-list__no-image-cell">
                    <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="30" height="30" class="order-list__no-product-image"/>
                  </div>
                {% endif %}
              </td>
            </tr>
            {% if line_item_group.deliverable? == true %}
              <tr height="100%">
                <td height="100%" class="parent-vertical-line__cell">
                  <table height="100%" style="width: auto;">
                    <tr>
                      <td height="100%" class="nested-line-item-spacer-cell">
                        <div style="width: 6px;"></div>
                      </td>
                      <td height="100%" class="parent-vertical-line__cell">
                        <div class="parent-vertical-line__content"></div>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            {% endif %}
          </table>
        </td>

        <td class="order-list__product-description-cell">
          <table>
            <tr>
              <td class="order-list__product-description-cell" colspan="2">
                <span class="order-list__item-title">{{ line_item_group.display_title }}&nbsp;&times;&nbsp;{{ line_item_group.quantity }}</span><br/>
                {% if line_item_group.variant and line_item_group.variant.title != 'Default Title' %}
                  <span class="order-list__item-variant">{{ line_item_group.variant.title }}</span>
                {% endif %}

                {% if line_item_group.deliverable? %}
                  {% if parent_line_item.discount_allocations %}
                    {% for discount_allocation in parent_line_item.discount_allocations %}
                      {% if discount_allocation.discount_application.target_selection != 'all' %}
                        <p>
                          <span class="order-list__item-discount-allocation">
                            <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
                            <span>
                              {{ discount_allocation.discount_application.title | upcase }}
                              (-{{ discount_allocation.amount | money }})
                            </span>
                          </span>
                        </p>
                      {% endif %}
                    {% endfor %}
                  {% endif %}
                {% else %}
                  {% for discount_key in discount_keys %}
                    {% assign discount_amount = 0 %}

                    {% for component in line_item_group.components %}
                      {% for da in component.discount_allocations %}
                        {% assign key = da.discount_application.title | append: da.discount_application.type %}
                        {% if da.discount_application.target_selection != 'all' and key == discount_key %}
                          {% assign discount_amount = discount_amount | plus: da.amount %}
                          {% assign discount_title = da.discount_application.title %}
                        {% endif %}
                      {% endfor %}
                    {% endfor %}

                    <p>
                      <span class="order-list__item-discount-allocation">
                        <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
                        <span>
                          {{ discount_title | upcase }}
                          (-{{ discount_amount | money }})
                        </span>
                      </span>
                    </p>
                  {% endfor %}
                {% endif %}
              </td>

                <td class="order-list__parent_price-cell">
                  {% if original_line_price != final_line_price %}
                    <del class="order-list__item-original-price">{{ original_line_price | money }}</del>
                  {% endif %}
                  <p class="order-list__item-price">
                    {% if final_line_price > 0 %}
                      {{ final_line_price | money }}
                    {% else %}
                      {{ 'notifications.views.mailers.notifications.discount_free' | t }}
                    {% endif %}
                  </p>
                </td>
            </tr>

            {% if line_item_group.deliverable? == false %}
              {% for component in line_item_group.components %}
                
{% if true %}
  {% assign order_list_item_class = "order-list__bundle-item" %}
  {% assign css_image_class = 'order-list__image-cell' %}
  {% assign order_list_product_description_class = 'order-list__product-description-cell' %}
{% else %}
  {% assign order_list_product_description_class = 'order-list__product-description-cell--nested-line-item' %}
  {% if false %}
    {% assign css_curved_line_cell_container_class = 'curved-line-cell-container__top-spacer-cell--show-border' %}
    {% assign css_hide_vertical_line_class = 'vertical-line__content--hide' %}
    {% assign css_curved_line_cell_container_cell__no_padding_class = 'curved-line-cell-container__cell--no-padding' %}
  {% endif %}
{% endif %}

<tr height="100%">
    <td class="{{ order_list_item_class }} {{ css_image_class }}" valign="top">
        {% if component.image %}
        <img src="{{ component | img_url: 'compact_cropped' }}" align="left" width="40" height="40" class="order-list__product-image"/>
        {% else %}
        <div class="order-list__no-image-cell small">
            <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="20" height="20" class="order-list__no-product-image small"/>
        </div>
        {% endif %}
    </td>

    <td class="{{ order_list_product_description_class }}" valign="top">
        {% if component.product.title %}
            {% assign component_title = component.product.title %}
        {% else %}
            {% assign component_title = component.title %}
        {% endif %}

        {% if line_item_group.deliverable? %}
            <span class="order-list__item-title">{{ component_title }}&nbsp;&times;&nbsp;{{ component.quantity }}</span>
        {% else %}
            <span class="order-list__item-title">{{ component.quantity }}&nbsp;&times;&nbsp;{{ component_title }}</span>
        {% endif %}
        <br>
        {% if component.variant.title != 'Default Title' %}
            <span class="order-list__item-variant">{{ component.variant.title }}</span>
        {% endif %}

        {% if line_item_group.deliverable? %}
            {% if component.discount_allocations %}
                {% for discount_allocation in component.discount_allocations %}
                    {% if discount_allocation.discount_application.target_selection != 'all' %}
                        <p>
                            <span class="order-list__item-discount-allocation">
                            <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
                            <span>
                                {{ discount_allocation.discount_application.title | upcase }}
                                (-{{ discount_allocation.amount | money }})
                            </span>
                            </span>
                        </p>
                    {% endif %}
                {% endfor %}
            {% endif %}
        {% endif %}
    </td>

    {% if line_item_group.deliverable? %}
    <td class="order-list__price-cell">
        {% if component.original_line_price != component.final_line_price %}
            <del class="order-list__item-original-price">{{ component.original_line_price | money }}</del>
        {% endif %}
        <p class="order-list__item-price">
        {% if component.final_line_price > 0 %}
            {{ component.final_line_price | money }}
        {% else %}
            無料
        {% endif %}
        </p>
    </td>
    {% endif %}
</tr>

              {% endfor %}
            {% endif %}
          </table>
        </td>
    </table>
    {% if line_item_group.deliverable? %}
      <td height="100%">
        {% for component in line_item_group.components %}

          <tr>
            <td class="order-list__deliverable-item" height="100%" style="padding: 0;">
              <table height="100%">
                
{% if false %}
  {% assign order_list_item_class = "order-list__bundle-item" %}
  {% assign css_image_class = 'order-list__image-cell' %}
  {% assign order_list_product_description_class = 'order-list__product-description-cell' %}
{% else %}
  {% assign order_list_product_description_class = 'order-list__product-description-cell--nested-line-item' %}
  {% if forloop.last %}
    {% assign css_curved_line_cell_container_class = 'curved-line-cell-container__top-spacer-cell--show-border' %}
    {% assign css_hide_vertical_line_class = 'vertical-line__content--hide' %}
    {% assign css_curved_line_cell_container_cell__no_padding_class = 'curved-line-cell-container__cell--no-padding' %}
  {% endif %}
{% endif %}

<tr height="100%">
    <td class="nested-line-item-spacer-cell" style="padding: 1px;">
        <div class="nested-line-item-spacer"></div>
    </td>
    <td class="curved-line-cell-container" valign="top">
        <div style="width: 0px;">
            <table>
                <tr>
                    <td class="{{ css_curved_line_cell_container_cell__no_padding_class }}" style="mso-padding-right-alt: 10px;">
                        <div class="curved-line-cell-container__top-spacer {{ css_curved_line_cell_container_class }}"></div>
                    </td>
                </tr>
                <tr>
                    <td class="curved-line-cell-container__curvedLine-cell">
                        <div class="curved-line-cell-container__curvedLine-cell__curvedLine"></div>
                    </td>
                </tr>
            </table>
        </div>
    </td>
    <td class="vertical-line" height="100%">
        <div class="vertical-line__content {{ css_hide_vertical_line_class }}"></div>
    </td>
    <td class="nested-line-item-spacer-cell--right">
        <div class="nested-line-item-spacer"></div>
    </td>
    <td class="{{ order_list_item_class }} {{ css_image_class }}" valign="top">
        {% if component.image %}
        <img src="{{ component | img_url: 'compact_cropped' }}" align="left" width="40" height="40" class="order-list__product-image"/>
        {% else %}
        <div class="order-list__no-image-cell small">
            <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="20" height="20" class="order-list__no-product-image small"/>
        </div>
        {% endif %}
    </td>

    <td class="{{ order_list_product_description_class }}" valign="top">
        {% if component.product.title %}
            {% assign component_title = component.product.title %}
        {% else %}
            {% assign component_title = component.title %}
        {% endif %}

        {% if line_item_group.deliverable? %}
            <span class="order-list__item-title">{{ component_title }}&nbsp;&times;&nbsp;{{ component.quantity }}</span>
        {% else %}
            <span class="order-list__item-title">{{ component.quantity }}&nbsp;&times;&nbsp;{{ component_title }}</span>
        {% endif %}
        <br>
        {% if component.variant.title != 'Default Title' %}
            <span class="order-list__item-variant">{{ component.variant.title }}</span>
        {% endif %}

        {% if line_item_group.deliverable? %}
            {% if component.discount_allocations %}
                {% for discount_allocation in component.discount_allocations %}
                    {% if discount_allocation.discount_application.target_selection != 'all' %}
                        <p>
                            <span class="order-list__item-discount-allocation">
                            <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
                            <span>
                                {{ discount_allocation.discount_application.title | upcase }}
                                (-{{ discount_allocation.amount | money }})
                            </span>
                            </span>
                        </p>
                    {% endif %}
                {% endfor %}
            {% endif %}
        {% endif %}
    </td>

    {% if line_item_group.deliverable? %}
    <td class="order-list__price-cell">
        {% if component.original_line_price != component.final_line_price %}
            <del class="order-list__item-original-price">{{ component.original_line_price | money }}</del>
        {% endif %}
        <p class="order-list__item-price">
        {% if component.final_line_price > 0 %}
            {{ component.final_line_price | money }}
        {% else %}
            無料
        {% endif %}
        </p>
    </td>
    {% endif %}
</tr>

              </table>
            </td>
          </tr>
        {% endfor %}
      </td>
    {% endif %}
  </td>
</tr>

          {% else %}
            {% if delivery_agreement == line_item_group.parent_sales_line_item.delivery_agreement %}
              
{% assign final_line_price = 0 %}
{% assign original_line_price = 0 %}
{% assign discount_keys_str = "" %}
{% assign parent_line_item = nil %}

{% if line_item_group.deliverable? == false %}
  {% assign line_item_group_class = "order-list__item__cell" %}
  {% for component in line_item_group.components %}
    {% assign final_line_price = final_line_price | plus: component.final_line_price %}
    {% assign original_line_price = original_line_price | plus: component.original_line_price %}

    {% for da in component.discount_allocations %}
      {% if da.discount_application.target_selection != 'all' %}
        {% assign discount_key = da.discount_application.title | append: da.discount_application.type %}
        {% assign discount_keys_str = discount_keys_str | append: discount_key | append: "," %}
      {% endif %}
    {% endfor %}
  {% endfor %}
{% endif %}

{% if line_item_group.deliverable? %}
  {% assign parent_line_item = line_item_group.parent_sales_line_item %}
  {% assign final_line_price = parent_line_item.final_line_price %}
  {% assign original_line_price = parent_line_item.original_line_price %}
  {% assign line_item_group_class = "order-list__parent_item__cell" %}
  {% assign padding_bottom_none_class = "padding-bottom-none" %}
{% endif %}

{% assign discount_keys = discount_keys_str | split: "," | uniq %}

<tr class="order-list__item">
  <td class="{{ line_item_group_class }}" style="padding: 15px 0 0px 1px;">
    <table height="100%">
        <td class="order-list__parent-image-cell">
          <table height="100%">
            <tr>
              <td class="{{ padding_bottom_none_class }}" valign="top">
                {% if parent_line_item and parent_line_item.image %}
                  <img src="{{ parent_line_item | img_url: 'compact_cropped' }}" align="left" width="60" height="60" class="order-list__product-image"/>
                {% elsif line_item_group.image %}
                  <img src="{{ line_item_group | img_url: 'compact_cropped' }}" align="left" width="60" height="60" class="order-list__product-image"/>
                {% else %}
                  <div class="order-list__no-image-cell">
                    <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="30" height="30" class="order-list__no-product-image"/>
                  </div>
                {% endif %}
              </td>
            </tr>
            {% if line_item_group.deliverable? == true %}
              <tr height="100%">
                <td height="100%" class="parent-vertical-line__cell">
                  <table height="100%" style="width: auto;">
                    <tr>
                      <td height="100%" class="nested-line-item-spacer-cell">
                        <div style="width: 6px;"></div>
                      </td>
                      <td height="100%" class="parent-vertical-line__cell">
                        <div class="parent-vertical-line__content"></div>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            {% endif %}
          </table>
        </td>

        <td class="order-list__product-description-cell">
          <table>
            <tr>
              <td class="order-list__product-description-cell" colspan="2">
                <span class="order-list__item-title">{{ line_item_group.display_title }}&nbsp;&times;&nbsp;{{ line_item_group.quantity }}</span><br/>
                {% if line_item_group.variant and line_item_group.variant.title != 'Default Title' %}
                  <span class="order-list__item-variant">{{ line_item_group.variant.title }}</span>
                {% endif %}

                {% if line_item_group.deliverable? %}
                  {% if parent_line_item.discount_allocations %}
                    {% for discount_allocation in parent_line_item.discount_allocations %}
                      {% if discount_allocation.discount_application.target_selection != 'all' %}
                        <p>
                          <span class="order-list__item-discount-allocation">
                            <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
                            <span>
                              {{ discount_allocation.discount_application.title | upcase }}
                              (-{{ discount_allocation.amount | money }})
                            </span>
                          </span>
                        </p>
                      {% endif %}
                    {% endfor %}
                  {% endif %}
                {% else %}
                  {% for discount_key in discount_keys %}
                    {% assign discount_amount = 0 %}

                    {% for component in line_item_group.components %}
                      {% for da in component.discount_allocations %}
                        {% assign key = da.discount_application.title | append: da.discount_application.type %}
                        {% if da.discount_application.target_selection != 'all' and key == discount_key %}
                          {% assign discount_amount = discount_amount | plus: da.amount %}
                          {% assign discount_title = da.discount_application.title %}
                        {% endif %}
                      {% endfor %}
                    {% endfor %}

                    <p>
                      <span class="order-list__item-discount-allocation">
                        <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
                        <span>
                          {{ discount_title | upcase }}
                          (-{{ discount_amount | money }})
                        </span>
                      </span>
                    </p>
                  {% endfor %}
                {% endif %}
              </td>

                <td class="order-list__parent_price-cell">
                  {% if original_line_price != final_line_price %}
                    <del class="order-list__item-original-price">{{ original_line_price | money }}</del>
                  {% endif %}
                  <p class="order-list__item-price">
                    {% if final_line_price > 0 %}
                      {{ final_line_price | money }}
                    {% else %}
                      {{ 'notifications.views.mailers.notifications.discount_free' | t }}
                    {% endif %}
                  </p>
                </td>
            </tr>

            {% if line_item_group.deliverable? == false %}
              {% for component in line_item_group.components %}
                
{% if true %}
  {% assign order_list_item_class = "order-list__bundle-item" %}
  {% assign css_image_class = 'order-list__image-cell' %}
  {% assign order_list_product_description_class = 'order-list__product-description-cell' %}
{% else %}
  {% assign order_list_product_description_class = 'order-list__product-description-cell--nested-line-item' %}
  {% if false %}
    {% assign css_curved_line_cell_container_class = 'curved-line-cell-container__top-spacer-cell--show-border' %}
    {% assign css_hide_vertical_line_class = 'vertical-line__content--hide' %}
    {% assign css_curved_line_cell_container_cell__no_padding_class = 'curved-line-cell-container__cell--no-padding' %}
  {% endif %}
{% endif %}

<tr height="100%">
    <td class="{{ order_list_item_class }} {{ css_image_class }}" valign="top">
        {% if component.image %}
        <img src="{{ component | img_url: 'compact_cropped' }}" align="left" width="40" height="40" class="order-list__product-image"/>
        {% else %}
        <div class="order-list__no-image-cell small">
            <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="20" height="20" class="order-list__no-product-image small"/>
        </div>
        {% endif %}
    </td>

    <td class="{{ order_list_product_description_class }}" valign="top">
        {% if component.product.title %}
            {% assign component_title = component.product.title %}
        {% else %}
            {% assign component_title = component.title %}
        {% endif %}

        {% if line_item_group.deliverable? %}
            <span class="order-list__item-title">{{ component_title }}&nbsp;&times;&nbsp;{{ component.quantity }}</span>
        {% else %}
            <span class="order-list__item-title">{{ component.quantity }}&nbsp;&times;&nbsp;{{ component_title }}</span>
        {% endif %}
        <br>
        {% if component.variant.title != 'Default Title' %}
            <span class="order-list__item-variant">{{ component.variant.title }}</span>
        {% endif %}

        {% if line_item_group.deliverable? %}
            {% if component.discount_allocations %}
                {% for discount_allocation in component.discount_allocations %}
                    {% if discount_allocation.discount_application.target_selection != 'all' %}
                        <p>
                            <span class="order-list__item-discount-allocation">
                            <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
                            <span>
                                {{ discount_allocation.discount_application.title | upcase }}
                                (-{{ discount_allocation.amount | money }})
                            </span>
                            </span>
                        </p>
                    {% endif %}
                {% endfor %}
            {% endif %}
        {% endif %}
    </td>

    {% if line_item_group.deliverable? %}
    <td class="order-list__price-cell">
        {% if component.original_line_price != component.final_line_price %}
            <del class="order-list__item-original-price">{{ component.original_line_price | money }}</del>
        {% endif %}
        <p class="order-list__item-price">
        {% if component.final_line_price > 0 %}
            {{ component.final_line_price | money }}
        {% else %}
            無料
        {% endif %}
        </p>
    </td>
    {% endif %}
</tr>

              {% endfor %}
            {% endif %}
          </table>
        </td>
    </table>
    {% if line_item_group.deliverable? %}
      <td height="100%">
        {% for component in line_item_group.components %}

          <tr>
            <td class="order-list__deliverable-item" height="100%" style="padding: 0;">
              <table height="100%">
                
{% if false %}
  {% assign order_list_item_class = "order-list__bundle-item" %}
  {% assign css_image_class = 'order-list__image-cell' %}
  {% assign order_list_product_description_class = 'order-list__product-description-cell' %}
{% else %}
  {% assign order_list_product_description_class = 'order-list__product-description-cell--nested-line-item' %}
  {% if forloop.last %}
    {% assign css_curved_line_cell_container_class = 'curved-line-cell-container__top-spacer-cell--show-border' %}
    {% assign css_hide_vertical_line_class = 'vertical-line__content--hide' %}
    {% assign css_curved_line_cell_container_cell__no_padding_class = 'curved-line-cell-container__cell--no-padding' %}
  {% endif %}
{% endif %}

<tr height="100%">
    <td class="nested-line-item-spacer-cell" style="padding: 1px;">
        <div class="nested-line-item-spacer"></div>
    </td>
    <td class="curved-line-cell-container" valign="top">
        <div style="width: 0px;">
            <table>
                <tr>
                    <td class="{{ css_curved_line_cell_container_cell__no_padding_class }}" style="mso-padding-right-alt: 10px;">
                        <div class="curved-line-cell-container__top-spacer {{ css_curved_line_cell_container_class }}"></div>
                    </td>
                </tr>
                <tr>
                    <td class="curved-line-cell-container__curvedLine-cell">
                        <div class="curved-line-cell-container__curvedLine-cell__curvedLine"></div>
                    </td>
                </tr>
            </table>
        </div>
    </td>
    <td class="vertical-line" height="100%">
        <div class="vertical-line__content {{ css_hide_vertical_line_class }}"></div>
    </td>
    <td class="nested-line-item-spacer-cell--right">
        <div class="nested-line-item-spacer"></div>
    </td>
    <td class="{{ order_list_item_class }} {{ css_image_class }}" valign="top">
        {% if component.image %}
        <img src="{{ component | img_url: 'compact_cropped' }}" align="left" width="40" height="40" class="order-list__product-image"/>
        {% else %}
        <div class="order-list__no-image-cell small">
            <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="20" height="20" class="order-list__no-product-image small"/>
        </div>
        {% endif %}
    </td>

    <td class="{{ order_list_product_description_class }}" valign="top">
        {% if component.product.title %}
            {% assign component_title = component.product.title %}
        {% else %}
            {% assign component_title = component.title %}
        {% endif %}

        {% if line_item_group.deliverable? %}
            <span class="order-list__item-title">{{ component_title }}&nbsp;&times;&nbsp;{{ component.quantity }}</span>
        {% else %}
            <span class="order-list__item-title">{{ component.quantity }}&nbsp;&times;&nbsp;{{ component_title }}</span>
        {% endif %}
        <br>
        {% if component.variant.title != 'Default Title' %}
            <span class="order-list__item-variant">{{ component.variant.title }}</span>
        {% endif %}

        {% if line_item_group.deliverable? %}
            {% if component.discount_allocations %}
                {% for discount_allocation in component.discount_allocations %}
                    {% if discount_allocation.discount_application.target_selection != 'all' %}
                        <p>
                            <span class="order-list__item-discount-allocation">
                            <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
                            <span>
                                {{ discount_allocation.discount_application.title | upcase }}
                                (-{{ discount_allocation.amount | money }})
                            </span>
                            </span>
                        </p>
                    {% endif %}
                {% endfor %}
            {% endif %}
        {% endif %}
    </td>

    {% if line_item_group.deliverable? %}
    <td class="order-list__price-cell">
        {% if component.original_line_price != component.final_line_price %}
            <del class="order-list__item-original-price">{{ component.original_line_price | money }}</del>
        {% endif %}
        <p class="order-list__item-price">
        {% if component.final_line_price > 0 %}
            {{ component.final_line_price | money }}
        {% else %}
            無料
        {% endif %}
        </p>
    </td>
    {% endif %}
</tr>

              </table>
            </td>
          </tr>
        {% endfor %}
      </td>
    {% endif %}
  </td>
</tr>

            {% else %}
              {% for component in line_item_group.components %}
                
{% comment %} Skip child add-ons since they will be rendered under the parent line item {% endcomment %}
{% unless component.nested_line_child? %}

  {% assign is_parent = false %}
  {% assign is_nested_line_parent = component.nested_line_parent? %}
  {% if component.bundle_parent? or component.nested_line_parent? %}
    {% assign is_parent = true %}
  {% endif %}
  {% if is_nested_line_parent %}
    {% assign css_order_list_cell_nested_line_parent_class = 'order-list__parent-cell' %}
    {% assign css_order_list_parent_image_cell_nested_line_parent_class = 'order-list__nested-parent-image-cell' %}
  {% endif %}

  <tr class="order-list__item">
    <td class="order-list__item__cell {{ css_order_list_cell_nested_line_parent_class }}">
      <table height="100%">
        <td style="padding-bottom: 0px;">
          <table height="100%">
            <tr valign="top">
              {% if false and is_parent %}
                <td class="order-list__parent-image-cell {{ css_order_list_parent_image_cell_nested_line_parent_class }}">
                  {% if component.image %}
                    <img src="{{ component | img_url: 'compact_cropped' }}" align="left" width="60" height="60" class="order-list__product-image"/>
                  {% else %}
                    <div class="order-list__no-image-cell">
                      <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" class="order-list__no-product-image"/>
                    </div>
                  {% endif %}
                </td>
              {% else %}
                <td class="order-list__image-cell">
                  {% if component.image %}
                    <img src="{{ component | img_url: 'compact_cropped' }}" align="left" width="60" height="60" class="order-list__product-image"/>
                  {% else %}
                    <div class="order-list__no-image-cell">
                      <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="60" height="60" class="order-list__no-product-image"/>
                    </div>
                  {% endif %}
                </td>
              {% endif %}
            </tr>
            {% if is_nested_line_parent %}
              <tr height="100%">
                <td style="padding: 0px;" height="100%">
                  <table height="100%">
                    <tr>
                      <td height="100%" class="nested-line-item-spacer-cell">
                        <div class="nested-line-item-spacer"></div>
                      </td>
                      <td height="100%" class="parent-vertical-line__cell">
                        <div class="parent-vertical-line__content"></div>
                      </td>
                    </tr>
                  </table>                        
                </td>
              </tr>
            {% endif %}
          </table>
        </td>

        <td class="order-list__product-description-cell">
          {% if component.presentment_title %}
            {% assign line_title = component.presentment_title %}
          {% elsif component.title %}
            {% assign line_title = component.title %}
          {% else %}
            {% assign line_title = component.product.title %}
          {% endif %}
          {% if line.quantity < component.quantity %}
            {% capture line_display %}
              {{ line.quantity }}/{{ component.quantity }}個
            {% endcapture %}
          {% else %}
            {% assign line_display = component.quantity %}
          {% endif %}

          <span class="order-list__item-title">{{ line_title }}&nbsp;&times;&nbsp;{{ line_display }}</span><br/>

          {% if component.variant.title != 'Default Title' and is_parent == false %}
            <span class="order-list__item-variant">{{ component.variant.title }}</span><br/>
          {% elsif component.variant.title != 'Default Title' and component.nested_line_parent? %}
            <span class="order-list__item-variant">{{ component.variant.title }}</span><br/>
          {% elsif component.variant.title != 'Default Title' and component.bundle_parent? and false == false %}
            <span class="order-list__item-variant">{{ component.variant.title }}</span><br/>
          {% endif %}

          {% if false %}
            {% for child_line in component.bundle_components %}
              
{% if true %}
  {% assign css_class = 'order-list__bundle-item' %}
  {% assign css_image_class = 'order-list__image-cell' %}
  {% assign css_description_class = 'order-list__product-description-cell' %}
{% else %}
  {% assign css_class = 'order-list__deliverable-item_abandoned' %}
  {% assign css_image_class = 'order-list__image-cell--nested-line-item' %}
  {% assign css_description_class = 'order-list__product-description-cell--nested-line-item' %}
  {% if false %}
    {% assign css_curved_line_cell_container_class = 'curved-line-cell-container__top-spacer-cell--show-border' %}
    {% assign css_hide_vertical_line_class = 'vertical-line__content--hide' %}
    {% assign css_curved_line_cell_container_cell__no_padding_class = 'curved-line-cell-container__cell--no-padding' %}
  {% endif %}
{% endif %}

<table height="100%">
  <tr class="order-list__item">
    <td class="{{ css_class }}" height="100%">
      <table height="100%">
        <td class="{{ css_image_class }}">
          {% if child_line.image %}
            <img src="{{ child_line | img_url: 'compact_cropped' }}" align="left" width="40" height="40" class="order-list__product-image small"/>
          {% else %}
            <div class="order-list__no-image-cell small">
              <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="20" height="20" class="order-list__no-product-image small"/>
            </div>
          {% endif %}
        </td>

        <td class="{{ css_description_class }}">
          {% if child_line.product.title %}
            {% assign item_title = child_line.product.title %}
          {% else %}
            {% assign item_title = child_line.title %}
          {% endif %}

          {% assign item_display = child_line.quantity %}

            <span class="order-list__item-title">{{ item_display }}&nbsp;&times;&nbsp;{{ item_title }}</span><br>

          {% if child_line.variant.title != 'Default Title'%}
            <span class="order-list__item-variant">{{ child_line.variant.title }}</span><br/>
          {% endif %}
          {% if child_line.selling_plan_allocation %}
            <span class="order-list__item-variant">{{ child_line.selling_plan_allocation.selling_plan.name }}</span>
          {% endif %}
        </td>
      </table>
    </td>
  </tr>
</table>
            {% endfor %}
          {% else %}
            {% for group in component.groups %}
              {% if group.deliverable? %}
                <span class="order-list__item-variant">対象:{{ group.display_title }}</span><br/>
              {% else %}
                <span class="order-list__item-variant">{{ group.display_title }}の一部</span><br/>
              {% endif %}
            {% endfor %}
          {% endif %}

            {% if component.gift_card and component.properties["__shopify_send_gift_card_to_recipient"] %}
              {% for property in component.properties %}
  {% assign property_first_char = property.first | slice: 0 %}
  {% if property.last != blank and property_first_char != '_' %}
    <div class="order-list__item-property">
      <dt>{{ property.first }}:</dt>
      <dd>
      {% if property.last contains '/uploads/' %}
        <a href="{{ property.last }}" class="link" target="_blank">
        {{ property.last | split: '/' | last }}
        </a>
      {% else %}
        {{ property.last }}
      {% endif %}
      </dd>
    </div>
  {% endif %}
{% endfor %}

            {% endif %}

          {% if component.selling_plan_allocation %}
            <span class="order-list__item-variant">{{ component.selling_plan_allocation.selling_plan.name }}</span><br/>
          {% endif %}

          {% if component.refunded_quantity > 0 %}
            <span class="order-list__item-refunded">返金済み</span>
          {% endif %}

          {% if component.discount_allocations %}
            {% for discount_allocation in component.discount_allocations %}
              {% if discount_allocation.discount_application.target_selection != 'all' %}
              <p>
                <span class="order-list__item-discount-allocation">
                  <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
                  <span>
                    {{ discount_allocation.discount_application.title | upcase }}
                    (-{{ discount_allocation.amount | money }})
                  </span>
                </span>
              </p>
              {% endif %}
            {% endfor %}
          {% endif %}
        </td>
          {% if false and is_parent %}
            <td class="order-list__parent-price-cell">
          {% else %}
            <td class="order-list__price-cell">
          {% endif %}
          {% if component.original_line_price != component.final_line_price %}
            <del class="order-list__item-original-price">{{ component.original_line_price | money }}</del>
          {% endif %}
            <p class="order-list__item-price">
              {% if component.final_line_price > 0 %}
                {{ component.final_line_price | money }}
                {% if component.unit_price_measurement %}
  <div class="order-list__unit-price">
    {{- component.unit_price | unit_price_with_measurement: component.unit_price_measurement -}}
  </div>
{% endif %}
              {% else %}
                無料
              {% endif %}
            </p>
          </td>
        {% if component.nested_line_parent? %}
          {% for child_line in component.nested_lines %}
            
{% if false %}
  {% assign css_class = 'order-list__bundle-item' %}
  {% assign css_image_class = 'order-list__image-cell' %}
  {% assign css_description_class = 'order-list__product-description-cell' %}
{% else %}
  {% assign css_class = 'order-list__deliverable-item_abandoned' %}
  {% assign css_image_class = 'order-list__image-cell--nested-line-item' %}
  {% assign css_description_class = 'order-list__product-description-cell--nested-line-item' %}
  {% if forloop.last %}
    {% assign css_curved_line_cell_container_class = 'curved-line-cell-container__top-spacer-cell--show-border' %}
    {% assign css_hide_vertical_line_class = 'vertical-line__content--hide' %}
    {% assign css_curved_line_cell_container_cell__no_padding_class = 'curved-line-cell-container__cell--no-padding' %}
  {% endif %}
{% endif %}

<table height="100%">
  <tr class="order-list__item">
    <td class="{{ css_class }}" height="100%">
      <table height="100%">
          <td class="nested-line-item-spacer-cell"style="padding: 1px;">
            <div class="nested-line-item-spacer"></div>
          </td>
          <td class="curved-line-cell-container" valign="top">
            <div style="width: 0px;">
              <table>
                <tr>
                  <td class="{{ css_curved_line_cell_container_cell__no_padding_class }}" style="mso-padding-right-alt: 10px;">
                    <div class="curved-line-cell-container__top-spacer {{ css_curved_line_cell_container_class }}"></div>
                  </td>
                </tr>
                <tr>
                  <td class="curved-line-cell-container__curvedLine-cell">
                    <div class="curved-line-cell-container__curvedLine-cell__curvedLine"></div>
                  </td>
                </tr>
              </table>
            </div>
          </td>
          <td class="vertical-line" height="100%">
            <div class="vertical-line__content {{ css_hide_vertical_line_class }}"></div>
          </td>
          <td class="nested-line-item-spacer-cell--right">
            <div class="nested-line-item-spacer"></div>
          </td>
        <td class="{{ css_image_class }}">
          {% if child_line.image %}
            <img src="{{ child_line | img_url: 'compact_cropped' }}" align="left" width="40" height="40" class="order-list__product-image small"/>
          {% else %}
            <div class="order-list__no-image-cell small">
              <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="20" height="20" class="order-list__no-product-image small"/>
            </div>
          {% endif %}
        </td>

        <td class="{{ css_description_class }}">
          {% if child_line.product.title %}
            {% assign item_title = child_line.product.title %}
          {% else %}
            {% assign item_title = child_line.title %}
          {% endif %}

          {% assign item_display = child_line.quantity %}

            <span class="order-list__item-title">{{ item_title }}&nbsp;&times;&nbsp;{{ item_display }}</span><br>

          {% if child_line.variant.title != 'Default Title'%}
            <span class="order-list__item-variant">{{ child_line.variant.title }}</span><br/>
          {% endif %}
          {% if child_line.selling_plan_allocation %}
            <span class="order-list__item-variant">{{ child_line.selling_plan_allocation.selling_plan.name }}</span>
          {% endif %}
        </td>
      </table>
    </td>
  </tr>
</table>
          {% endfor %}
        {% endif %}
      </table>
    </td>
  </tr>

{% endunless %}

              {% endfor %}
            {% endif %}
          {% endif %}
        {% endfor %}
    </table>

    {% unless forloop.last %}
      <hr class="order-list__delivery-method-type-separator">
    {% endunless %}
  {% endif %}
{% endfor %}

            {% else %}
              
  
<table class="row">
  {% for line in subtotal_line_items %}
    {% if line.groups.size == 0 %}
      
{% comment %} Skip child add-ons since they will be rendered under the parent line item {% endcomment %}
{% unless line.nested_line_child? %}

  {% assign is_parent = false %}
  {% assign is_nested_line_parent = line.nested_line_parent? %}
  {% if line.bundle_parent? or line.nested_line_parent? %}
    {% assign is_parent = true %}
  {% endif %}
  {% if is_nested_line_parent %}
    {% assign css_order_list_cell_nested_line_parent_class = 'order-list__parent-cell' %}
    {% assign css_order_list_parent_image_cell_nested_line_parent_class = 'order-list__nested-parent-image-cell' %}
  {% endif %}

  <tr class="order-list__item">
    <td class="order-list__item__cell {{ css_order_list_cell_nested_line_parent_class }}">
      <table height="100%">
        <td style="padding-bottom: 0px;">
          <table height="100%">
            <tr valign="top">
              {% if false and is_parent %}
                <td class="order-list__parent-image-cell {{ css_order_list_parent_image_cell_nested_line_parent_class }}">
                  {% if line.image %}
                    <img src="{{ line | img_url: 'compact_cropped' }}" align="left" width="60" height="60" class="order-list__product-image"/>
                  {% else %}
                    <div class="order-list__no-image-cell">
                      <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" class="order-list__no-product-image"/>
                    </div>
                  {% endif %}
                </td>
              {% else %}
                <td class="order-list__image-cell">
                  {% if line.image %}
                    <img src="{{ line | img_url: 'compact_cropped' }}" align="left" width="60" height="60" class="order-list__product-image"/>
                  {% else %}
                    <div class="order-list__no-image-cell">
                      <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="60" height="60" class="order-list__no-product-image"/>
                    </div>
                  {% endif %}
                </td>
              {% endif %}
            </tr>
            {% if is_nested_line_parent %}
              <tr height="100%">
                <td style="padding: 0px;" height="100%">
                  <table height="100%">
                    <tr>
                      <td height="100%" class="nested-line-item-spacer-cell">
                        <div class="nested-line-item-spacer"></div>
                      </td>
                      <td height="100%" class="parent-vertical-line__cell">
                        <div class="parent-vertical-line__content"></div>
                      </td>
                    </tr>
                  </table>                        
                </td>
              </tr>
            {% endif %}
          </table>
        </td>

        <td class="order-list__product-description-cell">
          {% if line.presentment_title %}
            {% assign line_title = line.presentment_title %}
          {% elsif line.title %}
            {% assign line_title = line.title %}
          {% else %}
            {% assign line_title = line.product.title %}
          {% endif %}
          {% if line.quantity < line.quantity %}
            {% capture line_display %}
              {{ line.quantity }}/{{ line.quantity }}個
            {% endcapture %}
          {% else %}
            {% assign line_display = line.quantity %}
          {% endif %}

          <span class="order-list__item-title">{{ line_title }}&nbsp;&times;&nbsp;{{ line_display }}</span><br/>

          {% if line.variant.title != 'Default Title' and is_parent == false %}
            <span class="order-list__item-variant">{{ line.variant.title }}</span><br/>
          {% elsif line.variant.title != 'Default Title' and line.nested_line_parent? %}
            <span class="order-list__item-variant">{{ line.variant.title }}</span><br/>
          {% elsif line.variant.title != 'Default Title' and line.bundle_parent? and false == false %}
            <span class="order-list__item-variant">{{ line.variant.title }}</span><br/>
          {% endif %}

          {% if false %}
            {% for child_line in line.bundle_components %}
              
{% if true %}
  {% assign css_class = 'order-list__bundle-item' %}
  {% assign css_image_class = 'order-list__image-cell' %}
  {% assign css_description_class = 'order-list__product-description-cell' %}
{% else %}
  {% assign css_class = 'order-list__deliverable-item_abandoned' %}
  {% assign css_image_class = 'order-list__image-cell--nested-line-item' %}
  {% assign css_description_class = 'order-list__product-description-cell--nested-line-item' %}
  {% if false %}
    {% assign css_curved_line_cell_container_class = 'curved-line-cell-container__top-spacer-cell--show-border' %}
    {% assign css_hide_vertical_line_class = 'vertical-line__content--hide' %}
    {% assign css_curved_line_cell_container_cell__no_padding_class = 'curved-line-cell-container__cell--no-padding' %}
  {% endif %}
{% endif %}

<table height="100%">
  <tr class="order-list__item">
    <td class="{{ css_class }}" height="100%">
      <table height="100%">
        <td class="{{ css_image_class }}">
          {% if child_line.image %}
            <img src="{{ child_line | img_url: 'compact_cropped' }}" align="left" width="40" height="40" class="order-list__product-image small"/>
          {% else %}
            <div class="order-list__no-image-cell small">
              <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="20" height="20" class="order-list__no-product-image small"/>
            </div>
          {% endif %}
        </td>

        <td class="{{ css_description_class }}">
          {% if child_line.product.title %}
            {% assign item_title = child_line.product.title %}
          {% else %}
            {% assign item_title = child_line.title %}
          {% endif %}

          {% assign item_display = child_line.quantity %}

            <span class="order-list__item-title">{{ item_display }}&nbsp;&times;&nbsp;{{ item_title }}</span><br>

          {% if child_line.variant.title != 'Default Title'%}
            <span class="order-list__item-variant">{{ child_line.variant.title }}</span><br/>
          {% endif %}
          {% if child_line.selling_plan_allocation %}
            <span class="order-list__item-variant">{{ child_line.selling_plan_allocation.selling_plan.name }}</span>
          {% endif %}
        </td>
      </table>
    </td>
  </tr>
</table>
            {% endfor %}
          {% else %}
            {% for group in line.groups %}
              {% if group.deliverable? %}
                <span class="order-list__item-variant">対象:{{ group.display_title }}</span><br/>
              {% else %}
                <span class="order-list__item-variant">{{ group.display_title }}の一部</span><br/>
              {% endif %}
            {% endfor %}
          {% endif %}

            {% if line.gift_card and line.properties["__shopify_send_gift_card_to_recipient"] %}
              {% for property in line.properties %}
  {% assign property_first_char = property.first | slice: 0 %}
  {% if property.last != blank and property_first_char != '_' %}
    <div class="order-list__item-property">
      <dt>{{ property.first }}:</dt>
      <dd>
      {% if property.last contains '/uploads/' %}
        <a href="{{ property.last }}" class="link" target="_blank">
        {{ property.last | split: '/' | last }}
        </a>
      {% else %}
        {{ property.last }}
      {% endif %}
      </dd>
    </div>
  {% endif %}
{% endfor %}

            {% endif %}

          {% if line.selling_plan_allocation %}
            <span class="order-list__item-variant">{{ line.selling_plan_allocation.selling_plan.name }}</span><br/>
          {% endif %}

          {% if line.refunded_quantity > 0 %}
            <span class="order-list__item-refunded">返金済み</span>
          {% endif %}

          {% if line.discount_allocations %}
            {% for discount_allocation in line.discount_allocations %}
              {% if discount_allocation.discount_application.target_selection != 'all' %}
              <p>
                <span class="order-list__item-discount-allocation">
                  <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
                  <span>
                    {{ discount_allocation.discount_application.title | upcase }}
                    (-{{ discount_allocation.amount | money }})
                  </span>
                </span>
              </p>
              {% endif %}
            {% endfor %}
          {% endif %}
        </td>
          {% if false and is_parent %}
            <td class="order-list__parent-price-cell">
          {% else %}
            <td class="order-list__price-cell">
          {% endif %}
          {% if line.original_line_price != line.final_line_price %}
            <del class="order-list__item-original-price">{{ line.original_line_price | money }}</del>
          {% endif %}
            <p class="order-list__item-price">
              {% if line.final_line_price > 0 %}
                {{ line.final_line_price | money }}
                {% if line.unit_price_measurement %}
  <div class="order-list__unit-price">
    {{- line.unit_price | unit_price_with_measurement: line.unit_price_measurement -}}
  </div>
{% endif %}
              {% else %}
                無料
              {% endif %}
            </p>
          </td>
        {% if line.nested_line_parent? %}
          {% for child_line in line.nested_lines %}
            
{% if false %}
  {% assign css_class = 'order-list__bundle-item' %}
  {% assign css_image_class = 'order-list__image-cell' %}
  {% assign css_description_class = 'order-list__product-description-cell' %}
{% else %}
  {% assign css_class = 'order-list__deliverable-item_abandoned' %}
  {% assign css_image_class = 'order-list__image-cell--nested-line-item' %}
  {% assign css_description_class = 'order-list__product-description-cell--nested-line-item' %}
  {% if forloop.last %}
    {% assign css_curved_line_cell_container_class = 'curved-line-cell-container__top-spacer-cell--show-border' %}
    {% assign css_hide_vertical_line_class = 'vertical-line__content--hide' %}
    {% assign css_curved_line_cell_container_cell__no_padding_class = 'curved-line-cell-container__cell--no-padding' %}
  {% endif %}
{% endif %}

<table height="100%">
  <tr class="order-list__item">
    <td class="{{ css_class }}" height="100%">
      <table height="100%">
          <td class="nested-line-item-spacer-cell"style="padding: 1px;">
            <div class="nested-line-item-spacer"></div>
          </td>
          <td class="curved-line-cell-container" valign="top">
            <div style="width: 0px;">
              <table>
                <tr>
                  <td class="{{ css_curved_line_cell_container_cell__no_padding_class }}" style="mso-padding-right-alt: 10px;">
                    <div class="curved-line-cell-container__top-spacer {{ css_curved_line_cell_container_class }}"></div>
                  </td>
                </tr>
                <tr>
                  <td class="curved-line-cell-container__curvedLine-cell">
                    <div class="curved-line-cell-container__curvedLine-cell__curvedLine"></div>
                  </td>
                </tr>
              </table>
            </div>
          </td>
          <td class="vertical-line" height="100%">
            <div class="vertical-line__content {{ css_hide_vertical_line_class }}"></div>
          </td>
          <td class="nested-line-item-spacer-cell--right">
            <div class="nested-line-item-spacer"></div>
          </td>
        <td class="{{ css_image_class }}">
          {% if child_line.image %}
            <img src="{{ child_line | img_url: 'compact_cropped' }}" align="left" width="40" height="40" class="order-list__product-image small"/>
          {% else %}
            <div class="order-list__no-image-cell small">
              <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="20" height="20" class="order-list__no-product-image small"/>
            </div>
          {% endif %}
        </td>

        <td class="{{ css_description_class }}">
          {% if child_line.product.title %}
            {% assign item_title = child_line.product.title %}
          {% else %}
            {% assign item_title = child_line.title %}
          {% endif %}

          {% assign item_display = child_line.quantity %}

            <span class="order-list__item-title">{{ item_title }}&nbsp;&times;&nbsp;{{ item_display }}</span><br>

          {% if child_line.variant.title != 'Default Title'%}
            <span class="order-list__item-variant">{{ child_line.variant.title }}</span><br/>
          {% endif %}
          {% if child_line.selling_plan_allocation %}
            <span class="order-list__item-variant">{{ child_line.selling_plan_allocation.selling_plan.name }}</span>
          {% endif %}
        </td>
      </table>
    </td>
  </tr>
</table>
          {% endfor %}
        {% endif %}
      </table>
    </td>
  </tr>

{% endunless %}

    {% endif %}
  {% endfor %}
  {% for line_item_group in line_item_groups %}
    
{% assign final_line_price = 0 %}
{% assign original_line_price = 0 %}
{% assign discount_keys_str = "" %}
{% assign parent_line_item = nil %}

{% if line_item_group.deliverable? == false %}
  {% assign line_item_group_class = "order-list__item__cell" %}
  {% for component in line_item_group.components %}
    {% assign final_line_price = final_line_price | plus: component.final_line_price %}
    {% assign original_line_price = original_line_price | plus: component.original_line_price %}

    {% for da in component.discount_allocations %}
      {% if da.discount_application.target_selection != 'all' %}
        {% assign discount_key = da.discount_application.title | append: da.discount_application.type %}
        {% assign discount_keys_str = discount_keys_str | append: discount_key | append: "," %}
      {% endif %}
    {% endfor %}
  {% endfor %}
{% endif %}

{% if line_item_group.deliverable? %}
  {% assign parent_line_item = line_item_group.parent_sales_line_item %}
  {% assign final_line_price = parent_line_item.final_line_price %}
  {% assign original_line_price = parent_line_item.original_line_price %}
  {% assign line_item_group_class = "order-list__parent_item__cell" %}
  {% assign padding_bottom_none_class = "padding-bottom-none" %}
{% endif %}

{% assign discount_keys = discount_keys_str | split: "," | uniq %}

<tr class="order-list__item">
  <td class="{{ line_item_group_class }}" style="padding: 15px 0 0px 1px;">
    <table height="100%">
        <td class="order-list__parent-image-cell">
          <table height="100%">
            <tr>
              <td class="{{ padding_bottom_none_class }}" valign="top">
                {% if parent_line_item and parent_line_item.image %}
                  <img src="{{ parent_line_item | img_url: 'compact_cropped' }}" align="left" width="60" height="60" class="order-list__product-image"/>
                {% elsif line_item_group.image %}
                  <img src="{{ line_item_group | img_url: 'compact_cropped' }}" align="left" width="60" height="60" class="order-list__product-image"/>
                {% else %}
                  <div class="order-list__no-image-cell">
                    <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="30" height="30" class="order-list__no-product-image"/>
                  </div>
                {% endif %}
              </td>
            </tr>
            {% if line_item_group.deliverable? == true %}
              <tr height="100%">
                <td height="100%" class="parent-vertical-line__cell">
                  <table height="100%" style="width: auto;">
                    <tr>
                      <td height="100%" class="nested-line-item-spacer-cell">
                        <div style="width: 6px;"></div>
                      </td>
                      <td height="100%" class="parent-vertical-line__cell">
                        <div class="parent-vertical-line__content"></div>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            {% endif %}
          </table>
        </td>

        <td class="order-list__product-description-cell">
          <table>
            <tr>
              <td class="order-list__product-description-cell" colspan="2">
                <span class="order-list__item-title">{{ line_item_group.display_title }}&nbsp;&times;&nbsp;{{ line_item_group.quantity }}</span><br/>
                {% if line_item_group.variant and line_item_group.variant.title != 'Default Title' %}
                  <span class="order-list__item-variant">{{ line_item_group.variant.title }}</span>
                {% endif %}

                {% if line_item_group.deliverable? %}
                  {% if parent_line_item.discount_allocations %}
                    {% for discount_allocation in parent_line_item.discount_allocations %}
                      {% if discount_allocation.discount_application.target_selection != 'all' %}
                        <p>
                          <span class="order-list__item-discount-allocation">
                            <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
                            <span>
                              {{ discount_allocation.discount_application.title | upcase }}
                              (-{{ discount_allocation.amount | money }})
                            </span>
                          </span>
                        </p>
                      {% endif %}
                    {% endfor %}
                  {% endif %}
                {% else %}
                  {% for discount_key in discount_keys %}
                    {% assign discount_amount = 0 %}

                    {% for component in line_item_group.components %}
                      {% for da in component.discount_allocations %}
                        {% assign key = da.discount_application.title | append: da.discount_application.type %}
                        {% if da.discount_application.target_selection != 'all' and key == discount_key %}
                          {% assign discount_amount = discount_amount | plus: da.amount %}
                          {% assign discount_title = da.discount_application.title %}
                        {% endif %}
                      {% endfor %}
                    {% endfor %}

                    <p>
                      <span class="order-list__item-discount-allocation">
                        <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
                        <span>
                          {{ discount_title | upcase }}
                          (-{{ discount_amount | money }})
                        </span>
                      </span>
                    </p>
                  {% endfor %}
                {% endif %}
              </td>

                <td class="order-list__parent_price-cell">
                  {% if original_line_price != final_line_price %}
                    <del class="order-list__item-original-price">{{ original_line_price | money }}</del>
                  {% endif %}
                  <p class="order-list__item-price">
                    {% if final_line_price > 0 %}
                      {{ final_line_price | money }}
                    {% else %}
                      {{ 'notifications.views.mailers.notifications.discount_free' | t }}
                    {% endif %}
                  </p>
                </td>
            </tr>

            {% if line_item_group.deliverable? == false %}
              {% for component in line_item_group.components %}
                
{% if true %}
  {% assign order_list_item_class = "order-list__bundle-item" %}
  {% assign css_image_class = 'order-list__image-cell' %}
  {% assign order_list_product_description_class = 'order-list__product-description-cell' %}
{% else %}
  {% assign order_list_product_description_class = 'order-list__product-description-cell--nested-line-item' %}
  {% if false %}
    {% assign css_curved_line_cell_container_class = 'curved-line-cell-container__top-spacer-cell--show-border' %}
    {% assign css_hide_vertical_line_class = 'vertical-line__content--hide' %}
    {% assign css_curved_line_cell_container_cell__no_padding_class = 'curved-line-cell-container__cell--no-padding' %}
  {% endif %}
{% endif %}

<tr height="100%">
    <td class="{{ order_list_item_class }} {{ css_image_class }}" valign="top">
        {% if component.image %}
        <img src="{{ component | img_url: 'compact_cropped' }}" align="left" width="40" height="40" class="order-list__product-image"/>
        {% else %}
        <div class="order-list__no-image-cell small">
            <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="20" height="20" class="order-list__no-product-image small"/>
        </div>
        {% endif %}
    </td>

    <td class="{{ order_list_product_description_class }}" valign="top">
        {% if component.product.title %}
            {% assign component_title = component.product.title %}
        {% else %}
            {% assign component_title = component.title %}
        {% endif %}

        {% if line_item_group.deliverable? %}
            <span class="order-list__item-title">{{ component_title }}&nbsp;&times;&nbsp;{{ component.quantity }}</span>
        {% else %}
            <span class="order-list__item-title">{{ component.quantity }}&nbsp;&times;&nbsp;{{ component_title }}</span>
        {% endif %}
        <br>
        {% if component.variant.title != 'Default Title' %}
            <span class="order-list__item-variant">{{ component.variant.title }}</span>
        {% endif %}

        {% if line_item_group.deliverable? %}
            {% if component.discount_allocations %}
                {% for discount_allocation in component.discount_allocations %}
                    {% if discount_allocation.discount_application.target_selection != 'all' %}
                        <p>
                            <span class="order-list__item-discount-allocation">
                            <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
                            <span>
                                {{ discount_allocation.discount_application.title | upcase }}
                                (-{{ discount_allocation.amount | money }})
                            </span>
                            </span>
                        </p>
                    {% endif %}
                {% endfor %}
            {% endif %}
        {% endif %}
    </td>

    {% if line_item_group.deliverable? %}
    <td class="order-list__price-cell">
        {% if component.original_line_price != component.final_line_price %}
            <del class="order-list__item-original-price">{{ component.original_line_price | money }}</del>
        {% endif %}
        <p class="order-list__item-price">
        {% if component.final_line_price > 0 %}
            {{ component.final_line_price | money }}
        {% else %}
            無料
        {% endif %}
        </p>
    </td>
    {% endif %}
</tr>

              {% endfor %}
            {% endif %}
          </table>
        </td>
    </table>
    {% if line_item_group.deliverable? %}
      <td height="100%">
        {% for component in line_item_group.components %}

          <tr>
            <td class="order-list__deliverable-item" height="100%" style="padding: 0;">
              <table height="100%">
                
{% if false %}
  {% assign order_list_item_class = "order-list__bundle-item" %}
  {% assign css_image_class = 'order-list__image-cell' %}
  {% assign order_list_product_description_class = 'order-list__product-description-cell' %}
{% else %}
  {% assign order_list_product_description_class = 'order-list__product-description-cell--nested-line-item' %}
  {% if forloop.last %}
    {% assign css_curved_line_cell_container_class = 'curved-line-cell-container__top-spacer-cell--show-border' %}
    {% assign css_hide_vertical_line_class = 'vertical-line__content--hide' %}
    {% assign css_curved_line_cell_container_cell__no_padding_class = 'curved-line-cell-container__cell--no-padding' %}
  {% endif %}
{% endif %}

<tr height="100%">
    <td class="nested-line-item-spacer-cell" style="padding: 1px;">
        <div class="nested-line-item-spacer"></div>
    </td>
    <td class="curved-line-cell-container" valign="top">
        <div style="width: 0px;">
            <table>
                <tr>
                    <td class="{{ css_curved_line_cell_container_cell__no_padding_class }}" style="mso-padding-right-alt: 10px;">
                        <div class="curved-line-cell-container__top-spacer {{ css_curved_line_cell_container_class }}"></div>
                    </td>
                </tr>
                <tr>
                    <td class="curved-line-cell-container__curvedLine-cell">
                        <div class="curved-line-cell-container__curvedLine-cell__curvedLine"></div>
                    </td>
                </tr>
            </table>
        </div>
    </td>
    <td class="vertical-line" height="100%">
        <div class="vertical-line__content {{ css_hide_vertical_line_class }}"></div>
    </td>
    <td class="nested-line-item-spacer-cell--right">
        <div class="nested-line-item-spacer"></div>
    </td>
    <td class="{{ order_list_item_class }} {{ css_image_class }}" valign="top">
        {% if component.image %}
        <img src="{{ component | img_url: 'compact_cropped' }}" align="left" width="40" height="40" class="order-list__product-image"/>
        {% else %}
        <div class="order-list__no-image-cell small">
            <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="20" height="20" class="order-list__no-product-image small"/>
        </div>
        {% endif %}
    </td>

    <td class="{{ order_list_product_description_class }}" valign="top">
        {% if component.product.title %}
            {% assign component_title = component.product.title %}
        {% else %}
            {% assign component_title = component.title %}
        {% endif %}

        {% if line_item_group.deliverable? %}
            <span class="order-list__item-title">{{ component_title }}&nbsp;&times;&nbsp;{{ component.quantity }}</span>
        {% else %}
            <span class="order-list__item-title">{{ component.quantity }}&nbsp;&times;&nbsp;{{ component_title }}</span>
        {% endif %}
        <br>
        {% if component.variant.title != 'Default Title' %}
            <span class="order-list__item-variant">{{ component.variant.title }}</span>
        {% endif %}

        {% if line_item_group.deliverable? %}
            {% if component.discount_allocations %}
                {% for discount_allocation in component.discount_allocations %}
                    {% if discount_allocation.discount_application.target_selection != 'all' %}
                        <p>
                            <span class="order-list__item-discount-allocation">
                            <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
                            <span>
                                {{ discount_allocation.discount_application.title | upcase }}
                                (-{{ discount_allocation.amount | money }})
                            </span>
                            </span>
                        </p>
                    {% endif %}
                {% endfor %}
            {% endif %}
        {% endif %}
    </td>

    {% if line_item_group.deliverable? %}
    <td class="order-list__price-cell">
        {% if component.original_line_price != component.final_line_price %}
            <del class="order-list__item-original-price">{{ component.original_line_price | money }}</del>
        {% endif %}
        <p class="order-list__item-price">
        {% if component.final_line_price > 0 %}
            {{ component.final_line_price | money }}
        {% else %}
            無料
        {% endif %}
        </p>
    </td>
    {% endif %}
</tr>

              </table>
            </td>
          </tr>
        {% endfor %}
      </td>
    {% endif %}
  </td>
</tr>

  {% endfor %}
</table>

            {% endif %}
            <table class="row subtotal-lines">
  <tr>
    <td class="subtotal-spacer"></td>
    <td>
      <table class="row subtotal-table">

        
{% assign total_order_discount_amount = 0 %}
{% assign has_shipping_discount = false %}
{% assign epsilon = 0.00001 %}

{% for discount_application in discount_applications %}
  {% if discount_application.target_selection == 'all' and discount_application.target_type == 'line_item' %}
    {% assign order_discount_count = order_discount_count | plus: 1 %}
    {% assign total_order_discount_amount = total_order_discount_amount | plus: discount_application.total_allocated_amount %}
  {% endif %}
  {% if discount_application.target_type == 'shipping_line' %}
    {% assign has_shipping_discount = true %}
    {% assign shipping_discount_title = discount_application.title %}
    {% assign discount_value_price = discount_application.total_allocated_amount %}
    {% assign shipping_amount_minus_discount_value_price = shipping_price | minus: discount_value_price %}
    {% assign shipping_amount_minus_discount_value_price_abs = shipping_amount_minus_discount_value_price | abs %}
    {% assign discount_application_value_type = discount_application.value_type | strip %}
    {% if shipping_amount_minus_discount_value_price_abs < epsilon or discount_application_value_type == 'percentage' and discount_application.value == 100 %}
      {% assign free_shipping = true %}
    {% else %}
      {% assign discounted_shipping_price = shipping_amount_minus_discount_value_price %}
    {% endif %}
  {% endif %}
{% endfor %}


  
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>小計</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{{ subtotal_price | plus: total_order_discount_amount | money }}</strong>
  </td>
</tr>



{% if order_discount_count > 0 %}
  {% if order_discount_count == 1 %}
    
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>注文のディスカウント</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>-{{ total_order_discount_amount | money }}</strong>
  </td>
</tr>

  {% endif %}
  {% if order_discount_count > 1 %}
    
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>注文のディスカウント</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>-{{ total_order_discount_amount | money }}</strong>
  </td>
</tr>

  {% endif %}
  {% for discount_application in discount_applications %}
    {% if discount_application.target_selection == 'all' and discount_application.target_type != 'shipping_line' %}
      <tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span class="subtotal-line__discount">
        <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
        <span class="subtotal-line__discount-title">
            {{ discount_application.title }} (-{{ discount_application.total_allocated_amount | money }})
        </span>
      </span>
    </p>
  </td>
</tr>

    {% endif %}
  {% endfor %}
{% endif %}


        {% unless retail_delivery_only %}
          {% assign shipping_type_total = 0 %}
          {% assign shipping_type_original_total = 0 %}
          {% for method in shipping_methods %}
            {% assign shipping_type_total = shipping_type_total | plus: method.price_with_discounts %}
            {% assign shipping_type_original_total = shipping_type_original_total | plus: method.original_price %}
          {% endfor %}
          {% assign pickup_type_total = 0 %}
          {% for method in pickup_methods %}
            {% assign pickup_type_total = pickup_type_total | plus: method.price_with_discounts %}
          {% endfor %}
          {% assign render_fallback_delivery_subtotal = false %}
          {% if shipping_methods.size == 0 and pickup_methods.size == 0 %}
            {% assign render_fallback_delivery_subtotal = true %}
          {% endif %}
          {% if delivery_method_for_subtotal == 'pick-up' and pickup_methods.size == 0 %}
            {% assign render_fallback_delivery_subtotal = true %}
          {% endif %}
          {% if shipping_methods.size > 0 and render_fallback_delivery_subtotal != true %}
            {% if has_shipping_discount %}
              {% if free_shipping == true or shipping_type_total == 0 %}
                
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>配送</span>
    </p>
  </td>
  <td class="subtotal-line__value">
    <del>{% if shipping_type_original_total != 0 %}{{ shipping_type_original_total | money }}{% endif %} </del>
      <strong>無料</strong>
  </td>
</tr>

              {% else %}
                
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>配送</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{{ shipping_type_total | money }}</strong>
  </td>
</tr>

              {% endif %}
              <tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span class="subtotal-line__discount">
        <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
        <span class="subtotal-line__discount-title">
            {{ shipping_discount_title }} 
            {% if discount_value_price != 0 %}
              (-{{ discount_value_price | money }})
            {% endif %}
        </span>
      </span>
    </p>
  </td>
</tr>

            {% else %}
              
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>配送</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{{ shipping_type_total | money }}</strong>
  </td>
</tr>

            {% endif %}
          {% endif %}
          {% if pickup_methods.size > 0 %}
            
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>受取</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{{ pickup_type_total | money }}</strong>
  </td>
</tr>

            {% if has_shipping_discount and shipping_methods.size == 0 %}
              <tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span class="subtotal-line__discount">
        <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
        <span class="subtotal-line__discount-title">
            {{ shipping_discount_title }} 
            {% if discount_value_price != 0 %}
              (-{{ discount_value_price | money }})
            {% endif %}
        </span>
      </span>
    </p>
  </td>
</tr>

            {% endif %}
          {% endif %}
          {% if render_fallback_delivery_subtotal %}
            {%- capture fallback_delivery_title -%}
              {%- if delivery_method_for_subtotal == 'pick-up' -%}
                受取
              {%- else -%}
                配送
              {%- endif -%}
            {%- endcapture -%}
            {% if has_shipping_discount %}
              {% if free_shipping == true or shipping_price == 0 %}
                
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>{{ fallback_delivery_title }}</span>
    </p>
  </td>
  <td class="subtotal-line__value">
    <del>{% if shipping_price != 0 %}{{ shipping_price | money }}{% endif %} </del>
      <strong>無料</strong>
  </td>
</tr>

              {% else %}
                
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>{{ fallback_delivery_title }}</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{{ discounted_shipping_price | money }}</strong>
  </td>
</tr>

              {% endif %}
              <tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span class="subtotal-line__discount">
        <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
        <span class="subtotal-line__discount-title">
            {{ shipping_discount_title }} 
            {% if discount_value_price != 0 %}
              (-{{ discount_value_price | money }})
            {% endif %}
        </span>
      </span>
    </p>
  </td>
</tr>

            {% else %}
              
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>{{ fallback_delivery_title }}</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{{ shipping_price | money }}</strong>
  </td>
</tr>

            {% endif %}
          {% endif %}
        {% endunless %}

        {% if total_duties %}
          
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>関税</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{{ total_duties | money }}</strong>
  </td>
</tr>

        {% endif %}

        
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>税金合計</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{{ tax_price | money }}</strong>
  </td>
</tr>


        {% if total_tip and total_tip > 0 %}
          
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>Tip</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{{ total_tip | money }}</strong>
  </td>
</tr>

        {% endif %}
      </table>

      {% assign transaction_size = 0 %}
      {% assign transaction_amount = 0 %}
      {% assign net_transaction_amount_rounding = 0 %}
      {% assign authorized_amount = 0 %}
      {% assign has_refunds = false %}
      {% assign shopify_pay_captured = false %}
      {% assign shop_cash_offers_captured = false %}
      {% for transaction in transactions %}
        {% if transaction.kind == "sale" or transaction.kind == "capture" %}
          {% if transaction.status == "success" %}
            {% if transaction.payment_details.credit_card_company %}
              {% assign shopify_pay_captured = true %}
            {% endif %}
            {% if transaction.gateway == "shop_cash" or transaction.gateway == "shop_offer" %}
              {% assign shop_cash_offers_captured = true %}
            {% endif %}
            {% assign transaction_size = transaction_size | plus: 1 %}
            {% assign transaction_amount = transaction_amount | plus: transaction.amount %}
            {% if transaction.amount_rounding != nil %}
              {% assign net_transaction_amount_rounding = net_transaction_amount_rounding | plus: transaction.amount_rounding %}
            {% endif %}
          {% endif %}
        {% elsif transaction.kind == "authorization" %}
          {% if transaction.status == "success" %}
            {% assign authorized_amount = authorized_amount | plus: transaction.amount %}
          {% endif %}
        {% elsif transaction.kind == "refund" or transaction.kind == "change" %}
          {% if transaction.status == "success" or transaction.status == "pending" %}
            {% assign transaction_size = transaction_size | plus: 1 %}
            {% assign transaction_amount = transaction_amount | minus: transaction.amount %}
            {% assign has_refunds = true %}
            {% if transaction.amount_rounding != nil %}
              {% assign net_transaction_amount_rounding = net_transaction_amount_rounding | minus: transaction.amount_rounding %}
            {% endif %}
          {% endif %}
        {% endif %}
      {% endfor %}

      {% # Add shop cash/offer transactions to totals if shopify pay is captured and shop cash/offer is not captured yet %}
      {% if shopify_pay_captured == true and shop_cash_offers_captured == false %}
        {% for transaction in transactions %}
        {% if transaction.status == "success" %}
          {% if transaction.kind == "authorization" and transaction.gateway == "shop_cash" or transaction.gateway == "shop_offer" %}
              {% assign transaction_size = transaction_size | plus: 1 %}
              {% assign transaction_amount = transaction_amount | plus: transaction.amount %}
              {% if transaction.amount_rounding != nil %}
                {% assign net_transaction_amount_rounding = net_transaction_amount_rounding | plus: transaction.amount_rounding %}
              {% endif %}
          {% endif %}
        {% endif %}
      {% endfor %}
      {% endif %}
      <table class="row subtotal-table subtotal-table--total">
      {% if payment_terms and payment_terms.automatic_capture_at_fulfillment == false or b2b? %}
        {% assign next_payment = payment_terms.next_payment %}
        {% assign due_at_date = next_payment.due_at | date: "%b %d, %Y" %}
        {% if net_transaction_amount_rounding != 0 %}
          
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>合計</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{{ total_price | money_with_currency }}</strong>
  </td>
</tr>

          {% if total_discounts > 0 %}
            <tr class="subtotal-line">
              <td></td>
              <td class="subtotal-line__value total-discount">
                  割引 <span class="total-discount--amount">{{ total_discounts | money }}</span>
              </td>
            </tr>
          {% endif %}
          <tr><td colspan="2" class="subtotal-table__line"></td></tr>
          <div class="subtotal-line__value-small">
            
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>キャッシュの端数処理</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{% if net_transaction_amount_rounding < 0 %}-{% endif %} {{ net_transaction_amount_rounding | abs | money }}</strong>
  </td>
</tr>

          </div>
          <tr><td colspan="2" class="subtotal-table__line"></td></tr>
        {% endif %}
        
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>支払合計 (本日)</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{{ transaction_amount | plus: net_transaction_amount_rounding | money_with_currency }}</strong>
  </td>
</tr>

        <div class="payment-terms">
          {% assign next_amount_due = total_price %}
          {% if next_payment %}
            {% assign next_amount_due = next_payment.amount_due %}
          {% elsif total_outstanding > 0 %}
            {% assign next_amount_due = total_outstanding %}
          {% endif %}

          {% if payment_terms.type == 'receipt' %}
            
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>受領時の支払合計</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{{ next_amount_due | money_with_currency }}</strong>
  </td>
</tr>

          {% elsif payment_terms.type == 'fulfillment' %}
            
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>フルフィルメント時の支払合計</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{{ next_amount_due | money_with_currency }}</strong>
  </td>
</tr>

          {% else %}
            
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>支払合計期限: {{ due_at_date }}</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{{ next_amount_due | money_with_currency }}</strong>
  </td>
</tr>

          {% endif %}
        </div>
        {% if total_discounts > 0 and net_transaction_amount_rounding == 0 %}
          <tr class="subtotal-line">
            <td></td>
            <td class="subtotal-line__value total-discount">
                割引 <span class="total-discount--amount">{{ total_discounts | money }}</span>
            </td>
          </tr>
        {% endif %}
      {% else %}
        
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>合計</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{{ total_price | money_with_currency }}</strong>
  </td>
</tr>

        {% if total_discounts > 0 %}
          <tr class="subtotal-line">
            <td></td>
            <td class="subtotal-line__value total-discount">
                割引 <span class="total-discount--amount">{{ total_discounts | money }}</span>
            </td>
          </tr>
        {% endif %}
        {% if net_transaction_amount_rounding != 0 %}
          <tr><td colspan="2" class="subtotal-table__line"></td></tr>
          <div class="subtotal-line__value-small">
            
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>キャッシュの端数処理</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{% if net_transaction_amount_rounding < 0 %}-{% endif %} {{ net_transaction_amount_rounding | abs | money }}</strong>
  </td>
</tr>

          </div>
          {% if financial_status == 'paid' %}
            
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>支払い済み</span>
        <br>
        <small>{{ order.transactions | map: 'gateway_display_name' | uniq | join: ', ' }}</small>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{{ transaction_amount | plus: net_transaction_amount_rounding | money_with_currency }}</strong>
  </td>
</tr>

          {% endif %}
        {% endif %}
        {% if transaction_amount != total_price and payment_terms == nil%}
          {% if transaction_amount == 0 and authorized_amount > 0 and has_refunds == false %}
          {% else %}
            <div class="payment-terms">
              
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>支払合計 (本日)</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{{ transaction_amount | plus: net_transaction_amount_rounding | money_with_currency }}</strong>
  </td>
</tr>

            </div>
          {% endif %}
        {% endif %}
      {% endif %}
      </table>

      {% unless payment_terms %}
      {% if transaction_size > 1 or transaction_amount < total_price %}
        <table class="row subtotal-table">
          <tr><td colspan="2" class="subtotal-table__line"></td></tr>
          <tr><td colspan="2" class="subtotal-table__small-space"></td></tr>

          {% for transaction in transactions %}
            {% assign amount_rounding = 0 %}
            {% if transaction.amount_rounding != 0 %}
              {% assign amount_rounding =  transaction.amount_rounding %}
            {% endif %}
            {% if transaction.status == "success" and transaction.kind == "capture" or transaction.kind == "sale" %}
              {% if transaction.payment_details.gift_card_last_four_digits %}
                {% capture transaction_name %}ギフトカード (下4桁が{{ transaction.payment_details.gift_card_last_four_digits }}){% endcapture %}
              {% elsif transaction.payment_details.local_payment? %}
                {% capture transaction_name %}{{ transaction.payment_details.payment_method_display_name | default: transaction.payment_details.payment_method_name }}{% endcapture %}
              {% elsif transaction.payment_details.credit_card_company %}
                {% capture transaction_name %}{{ transaction.payment_details.credit_card_company }} (カード番号下4桁: {{ transaction.payment_details.credit_card_last_four_digits }}){% endcapture %}
              {% else %}
                {% capture transaction_name %}{{ transaction.gateway_display_name }}{% endcapture %}
              {% endif %}

              
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>{{transaction_name}}</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{{ transaction.amount | plus: amount_rounding | money }}</strong>
  </td>
</tr>

            {% elsif shopify_pay_captured and shop_cash_offers_captured == false and transaction.kind == "authorization" and transaction.gateway == "shop_cash" or transaction.gateway == "shop_offer" %}
              {% capture transaction_name %}{{ transaction.gateway_display_name }}{% endcapture %}

              
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>{{transaction_name}}</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{{ transaction.amount | plus: amount_rounding | money }}</strong>
  </td>
</tr>

            {% endif %}
            {% if transaction.kind == 'refund' and transaction.gateway != "shop_offer" %}
              {% if transaction.payment_details.gift_card_last_four_digits %}
                {% capture refund_method_subtitle %}{{ transaction.payment_details.type | replace: '_', ' ' | capitalize }}{% endcapture %}
              {% elsif transaction.payment_details.local_payment? %}
                {% capture refund_method_subtitle %}{{ transaction.payment_details.payment_method_display_name | default: transaction.payment_details.payment_method_name }}{% endcapture %}
              {% elsif transaction.payment_details.credit_card_company %}
                {% capture refund_method_subtitle %}{{ transaction.payment_details.credit_card_company | replace: '_', ' ' | capitalize }}{% endcapture %}
              {% else %}
                {% capture refund_method_subtitle %}{{ transaction.gateway_display_name | replace: '_', ' ' | capitalize }}{% endcapture %}
              {% endif %}

              {% if transaction.gateway == 'shopify_store_credit' %}
                {% assign link_url = routes.account_profile_url %}
                {% capture link_text %}表示する{% endcapture %}
              {% else %}
                {% assign link_url = nil %}
                {% assign link_text = nil %}
              {% endif %}

              
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>返金</span>
        <br>
        <small>{{ refund_method_subtitle }}</small>
          &nbsp;&nbsp;<a href="{{ link_url }}" class="small">{{ link_text }}</a>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{{ transaction.amount | plus: amount_rounding | times: -1 | money }}</strong>
  </td>
</tr>

            {% endif %}
          {% endfor %}
        </table>
      {% endif %}


      {% endunless %}
    </td>
  </tr>
</table>

            {% assign shopped_currency = original_presentment_currency | default: currency %}
            {% comment %} Skip the CNY note when the buyer already shops and is charged in CNY, since it would just repeat CNY. {% endcomment %}
            {% unless shopped_currency == "CNY" and currency == "CNY" %}
              {% case wallet_brand %}
              {% when "wechat_pay" %}
                <p>WeChat で CNY の合計を確認</p>
              {% when "alipay" %}
                <p>Alipay で CNY の合計を確認</p>
              {% endcase %}
            {% endunless %}

            </td>
          </tr>
        </table>
      </center>
    </td>
  </tr>
</table>

          <table class="row section">
  <tr>
    <td class="section__cell">
      <center>
        <table class="container">
          <tr>
            <td>
              <h3>お客様情報</h3>
            </td>
          </tr>
        </table>
        <table class="container">
          <tr>
            <td>
              
            <table class="row">
              <tr>
                {% if requires_shipping and shipping_address %}
                  <td class="customer-info__item">
                    <h4>配送先住所</h4>
                    {{ shipping_address | format_address }}
                  </td>
                {% endif %}
                {% if billing_address %}
                  <td class="customer-info__item">
                    <h4>請求先住所</h4>
                    {{ billing_address | format_address }}
                  </td>
                {% endif %}
              </tr>
            </table>
            <table class="row">
              <tr>
                {% if company_location %}
                  <td class="customer-info__item">
                    <h4>ロケーション</h4>
                    <p>
                      {{ company_location.name }}
                    </p>
                  </td>
                {% endif %}
                {% capture payment_section_body %}
  {% if payment_terms and payment_terms.automatic_capture_at_fulfillment == false %}
    {% assign due_date = payment_terms.next_payment.due_at | default: nil %}
    {% if payment_terms.type == 'receipt' or payment_terms.type == 'fulfillment' and payment_terms.next_payment.due_at == nil %}
      {{ payment_terms.translated_name }}<br>
    {% else %}
      {{ payment_terms.translated_name }}:{{ due_date | date: format: 'date' }}が期限<br>
    {% endif %}
  {% endif %}
  {% if transactions.size > 0 %}
    {% for transaction in transactions %}
      {% if transaction.status == "success" or transaction.status == "pending" %}
        {% if transaction.kind == "capture" or transaction.kind == "sale" %}
          {% if transaction.payment_details.gift_card_last_four_digits %}
            <img src="{{ transaction.payment_details.payment_icon_source | payment_type_img_url }}" class="customer-info__item-credit" height="24">
            下4桁{{ transaction.payment_details.gift_card_last_four_digits }}<br>
          {% elsif transaction.payment_details.type == "shop_pay_installments" and transaction.payment_details.credit_card_company == "unknown" %}
            <img src="{{ 'notifications/shop-pay.svg' | shopify_asset_url  }}" class="customer-info__item-shop-pay">
            <br>
            <span>Shop Payの分割払いで支払い済み</span><br>
          {% elsif transaction.payment_details.type == "card" %}
            <img src="{{ transaction.payment_details.credit_card_company | payment_icon_png_url  }}" class="customer-info__item-credit" height="24" alt="{{ transaction.payment_details.credit_card_company }}">
            <span>下4桁{{ transaction.payment_details.credit_card_last_four_digits }}</span><br>
            {% if transaction.first_installment_amount %}
              <span>{{ transaction.installment_count }} か月間、月額 {{ transaction.first_installment_amount | money }}</span><br>
            {% endif %}
          {% elsif transaction.gateway_display_name == "Gift card" %}
            <img src="{{ transaction.gateway_icon_source | payment_type_img_url }}" class="customer-info__item-credit" height="24">
            下4桁{{ transaction.payment_details.gift_card.last_four_characters | upcase }}<br>
              &emsp;&emsp;&emsp;&nbsp;ギフトカード残高 - <b>{{ transaction.payment_details.gift_card.balance |  money }}</b>
          {% elsif transaction.payment_details.local_payment? %}
            <img src="{{ transaction.payment_details.payment_icon_source | payment_type_img_url }}" class="customer-info__item-credit" height="24">
            <span>{{ transaction.payment_details.payment_method_display_name }}</span><br>
          {% elsif transaction.gateway_display_name != "Shop Cash" and transaction.gateway != "shop_offer" %}
            {{ transaction.gateway_display_name }}<br>
          {% endif %}
        {% elsif transaction.kind == "authorization" and transaction.gateway_display_name == "Shop Cash" %}
          <span>Shop Cash</span><br>
        {% endif %}
      {% endif %}
    {% endfor %}
  {% endif %}
{% endcapture %}

{% assign show_payment_section = false %}
{% if b2b? %}{% assign show_payment_section = true %}{% endif %}

{% assign payment_section_body_stripped = payment_section_body | strip %}
{% if payment_section_body_stripped != "" %}{% assign show_payment_section = true %}{% endif %}

{% if show_payment_section %}
  <td class="customer-info__item">
    <h4>決済</h4>
    <p class="customer-info__item-content">
      {{ payment_section_body }}
    </p>
  </td>
{% endif %}

              </tr>
              <tr>
                {% if requires_shipping and shipping_address %}
                  {% if shipping_methods.size > 0 %}
                    <td class="customer-info__item">
                      <h4>配送方法</h4>
                      {%- assign unique_shipping_titles = shipping_methods | map: 'title' | uniq -%}
                      <p>
                        {%- if unique_shipping_titles.size == 1 and delivery_promise_branded_shipping_line -%}
                          {{ delivery_promise_branded_shipping_line }}
                        {%- else -%}
                          {%- for shipping_title in unique_shipping_titles -%}
                            {{ shipping_title }}{% unless forloop.last %}<br>{% endunless %}
                          {%- endfor -%}
                        {%- endif -%}
                      </p>
                    </td>
                  {% elsif shipping_method %}
                    <td class="customer-info__item">
                      <h4>配送方法</h4>
                      <p>
                        {% if delivery_promise_branded_shipping_line %}
                          {{ delivery_promise_branded_shipping_line }}
                        {% else %}
                          {{ shipping_method.title }}
                        {% endif %}
                      </p>
                    </td>
                  {% endif %}
                {% endif %}
              </tr>
            </table>

            </td>
          </tr>
        </table>
      </center>
    </td>
  </tr>
</table>

          <table class="row footer">
  <tr>
    <td class="footer__cell">
      <center>
        <table class="container">
          <tr>
            <td>
              
              <p class="disclaimer__subtext">ご不明な点がございましたら、このメールにご返信いただくか、<a href="mailto:{{ shop.email }}">{{ shop.email }}</a> までお問い合わせください。<!-- shopify-shop-marketplace-footer --></p>
            </td>
          </tr>
        </table>
      </center>
    </td>
  </tr>
</table>

<img src="{{ 'notifications/spacer.png' | shopify_asset_url }}" class="spacer" height="1" />

        </td>
      </tr>
    </table>
  </body>
</html>

{%- if billing_address.country_code == 'DE' or billing_address.country_code == 'DK' -%}
  {%- if shop.terms_of_service.body != blank -%}
    {{ shop.terms_of_service | attach_as_pdf: "利用規約" }}
  {%- endif -%}

  {%- if shop.refund_policy.body != blank -%}
    {{ shop.refund_policy | attach_as_pdf: "返金ポリシー" }}
  {%- endif -%}
{%- endif -%}

■パターン3:特定タグの商品を含む注文のみ表示(スニペットのみ)

商品タグ(初期値は amp-ticket)が付いた商品を含む注文でのみ、ボタンを表示します。チケット対象商品にこのタグを付けることで、対象外の商品のみの注文ではボタンを表示しないようにできます。

{% comment %}==== チケット表示ボタン ここから ====

  文言を変える場合    : ticket_button_label の値を変更
  対象タグを変える場合: ticket_tag の値を変更
  色を変える場合      : 既定ではメール内の他のボタンと同じ色になります。
                        変える場合は下の <td class="button__cell"> に
                        bgcolor="#RRGGBB" style="background-color:#RRGGBB;" を追加

==== {% endcomment %}
{%- assign ticket_tag = 'amp-ticket' -%}
{%- assign ticket_button_label = 'チケットを表示する' -%}
{%- assign has_ticket_item = false -%}
{%- for line in line_items -%}
  {%- if line.product.tags contains ticket_tag -%}
    {%- assign has_ticket_item = true -%}
    {%- break -%}
  {%- endif -%}
{%- endfor -%}
{%- if has_ticket_item -%}
<table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr>
    <td align="center" style="padding: 15px 0;">
      <table class="button" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="button__cell">
            <a href="{{ shop.url }}?open-tickets=1" class="button__text">{{ ticket_button_label }}</a>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
{%- endif -%}
{% comment %}==== チケット表示ボタン ここまで ===={% endcomment %}

■パターン4:特定タグの商品を含む注文のみ表示(メール全体コード)

パターン3を組み込み済みのメール全体コードです。

パターン4のコードを表示する
{% assign delivery_method_types = delivery_agreements | map: 'delivery_method_type' | uniq %}
{% assign has_split_cart = false %}
{% assign non_none_count = 0 %}
{% for type in delivery_method_types %}
  {% unless type == 'none' %}
    {% assign non_none_count = non_none_count | plus: 1 %}
  {% endunless %}
{% endfor %}
{% if non_none_count > 1 %}
  {% assign has_split_cart = true %}
{% endif %}

{% assign non_none_agreements_count = 0 %}
{% for agreement in delivery_agreements %}
  {% unless agreement.delivery_method_type == 'none' %}
    {% assign non_none_agreements_count = non_none_agreements_count | plus: 1 %}
  {% endunless %}
{% endfor %}

{% capture email_title %}
  ご注文頂きありがとうございました。
{% endcapture %}
{% capture email_body %}
  {% if has_pending_payment %}
    {% if buyer_action_required %}
      支払い完了後、確認メールが届きます。
    {% else %}
      決済が処理されています。注文が確認されるとメールが届きます。
    {% endif %}
  {% elsif payment_charged_on_fulfillment %}
    {{ customer.last_name }}様 様、ご注文を承りました。ご注文の発送準備が整った時点で、決済方法に請求されます。商品が発送されましたら、お知らせいたします。
  {% else %}
    {% if requires_shipping %}
      {% if has_split_cart %}
        {% case split_cart_delivery_method %}
          {% when 'pick-up' %}
            注文の受取の準備が整うと、メールが届きます。
          {% when 'local' %}
            {{ customer.last_name }}様様、ご注文の品を配達する準備を行っております。
          {% when 'shipping' %}
            注文の発送準備を行なっております。商品を発送いたしましたら、改めてお知らせいたします。
          {% else %}
            注文の発送準備を行なっております。商品を発送いたしましたら、改めてお知らせいたします。
        {% endcase %}
      {% else %}
        {% case delivery_method %}
          {% when 'pick-up' %}
            注文の受取の準備が整うと、メールが届きます。
          {% when 'local' %}
            {{ customer.last_name }}様様、ご注文の品を配達する準備を行っております。
          {% else %}
            注文の発送準備を行なっております。商品を発送いたしましたら、改めてお知らせいたします。
        {% endcase %}
      {% endif %}
        {% if delivery_instructions != blank  %}
          <p><b>配達情報:</b> {{ delivery_instructions }}</p>
        {% endif %}
      {% unless delivery_method_types.size > 1 %}
        {% if consolidated_estimated_delivery_time %}
          {% if non_none_agreements_count > 1 %}
            <h3 class="estimated_delivery__title">配達予定</h3>
            <p>{{ consolidated_estimated_delivery_time }}</p>
          {% else %}
            <p>
              配達予定 <b>{{ consolidated_estimated_delivery_time }}</b>
            </p>
          {% endif %}
        {% endif %}
      {% endunless %}
    {% endif %}
  {% endif %}
  {% assign gift_card_line_items = line_items | where: "gift_card" %}
  {% assign found_gift_card_with_recipient_email = false %}
  {% for line_item in gift_card_line_items %}
    {% if line_item.properties["__shopify_send_gift_card_to_recipient"] and line_item.properties["Recipient email"] %}
      {% assign found_gift_card_with_recipient_email = true %}
      {% break %}
    {% endif %}
  {% endfor %}
  {% if found_gift_card_with_recipient_email %}
    <p>ギフトカードの受取人には、ギフトカードコードが記載されたメールが届きます。</p>
  {% elsif gift_card_line_items.first %}
    <p>ギフトカードの個別のメールが届きます。</p>
  {% endif %}
{% endcapture %}

<!DOCTYPE html>
<html lang="ja">
  <head>
  <title>{{ email_title }}</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta name="viewport" content="width=device-width">
  <link rel="stylesheet" type="text/css" href="/assets/notifications/styles.css">
  <style>
    .button__cell { background: {{ shop.email_accent_color }}; }
    .actions-buttons .button__cell--primary { background-color: {{ shop.email_accent_color }}; }
    a, a:hover, a:active, a:visited { color: {{ shop.email_accent_color }}; }
  </style>
</head>

  <body>
    <table class="body">
      <tr>
        <td>
          <table class="header row">
  <tr>
    <td class="header__cell">
      <center>

        <table class="container">
          <tr>
            <td>

              <table class="row">
                <tr>
                  <td class="shop-name__cell">
                    {%- if shop.email_logo_url %}
                      <img src="{{shop.email_logo_url}}" alt="{{ shop.name }}" width="{{ shop.email_logo_width }}">
                    {%- else %}
                      <h1 class="shop-name__text">
                        <a href="{{shop.url}}">{{ shop.name }}</a>
                      </h1>
                    {%- endif %}
                  </td>

                    <td>
                      <table class="order-po-number__container">
                        <tr>
                          <td class="order-number__cell">
                            <span class="order-number__text">
                              注文 {{ order_name }}
                            </span>
                          </td>
                        </tr>
                        {%- if po_number %}
                            <tr>
                              <td class="po-number__cell">
                                <span class="po-number__text">
                                  注文書番号 #{{ po_number }}
                                </span>
                              </td>
                            </tr>
                        {%- endif %}
                      </table>
                    </td>
                </tr>
              </table>

            </td>
          </tr>
        </table>

      </center>
    </td>
  </tr>
</table>

          <table class="row content">
  <tr>
    <td class="content__cell">
      <center>
        <table class="container">
          <tr>
            <td>
              
            <h2>{{ email_title }}</h2>
            <p>{{ email_body }}</p>
            {% assign transaction_count = transactions | size %}
  {% if transaction_count > 0 %}
    {% for transaction in transactions %}
      {% if transaction.show_buyer_pending_payment_instructions? %}
        <p> {{transaction.buyer_pending_payment_notice}} </p>
        <p>
        <table class="row">
          <tr>
            {% for instruction in transaction.buyer_pending_payment_instructions %}
              <td>{{ instruction.header }}</td>
            {% endfor %}
            <td>金額</td>
          </tr>
          <tr>
            {% for instruction in transaction.buyer_pending_payment_instructions %}
              <td>{{ instruction.value }}</td>
            {% endfor %}
            <td>{{transaction.amount | money}}</td>
          </tr>
        </table>
        </p>
      {% endif %}
    {% endfor%}
  {% endif %}

            {% if order_status_url %}
              {% if shop_app_tracking_url and shop_app_tracking_button_variant_key %}
                {% if shop_app_tracking_button_variant_key == "track_with_shop" %}
                <table class="row actions">
  <tr>
    <td class="empty-line">&nbsp;</td>
  </tr>
  <tr>
    <td class="actions__cell">
      {% capture shop_logo_img %}<img src="{{ 'mailer/shop_logo.png' | cdn_asset_url }}" alt="Shop" width="42" height="17" class="button__shop-logo">{% endcapture %}
      <table class="actions-buttons" width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="button__cell button__cell--primary" width="50%">
            <a href="{{ order_status_url }}" class="button__text">注文を表示する</a>
          </td>
          <td class="button__cell--separator"></td>
          <td class="button__cell button__cell--shop-app" width="50%">
            <a href="{{ shop_app_tracking_url }}" class="button__text button__text--shop-app">{{ shop_logo_img }}で注文を追跡する</a>
          </td>
        </tr>
      </table>
        <div class="actions__group">
        {% if shop.url %}
    <table class="link secondary-action-cell">
      <tr>
        <td class="link__cell">または<a href="{{ shop.url }}">ショップにアクセスする</a></td>
      </tr>
    </table>
{% endif %}

        </div>
    </td>
  </tr>
</table>

                {% else %}
                <table class="row actions">
  <tr>
    <td class="empty-line">&nbsp;</td>
  </tr>
  <tr>
    <td class="actions__cell">
      {% capture shop_logo_img %}<img src="{{ 'mailer/shop_logo.png' | cdn_asset_url }}" alt="Shop" width="42" height="17" class="button__shop-logo">{% endcapture %}
      <table class="actions-buttons" width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="button__cell button__cell--primary" width="50%">
            <a href="{{ order_status_url }}" class="button__text">注文を表示する</a>
          </td>
          <td class="button__cell--separator"></td>
          <td class="button__cell button__cell--shop-app" width="50%">
            <a href="{{ shop_app_tracking_url }}" class="button__text button__text--shop-app">ダウンロードして {{ shop_logo_img }} で追跡</a>
          </td>
        </tr>
      </table>
        <div class="actions__group">
        {% if shop.url %}
    <table class="link secondary-action-cell">
      <tr>
        <td class="link__cell">または<a href="{{ shop.url }}">ショップにアクセスする</a></td>
      </tr>
    </table>
{% endif %}

        </div>
    </td>
  </tr>
</table>

                {% endif %}
              {% else %}
                <table class="row actions">
  <tr>
    <td class="empty-line">&nbsp;</td>
  </tr>
  <tr>
    <td class="actions__cell">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td valign="middle">
            <table class="button main-action-cell">
              <tr>
                <td class="button__cell"><a href="{{ order_status_url }}" class="button__text">注文を表示する</a></td>
              </tr>
            </table>
          </td>
          <td valign="middle" style="padding-left: 15px; vertical-align: middle;">
            {% if shop.url %}
    <table class="link secondary-action-cell" style="margin-top: 0; vertical-align: middle;">
      <tr>
        <td class="link__cell">または<a href="{{ shop.url }}">ショップにアクセスする</a></td>
      </tr>
    </table>
{% endif %}

          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>

              {% endif %}
            {% else %}
              {% if shop.url %}
    <table class="row actions">
      <tr>
        <td class="actions__cell">
          <table class="button main-action-cell">
            <tr>
              <td class="button__cell"><a href="{{ shop.url }}" class="button__text">ショップにアクセスする</a></td>
            </tr>
          </table>
        </td>
      </tr>
    </table>
{% endif %}

            {% endif %}

            </td>
          </tr>
        </table>
      </center>
    </td>
  </tr>
</table>

          <table class="row section">
  <tr>
    <td class="section__cell">
      <center>
        <table class="container">
          <tr>
            <td>
{% comment %}==== チケット表示ボタン ここから ====

  文言を変える場合    : ticket_button_label の値を変更
  対象タグを変える場合: ticket_tag の値を変更
  色を変える場合      : 既定ではメール内の他のボタンと同じ色になります。
                        変える場合は下の <td class="button__cell"> に
                        bgcolor="#RRGGBB" style="background-color:#RRGGBB;" を追加

==== {% endcomment %}
{%- assign ticket_tag = 'amp-ticket' -%}
{%- assign ticket_button_label = 'チケットを表示する' -%}
{%- assign has_ticket_item = false -%}
{%- for line in line_items -%}
  {%- if line.product.tags contains ticket_tag -%}
    {%- assign has_ticket_item = true -%}
    {%- break -%}
  {%- endif -%}
{%- endfor -%}
{%- if has_ticket_item -%}
<table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr>
    <td align="center" style="padding: 15px 0;">
      <table class="button" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="button__cell">
            <a href="{{ shop.url }}?open-tickets=1" class="button__text">{{ ticket_button_label }}</a>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
{%- endif -%}
{% comment %}==== チケット表示ボタン ここまで ===={% endcomment %}
              <h3>注文サマリー</h3>
            </td>
          </tr>
        </table>
        <table class="container">
          <tr>
            <td>
              
            {% if delivery_method_types.size > 1 %}
              
<table class="row">
  {% for line in subtotal_line_items %}
    {% unless line.delivery_agreement %}
        {% if line.groups.size == 0 %}
          {% assign legacy_separator = true %}
          
{% comment %} Skip child add-ons since they will be rendered under the parent line item {% endcomment %}
{% unless line.nested_line_child? %}

  {% assign is_parent = false %}
  {% assign is_nested_line_parent = line.nested_line_parent? %}
  {% if line.bundle_parent? or line.nested_line_parent? %}
    {% assign is_parent = true %}
  {% endif %}
  {% if is_nested_line_parent %}
    {% assign css_order_list_cell_nested_line_parent_class = 'order-list__parent-cell' %}
    {% assign css_order_list_parent_image_cell_nested_line_parent_class = 'order-list__nested-parent-image-cell' %}
  {% endif %}

  <tr class="order-list__item">
    <td class="order-list__item__cell {{ css_order_list_cell_nested_line_parent_class }}">
      <table height="100%">
        <td style="padding-bottom: 0px;">
          <table height="100%">
            <tr valign="top">
              {% if false and is_parent %}
                <td class="order-list__parent-image-cell {{ css_order_list_parent_image_cell_nested_line_parent_class }}">
                  {% if line.image %}
                    <img src="{{ line | img_url: 'compact_cropped' }}" align="left" width="60" height="60" class="order-list__product-image"/>
                  {% else %}
                    <div class="order-list__no-image-cell">
                      <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" class="order-list__no-product-image"/>
                    </div>
                  {% endif %}
                </td>
              {% else %}
                <td class="order-list__image-cell">
                  {% if line.image %}
                    <img src="{{ line | img_url: 'compact_cropped' }}" align="left" width="60" height="60" class="order-list__product-image"/>
                  {% else %}
                    <div class="order-list__no-image-cell">
                      <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="60" height="60" class="order-list__no-product-image"/>
                    </div>
                  {% endif %}
                </td>
              {% endif %}
            </tr>
            {% if is_nested_line_parent %}
              <tr height="100%">
                <td style="padding: 0px;" height="100%">
                  <table height="100%">
                    <tr>
                      <td height="100%" class="nested-line-item-spacer-cell">
                        <div class="nested-line-item-spacer"></div>
                      </td>
                      <td height="100%" class="parent-vertical-line__cell">
                        <div class="parent-vertical-line__content"></div>
                      </td>
                    </tr>
                  </table>                        
                </td>
              </tr>
            {% endif %}
          </table>
        </td>

        <td class="order-list__product-description-cell">
          {% if line.presentment_title %}
            {% assign line_title = line.presentment_title %}
          {% elsif line.title %}
            {% assign line_title = line.title %}
          {% else %}
            {% assign line_title = line.product.title %}
          {% endif %}
          {% if line.quantity < line.quantity %}
            {% capture line_display %}
              {{ line.quantity }}/{{ line.quantity }}個
            {% endcapture %}
          {% else %}
            {% assign line_display = line.quantity %}
          {% endif %}

          <span class="order-list__item-title">{{ line_title }}&nbsp;&times;&nbsp;{{ line_display }}</span><br/>

          {% if line.variant.title != 'Default Title' and is_parent == false %}
            <span class="order-list__item-variant">{{ line.variant.title }}</span><br/>
          {% elsif line.variant.title != 'Default Title' and line.nested_line_parent? %}
            <span class="order-list__item-variant">{{ line.variant.title }}</span><br/>
          {% elsif line.variant.title != 'Default Title' and line.bundle_parent? and false == false %}
            <span class="order-list__item-variant">{{ line.variant.title }}</span><br/>
          {% endif %}

          {% if false %}
            {% for child_line in line.bundle_components %}
              
{% if true %}
  {% assign css_class = 'order-list__bundle-item' %}
  {% assign css_image_class = 'order-list__image-cell' %}
  {% assign css_description_class = 'order-list__product-description-cell' %}
{% else %}
  {% assign css_class = 'order-list__deliverable-item_abandoned' %}
  {% assign css_image_class = 'order-list__image-cell--nested-line-item' %}
  {% assign css_description_class = 'order-list__product-description-cell--nested-line-item' %}
  {% if false %}
    {% assign css_curved_line_cell_container_class = 'curved-line-cell-container__top-spacer-cell--show-border' %}
    {% assign css_hide_vertical_line_class = 'vertical-line__content--hide' %}
    {% assign css_curved_line_cell_container_cell__no_padding_class = 'curved-line-cell-container__cell--no-padding' %}
  {% endif %}
{% endif %}

<table height="100%">
  <tr class="order-list__item">
    <td class="{{ css_class }}" height="100%">
      <table height="100%">
        <td class="{{ css_image_class }}">
          {% if child_line.image %}
            <img src="{{ child_line | img_url: 'compact_cropped' }}" align="left" width="40" height="40" class="order-list__product-image small"/>
          {% else %}
            <div class="order-list__no-image-cell small">
              <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="20" height="20" class="order-list__no-product-image small"/>
            </div>
          {% endif %}
        </td>

        <td class="{{ css_description_class }}">
          {% if child_line.product.title %}
            {% assign item_title = child_line.product.title %}
          {% else %}
            {% assign item_title = child_line.title %}
          {% endif %}

          {% assign item_display = child_line.quantity %}

            <span class="order-list__item-title">{{ item_display }}&nbsp;&times;&nbsp;{{ item_title }}</span><br>

          {% if child_line.variant.title != 'Default Title'%}
            <span class="order-list__item-variant">{{ child_line.variant.title }}</span><br/>
          {% endif %}
          {% if child_line.selling_plan_allocation %}
            <span class="order-list__item-variant">{{ child_line.selling_plan_allocation.selling_plan.name }}</span>
          {% endif %}
        </td>
      </table>
    </td>
  </tr>
</table>
            {% endfor %}
          {% else %}
            {% for group in line.groups %}
              {% if group.deliverable? %}
                <span class="order-list__item-variant">対象:{{ group.display_title }}</span><br/>
              {% else %}
                <span class="order-list__item-variant">{{ group.display_title }}の一部</span><br/>
              {% endif %}
            {% endfor %}
          {% endif %}

            {% if line.gift_card and line.properties["__shopify_send_gift_card_to_recipient"] %}
              {% for property in line.properties %}
  {% assign property_first_char = property.first | slice: 0 %}
  {% if property.last != blank and property_first_char != '_' %}
    <div class="order-list__item-property">
      <dt>{{ property.first }}:</dt>
      <dd>
      {% if property.last contains '/uploads/' %}
        <a href="{{ property.last }}" class="link" target="_blank">
        {{ property.last | split: '/' | last }}
        </a>
      {% else %}
        {{ property.last }}
      {% endif %}
      </dd>
    </div>
  {% endif %}
{% endfor %}

            {% endif %}

          {% if line.selling_plan_allocation %}
            <span class="order-list__item-variant">{{ line.selling_plan_allocation.selling_plan.name }}</span><br/>
          {% endif %}

          {% if line.refunded_quantity > 0 %}
            <span class="order-list__item-refunded">返金済み</span>
          {% endif %}

          {% if line.discount_allocations %}
            {% for discount_allocation in line.discount_allocations %}
              {% if discount_allocation.discount_application.target_selection != 'all' %}
              <p>
                <span class="order-list__item-discount-allocation">
                  <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
                  <span>
                    {{ discount_allocation.discount_application.title | upcase }}
                    (-{{ discount_allocation.amount | money }})
                  </span>
                </span>
              </p>
              {% endif %}
            {% endfor %}
          {% endif %}
        </td>
          {% if false and is_parent %}
            <td class="order-list__parent-price-cell">
          {% else %}
            <td class="order-list__price-cell">
          {% endif %}
          {% if line.original_line_price != line.final_line_price %}
            <del class="order-list__item-original-price">{{ line.original_line_price | money }}</del>
          {% endif %}
            <p class="order-list__item-price">
              {% if line.final_line_price > 0 %}
                {{ line.final_line_price | money }}
                {% if line.unit_price_measurement %}
  <div class="order-list__unit-price">
    {{- line.unit_price | unit_price_with_measurement: line.unit_price_measurement -}}
  </div>
{% endif %}
              {% else %}
                無料
              {% endif %}
            </p>
          </td>
        {% if line.nested_line_parent? %}
          {% for child_line in line.nested_lines %}
            
{% if false %}
  {% assign css_class = 'order-list__bundle-item' %}
  {% assign css_image_class = 'order-list__image-cell' %}
  {% assign css_description_class = 'order-list__product-description-cell' %}
{% else %}
  {% assign css_class = 'order-list__deliverable-item_abandoned' %}
  {% assign css_image_class = 'order-list__image-cell--nested-line-item' %}
  {% assign css_description_class = 'order-list__product-description-cell--nested-line-item' %}
  {% if forloop.last %}
    {% assign css_curved_line_cell_container_class = 'curved-line-cell-container__top-spacer-cell--show-border' %}
    {% assign css_hide_vertical_line_class = 'vertical-line__content--hide' %}
    {% assign css_curved_line_cell_container_cell__no_padding_class = 'curved-line-cell-container__cell--no-padding' %}
  {% endif %}
{% endif %}

<table height="100%">
  <tr class="order-list__item">
    <td class="{{ css_class }}" height="100%">
      <table height="100%">
          <td class="nested-line-item-spacer-cell"style="padding: 1px;">
            <div class="nested-line-item-spacer"></div>
          </td>
          <td class="curved-line-cell-container" valign="top">
            <div style="width: 0px;">
              <table>
                <tr>
                  <td class="{{ css_curved_line_cell_container_cell__no_padding_class }}" style="mso-padding-right-alt: 10px;">
                    <div class="curved-line-cell-container__top-spacer {{ css_curved_line_cell_container_class }}"></div>
                  </td>
                </tr>
                <tr>
                  <td class="curved-line-cell-container__curvedLine-cell">
                    <div class="curved-line-cell-container__curvedLine-cell__curvedLine"></div>
                  </td>
                </tr>
              </table>
            </div>
          </td>
          <td class="vertical-line" height="100%">
            <div class="vertical-line__content {{ css_hide_vertical_line_class }}"></div>
          </td>
          <td class="nested-line-item-spacer-cell--right">
            <div class="nested-line-item-spacer"></div>
          </td>
        <td class="{{ css_image_class }}">
          {% if child_line.image %}
            <img src="{{ child_line | img_url: 'compact_cropped' }}" align="left" width="40" height="40" class="order-list__product-image small"/>
          {% else %}
            <div class="order-list__no-image-cell small">
              <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="20" height="20" class="order-list__no-product-image small"/>
            </div>
          {% endif %}
        </td>

        <td class="{{ css_description_class }}">
          {% if child_line.product.title %}
            {% assign item_title = child_line.product.title %}
          {% else %}
            {% assign item_title = child_line.title %}
          {% endif %}

          {% assign item_display = child_line.quantity %}

            <span class="order-list__item-title">{{ item_title }}&nbsp;&times;&nbsp;{{ item_display }}</span><br>

          {% if child_line.variant.title != 'Default Title'%}
            <span class="order-list__item-variant">{{ child_line.variant.title }}</span><br/>
          {% endif %}
          {% if child_line.selling_plan_allocation %}
            <span class="order-list__item-variant">{{ child_line.selling_plan_allocation.selling_plan.name }}</span>
          {% endif %}
        </td>
      </table>
    </td>
  </tr>
</table>
          {% endfor %}
        {% endif %}
      </table>
    </td>
  </tr>

{% endunless %}

        {% endif %}
    {% endunless %}
  {% endfor %}

    {% for line_item_group in line_item_groups %}
      {% unless line_item_group.components.first.delivery_agreement %}
        {% assign legacy_separator = true %}
        
{% assign final_line_price = 0 %}
{% assign original_line_price = 0 %}
{% assign discount_keys_str = "" %}
{% assign parent_line_item = nil %}

{% if line_item_group.deliverable? == false %}
  {% assign line_item_group_class = "order-list__item__cell" %}
  {% for component in line_item_group.components %}
    {% assign final_line_price = final_line_price | plus: component.final_line_price %}
    {% assign original_line_price = original_line_price | plus: component.original_line_price %}

    {% for da in component.discount_allocations %}
      {% if da.discount_application.target_selection != 'all' %}
        {% assign discount_key = da.discount_application.title | append: da.discount_application.type %}
        {% assign discount_keys_str = discount_keys_str | append: discount_key | append: "," %}
      {% endif %}
    {% endfor %}
  {% endfor %}
{% endif %}

{% if line_item_group.deliverable? %}
  {% assign parent_line_item = line_item_group.parent_sales_line_item %}
  {% assign final_line_price = parent_line_item.final_line_price %}
  {% assign original_line_price = parent_line_item.original_line_price %}
  {% assign line_item_group_class = "order-list__parent_item__cell" %}
  {% assign padding_bottom_none_class = "padding-bottom-none" %}
{% endif %}

{% assign discount_keys = discount_keys_str | split: "," | uniq %}

<tr class="order-list__item">
  <td class="{{ line_item_group_class }}" style="padding: 15px 0 0px 1px;">
    <table height="100%">
        <td class="order-list__parent-image-cell">
          <table height="100%">
            <tr>
              <td class="{{ padding_bottom_none_class }}" valign="top">
                {% if parent_line_item and parent_line_item.image %}
                  <img src="{{ parent_line_item | img_url: 'compact_cropped' }}" align="left" width="60" height="60" class="order-list__product-image"/>
                {% elsif line_item_group.image %}
                  <img src="{{ line_item_group | img_url: 'compact_cropped' }}" align="left" width="60" height="60" class="order-list__product-image"/>
                {% else %}
                  <div class="order-list__no-image-cell">
                    <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="30" height="30" class="order-list__no-product-image"/>
                  </div>
                {% endif %}
              </td>
            </tr>
            {% if line_item_group.deliverable? == true %}
              <tr height="100%">
                <td height="100%" class="parent-vertical-line__cell">
                  <table height="100%" style="width: auto;">
                    <tr>
                      <td height="100%" class="nested-line-item-spacer-cell">
                        <div style="width: 6px;"></div>
                      </td>
                      <td height="100%" class="parent-vertical-line__cell">
                        <div class="parent-vertical-line__content"></div>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            {% endif %}
          </table>
        </td>

        <td class="order-list__product-description-cell">
          <table>
            <tr>
              <td class="order-list__product-description-cell" colspan="2">
                <span class="order-list__item-title">{{ line_item_group.display_title }}&nbsp;&times;&nbsp;{{ line_item_group.quantity }}</span><br/>
                {% if line_item_group.variant and line_item_group.variant.title != 'Default Title' %}
                  <span class="order-list__item-variant">{{ line_item_group.variant.title }}</span>
                {% endif %}

                {% if line_item_group.deliverable? %}
                  {% if parent_line_item.discount_allocations %}
                    {% for discount_allocation in parent_line_item.discount_allocations %}
                      {% if discount_allocation.discount_application.target_selection != 'all' %}
                        <p>
                          <span class="order-list__item-discount-allocation">
                            <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
                            <span>
                              {{ discount_allocation.discount_application.title | upcase }}
                              (-{{ discount_allocation.amount | money }})
                            </span>
                          </span>
                        </p>
                      {% endif %}
                    {% endfor %}
                  {% endif %}
                {% else %}
                  {% for discount_key in discount_keys %}
                    {% assign discount_amount = 0 %}

                    {% for component in line_item_group.components %}
                      {% for da in component.discount_allocations %}
                        {% assign key = da.discount_application.title | append: da.discount_application.type %}
                        {% if da.discount_application.target_selection != 'all' and key == discount_key %}
                          {% assign discount_amount = discount_amount | plus: da.amount %}
                          {% assign discount_title = da.discount_application.title %}
                        {% endif %}
                      {% endfor %}
                    {% endfor %}

                    <p>
                      <span class="order-list__item-discount-allocation">
                        <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
                        <span>
                          {{ discount_title | upcase }}
                          (-{{ discount_amount | money }})
                        </span>
                      </span>
                    </p>
                  {% endfor %}
                {% endif %}
              </td>

                <td class="order-list__parent_price-cell">
                  {% if original_line_price != final_line_price %}
                    <del class="order-list__item-original-price">{{ original_line_price | money }}</del>
                  {% endif %}
                  <p class="order-list__item-price">
                    {% if final_line_price > 0 %}
                      {{ final_line_price | money }}
                    {% else %}
                      {{ 'notifications.views.mailers.notifications.discount_free' | t }}
                    {% endif %}
                  </p>
                </td>
            </tr>

            {% if line_item_group.deliverable? == false %}
              {% for component in line_item_group.components %}
                
{% if true %}
  {% assign order_list_item_class = "order-list__bundle-item" %}
  {% assign css_image_class = 'order-list__image-cell' %}
  {% assign order_list_product_description_class = 'order-list__product-description-cell' %}
{% else %}
  {% assign order_list_product_description_class = 'order-list__product-description-cell--nested-line-item' %}
  {% if false %}
    {% assign css_curved_line_cell_container_class = 'curved-line-cell-container__top-spacer-cell--show-border' %}
    {% assign css_hide_vertical_line_class = 'vertical-line__content--hide' %}
    {% assign css_curved_line_cell_container_cell__no_padding_class = 'curved-line-cell-container__cell--no-padding' %}
  {% endif %}
{% endif %}

<tr height="100%">
    <td class="{{ order_list_item_class }} {{ css_image_class }}" valign="top">
        {% if component.image %}
        <img src="{{ component | img_url: 'compact_cropped' }}" align="left" width="40" height="40" class="order-list__product-image"/>
        {% else %}
        <div class="order-list__no-image-cell small">
            <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="20" height="20" class="order-list__no-product-image small"/>
        </div>
        {% endif %}
    </td>

    <td class="{{ order_list_product_description_class }}" valign="top">
        {% if component.product.title %}
            {% assign component_title = component.product.title %}
        {% else %}
            {% assign component_title = component.title %}
        {% endif %}

        {% if line_item_group.deliverable? %}
            <span class="order-list__item-title">{{ component_title }}&nbsp;&times;&nbsp;{{ component.quantity }}</span>
        {% else %}
            <span class="order-list__item-title">{{ component.quantity }}&nbsp;&times;&nbsp;{{ component_title }}</span>
        {% endif %}
        <br>
        {% if component.variant.title != 'Default Title' %}
            <span class="order-list__item-variant">{{ component.variant.title }}</span>
        {% endif %}

        {% if line_item_group.deliverable? %}
            {% if component.discount_allocations %}
                {% for discount_allocation in component.discount_allocations %}
                    {% if discount_allocation.discount_application.target_selection != 'all' %}
                        <p>
                            <span class="order-list__item-discount-allocation">
                            <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
                            <span>
                                {{ discount_allocation.discount_application.title | upcase }}
                                (-{{ discount_allocation.amount | money }})
                            </span>
                            </span>
                        </p>
                    {% endif %}
                {% endfor %}
            {% endif %}
        {% endif %}
    </td>

    {% if line_item_group.deliverable? %}
    <td class="order-list__price-cell">
        {% if component.original_line_price != component.final_line_price %}
            <del class="order-list__item-original-price">{{ component.original_line_price | money }}</del>
        {% endif %}
        <p class="order-list__item-price">
        {% if component.final_line_price > 0 %}
            {{ component.final_line_price | money }}
        {% else %}
            無料
        {% endif %}
        </p>
    </td>
    {% endif %}
</tr>

              {% endfor %}
            {% endif %}
          </table>
        </td>
    </table>
    {% if line_item_group.deliverable? %}
      <td height="100%">
        {% for component in line_item_group.components %}

          <tr>
            <td class="order-list__deliverable-item" height="100%" style="padding: 0;">
              <table height="100%">
                
{% if false %}
  {% assign order_list_item_class = "order-list__bundle-item" %}
  {% assign css_image_class = 'order-list__image-cell' %}
  {% assign order_list_product_description_class = 'order-list__product-description-cell' %}
{% else %}
  {% assign order_list_product_description_class = 'order-list__product-description-cell--nested-line-item' %}
  {% if forloop.last %}
    {% assign css_curved_line_cell_container_class = 'curved-line-cell-container__top-spacer-cell--show-border' %}
    {% assign css_hide_vertical_line_class = 'vertical-line__content--hide' %}
    {% assign css_curved_line_cell_container_cell__no_padding_class = 'curved-line-cell-container__cell--no-padding' %}
  {% endif %}
{% endif %}

<tr height="100%">
    <td class="nested-line-item-spacer-cell" style="padding: 1px;">
        <div class="nested-line-item-spacer"></div>
    </td>
    <td class="curved-line-cell-container" valign="top">
        <div style="width: 0px;">
            <table>
                <tr>
                    <td class="{{ css_curved_line_cell_container_cell__no_padding_class }}" style="mso-padding-right-alt: 10px;">
                        <div class="curved-line-cell-container__top-spacer {{ css_curved_line_cell_container_class }}"></div>
                    </td>
                </tr>
                <tr>
                    <td class="curved-line-cell-container__curvedLine-cell">
                        <div class="curved-line-cell-container__curvedLine-cell__curvedLine"></div>
                    </td>
                </tr>
            </table>
        </div>
    </td>
    <td class="vertical-line" height="100%">
        <div class="vertical-line__content {{ css_hide_vertical_line_class }}"></div>
    </td>
    <td class="nested-line-item-spacer-cell--right">
        <div class="nested-line-item-spacer"></div>
    </td>
    <td class="{{ order_list_item_class }} {{ css_image_class }}" valign="top">
        {% if component.image %}
        <img src="{{ component | img_url: 'compact_cropped' }}" align="left" width="40" height="40" class="order-list__product-image"/>
        {% else %}
        <div class="order-list__no-image-cell small">
            <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="20" height="20" class="order-list__no-product-image small"/>
        </div>
        {% endif %}
    </td>

    <td class="{{ order_list_product_description_class }}" valign="top">
        {% if component.product.title %}
            {% assign component_title = component.product.title %}
        {% else %}
            {% assign component_title = component.title %}
        {% endif %}

        {% if line_item_group.deliverable? %}
            <span class="order-list__item-title">{{ component_title }}&nbsp;&times;&nbsp;{{ component.quantity }}</span>
        {% else %}
            <span class="order-list__item-title">{{ component.quantity }}&nbsp;&times;&nbsp;{{ component_title }}</span>
        {% endif %}
        <br>
        {% if component.variant.title != 'Default Title' %}
            <span class="order-list__item-variant">{{ component.variant.title }}</span>
        {% endif %}

        {% if line_item_group.deliverable? %}
            {% if component.discount_allocations %}
                {% for discount_allocation in component.discount_allocations %}
                    {% if discount_allocation.discount_application.target_selection != 'all' %}
                        <p>
                            <span class="order-list__item-discount-allocation">
                            <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
                            <span>
                                {{ discount_allocation.discount_application.title | upcase }}
                                (-{{ discount_allocation.amount | money }})
                            </span>
                            </span>
                        </p>
                    {% endif %}
                {% endfor %}
            {% endif %}
        {% endif %}
    </td>

    {% if line_item_group.deliverable? %}
    <td class="order-list__price-cell">
        {% if component.original_line_price != component.final_line_price %}
            <del class="order-list__item-original-price">{{ component.original_line_price | money }}</del>
        {% endif %}
        <p class="order-list__item-price">
        {% if component.final_line_price > 0 %}
            {{ component.final_line_price | money }}
        {% else %}
            無料
        {% endif %}
        </p>
    </td>
    {% endif %}
</tr>

              </table>
            </td>
          </tr>
        {% endfor %}
      </td>
    {% endif %}
  </td>
</tr>

      {% endunless %}
    {% endfor %}
</table>

{% if legacy_separator %}
  <hr class="order-list__delivery-method-type-separator">
{% endif %}

{% for delivery_agreement in delivery_agreements %}
  {% if delivery_agreement.line_items != blank %}
    {% if delivery_agreements.size > 1 %}
      <h4 class="order-list__delivery-method-type">
        {{ delivery_agreement.delivery_method_name }} 個のアイテム
      </h4>
      {% if delivery_agreement.delivery_method_type == 'pick-up' %}
        {% if delivery_agreement.estimated_delivery_date %}
          <p class="order-list__estimated-delivery">
            配達予定 &middot; <strong>{{ delivery_agreement.estimated_delivery_date }}</strong>
          </p>
        {% endif %}
        <p class="order-list__estimated-delivery">
          注文の受取の準備が整うと、メールが届きます。
        </p>
      {% elsif delivery_agreement.delivery_method_type == 'shipping'
        or delivery_agreement.delivery_method_type == 'local'
        or delivery_agreement.delivery_method_type == 'pickup-point' %}
        {% if delivery_agreement.presentment_title %}
          {% if delivery_agreement.estimated_delivery_date %}
            <p class="order-list__estimated-delivery">
              配達予定
            </p>
          {% endif %}
          <p class="order-list__estimated-delivery">
            {{ delivery_agreement.presentment_title }}{% if delivery_agreement.estimated_delivery_date %} &middot; {{ delivery_agreement.estimated_delivery_date }}{% endif %}
          </p>
        {% endif %}
      {% endif %}
    {% endif %}

    <table class="row">
      {% for line in delivery_agreement.non_parent_line_items %}
          {% if line.groups.size == 0 %}
            
{% comment %} Skip child add-ons since they will be rendered under the parent line item {% endcomment %}
{% unless line.nested_line_child? %}

  {% assign is_parent = false %}
  {% assign is_nested_line_parent = line.nested_line_parent? %}
  {% if line.bundle_parent? or line.nested_line_parent? %}
    {% assign is_parent = true %}
  {% endif %}
  {% if is_nested_line_parent %}
    {% assign css_order_list_cell_nested_line_parent_class = 'order-list__parent-cell' %}
    {% assign css_order_list_parent_image_cell_nested_line_parent_class = 'order-list__nested-parent-image-cell' %}
  {% endif %}

  <tr class="order-list__item">
    <td class="order-list__item__cell {{ css_order_list_cell_nested_line_parent_class }}">
      <table height="100%">
        <td style="padding-bottom: 0px;">
          <table height="100%">
            <tr valign="top">
              {% if false and is_parent %}
                <td class="order-list__parent-image-cell {{ css_order_list_parent_image_cell_nested_line_parent_class }}">
                  {% if line.image %}
                    <img src="{{ line | img_url: 'compact_cropped' }}" align="left" width="60" height="60" class="order-list__product-image"/>
                  {% else %}
                    <div class="order-list__no-image-cell">
                      <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" class="order-list__no-product-image"/>
                    </div>
                  {% endif %}
                </td>
              {% else %}
                <td class="order-list__image-cell">
                  {% if line.image %}
                    <img src="{{ line | img_url: 'compact_cropped' }}" align="left" width="60" height="60" class="order-list__product-image"/>
                  {% else %}
                    <div class="order-list__no-image-cell">
                      <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="60" height="60" class="order-list__no-product-image"/>
                    </div>
                  {% endif %}
                </td>
              {% endif %}
            </tr>
            {% if is_nested_line_parent %}
              <tr height="100%">
                <td style="padding: 0px;" height="100%">
                  <table height="100%">
                    <tr>
                      <td height="100%" class="nested-line-item-spacer-cell">
                        <div class="nested-line-item-spacer"></div>
                      </td>
                      <td height="100%" class="parent-vertical-line__cell">
                        <div class="parent-vertical-line__content"></div>
                      </td>
                    </tr>
                  </table>                        
                </td>
              </tr>
            {% endif %}
          </table>
        </td>

        <td class="order-list__product-description-cell">
          {% if line.presentment_title %}
            {% assign line_title = line.presentment_title %}
          {% elsif line.title %}
            {% assign line_title = line.title %}
          {% else %}
            {% assign line_title = line.product.title %}
          {% endif %}
          {% if line.quantity < line.quantity %}
            {% capture line_display %}
              {{ line.quantity }}/{{ line.quantity }}個
            {% endcapture %}
          {% else %}
            {% assign line_display = line.quantity %}
          {% endif %}

          <span class="order-list__item-title">{{ line_title }}&nbsp;&times;&nbsp;{{ line_display }}</span><br/>

          {% if line.variant.title != 'Default Title' and is_parent == false %}
            <span class="order-list__item-variant">{{ line.variant.title }}</span><br/>
          {% elsif line.variant.title != 'Default Title' and line.nested_line_parent? %}
            <span class="order-list__item-variant">{{ line.variant.title }}</span><br/>
          {% elsif line.variant.title != 'Default Title' and line.bundle_parent? and false == false %}
            <span class="order-list__item-variant">{{ line.variant.title }}</span><br/>
          {% endif %}

          {% if false %}
            {% for child_line in line.bundle_components %}
              
{% if true %}
  {% assign css_class = 'order-list__bundle-item' %}
  {% assign css_image_class = 'order-list__image-cell' %}
  {% assign css_description_class = 'order-list__product-description-cell' %}
{% else %}
  {% assign css_class = 'order-list__deliverable-item_abandoned' %}
  {% assign css_image_class = 'order-list__image-cell--nested-line-item' %}
  {% assign css_description_class = 'order-list__product-description-cell--nested-line-item' %}
  {% if false %}
    {% assign css_curved_line_cell_container_class = 'curved-line-cell-container__top-spacer-cell--show-border' %}
    {% assign css_hide_vertical_line_class = 'vertical-line__content--hide' %}
    {% assign css_curved_line_cell_container_cell__no_padding_class = 'curved-line-cell-container__cell--no-padding' %}
  {% endif %}
{% endif %}

<table height="100%">
  <tr class="order-list__item">
    <td class="{{ css_class }}" height="100%">
      <table height="100%">
        <td class="{{ css_image_class }}">
          {% if child_line.image %}
            <img src="{{ child_line | img_url: 'compact_cropped' }}" align="left" width="40" height="40" class="order-list__product-image small"/>
          {% else %}
            <div class="order-list__no-image-cell small">
              <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="20" height="20" class="order-list__no-product-image small"/>
            </div>
          {% endif %}
        </td>

        <td class="{{ css_description_class }}">
          {% if child_line.product.title %}
            {% assign item_title = child_line.product.title %}
          {% else %}
            {% assign item_title = child_line.title %}
          {% endif %}

          {% assign item_display = child_line.quantity %}

            <span class="order-list__item-title">{{ item_display }}&nbsp;&times;&nbsp;{{ item_title }}</span><br>

          {% if child_line.variant.title != 'Default Title'%}
            <span class="order-list__item-variant">{{ child_line.variant.title }}</span><br/>
          {% endif %}
          {% if child_line.selling_plan_allocation %}
            <span class="order-list__item-variant">{{ child_line.selling_plan_allocation.selling_plan.name }}</span>
          {% endif %}
        </td>
      </table>
    </td>
  </tr>
</table>
            {% endfor %}
          {% else %}
            {% for group in line.groups %}
              {% if group.deliverable? %}
                <span class="order-list__item-variant">対象:{{ group.display_title }}</span><br/>
              {% else %}
                <span class="order-list__item-variant">{{ group.display_title }}の一部</span><br/>
              {% endif %}
            {% endfor %}
          {% endif %}

            {% if line.gift_card and line.properties["__shopify_send_gift_card_to_recipient"] %}
              {% for property in line.properties %}
  {% assign property_first_char = property.first | slice: 0 %}
  {% if property.last != blank and property_first_char != '_' %}
    <div class="order-list__item-property">
      <dt>{{ property.first }}:</dt>
      <dd>
      {% if property.last contains '/uploads/' %}
        <a href="{{ property.last }}" class="link" target="_blank">
        {{ property.last | split: '/' | last }}
        </a>
      {% else %}
        {{ property.last }}
      {% endif %}
      </dd>
    </div>
  {% endif %}
{% endfor %}

            {% endif %}

          {% if line.selling_plan_allocation %}
            <span class="order-list__item-variant">{{ line.selling_plan_allocation.selling_plan.name }}</span><br/>
          {% endif %}

          {% if line.refunded_quantity > 0 %}
            <span class="order-list__item-refunded">返金済み</span>
          {% endif %}

          {% if line.discount_allocations %}
            {% for discount_allocation in line.discount_allocations %}
              {% if discount_allocation.discount_application.target_selection != 'all' %}
              <p>
                <span class="order-list__item-discount-allocation">
                  <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
                  <span>
                    {{ discount_allocation.discount_application.title | upcase }}
                    (-{{ discount_allocation.amount | money }})
                  </span>
                </span>
              </p>
              {% endif %}
            {% endfor %}
          {% endif %}
        </td>
          {% if false and is_parent %}
            <td class="order-list__parent-price-cell">
          {% else %}
            <td class="order-list__price-cell">
          {% endif %}
          {% if line.original_line_price != line.final_line_price %}
            <del class="order-list__item-original-price">{{ line.original_line_price | money }}</del>
          {% endif %}
            <p class="order-list__item-price">
              {% if line.final_line_price > 0 %}
                {{ line.final_line_price | money }}
                {% if line.unit_price_measurement %}
  <div class="order-list__unit-price">
    {{- line.unit_price | unit_price_with_measurement: line.unit_price_measurement -}}
  </div>
{% endif %}
              {% else %}
                無料
              {% endif %}
            </p>
          </td>
        {% if line.nested_line_parent? %}
          {% for child_line in line.nested_lines %}
            
{% if false %}
  {% assign css_class = 'order-list__bundle-item' %}
  {% assign css_image_class = 'order-list__image-cell' %}
  {% assign css_description_class = 'order-list__product-description-cell' %}
{% else %}
  {% assign css_class = 'order-list__deliverable-item_abandoned' %}
  {% assign css_image_class = 'order-list__image-cell--nested-line-item' %}
  {% assign css_description_class = 'order-list__product-description-cell--nested-line-item' %}
  {% if forloop.last %}
    {% assign css_curved_line_cell_container_class = 'curved-line-cell-container__top-spacer-cell--show-border' %}
    {% assign css_hide_vertical_line_class = 'vertical-line__content--hide' %}
    {% assign css_curved_line_cell_container_cell__no_padding_class = 'curved-line-cell-container__cell--no-padding' %}
  {% endif %}
{% endif %}

<table height="100%">
  <tr class="order-list__item">
    <td class="{{ css_class }}" height="100%">
      <table height="100%">
          <td class="nested-line-item-spacer-cell"style="padding: 1px;">
            <div class="nested-line-item-spacer"></div>
          </td>
          <td class="curved-line-cell-container" valign="top">
            <div style="width: 0px;">
              <table>
                <tr>
                  <td class="{{ css_curved_line_cell_container_cell__no_padding_class }}" style="mso-padding-right-alt: 10px;">
                    <div class="curved-line-cell-container__top-spacer {{ css_curved_line_cell_container_class }}"></div>
                  </td>
                </tr>
                <tr>
                  <td class="curved-line-cell-container__curvedLine-cell">
                    <div class="curved-line-cell-container__curvedLine-cell__curvedLine"></div>
                  </td>
                </tr>
              </table>
            </div>
          </td>
          <td class="vertical-line" height="100%">
            <div class="vertical-line__content {{ css_hide_vertical_line_class }}"></div>
          </td>
          <td class="nested-line-item-spacer-cell--right">
            <div class="nested-line-item-spacer"></div>
          </td>
        <td class="{{ css_image_class }}">
          {% if child_line.image %}
            <img src="{{ child_line | img_url: 'compact_cropped' }}" align="left" width="40" height="40" class="order-list__product-image small"/>
          {% else %}
            <div class="order-list__no-image-cell small">
              <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="20" height="20" class="order-list__no-product-image small"/>
            </div>
          {% endif %}
        </td>

        <td class="{{ css_description_class }}">
          {% if child_line.product.title %}
            {% assign item_title = child_line.product.title %}
          {% else %}
            {% assign item_title = child_line.title %}
          {% endif %}

          {% assign item_display = child_line.quantity %}

            <span class="order-list__item-title">{{ item_title }}&nbsp;&times;&nbsp;{{ item_display }}</span><br>

          {% if child_line.variant.title != 'Default Title'%}
            <span class="order-list__item-variant">{{ child_line.variant.title }}</span><br/>
          {% endif %}
          {% if child_line.selling_plan_allocation %}
            <span class="order-list__item-variant">{{ child_line.selling_plan_allocation.selling_plan.name }}</span>
          {% endif %}
        </td>
      </table>
    </td>
  </tr>
</table>
          {% endfor %}
        {% endif %}
      </table>
    </td>
  </tr>

{% endunless %}

          {% endif %}
      {% endfor %}

        {% for line_item_group in delivery_agreement.line_item_groups %}
          {% if line_item_group.deliverable? == false %}
            
{% assign final_line_price = 0 %}
{% assign original_line_price = 0 %}
{% assign discount_keys_str = "" %}
{% assign parent_line_item = nil %}

{% if line_item_group.deliverable? == false %}
  {% assign line_item_group_class = "order-list__item__cell" %}
  {% for component in line_item_group.components %}
    {% assign final_line_price = final_line_price | plus: component.final_line_price %}
    {% assign original_line_price = original_line_price | plus: component.original_line_price %}

    {% for da in component.discount_allocations %}
      {% if da.discount_application.target_selection != 'all' %}
        {% assign discount_key = da.discount_application.title | append: da.discount_application.type %}
        {% assign discount_keys_str = discount_keys_str | append: discount_key | append: "," %}
      {% endif %}
    {% endfor %}
  {% endfor %}
{% endif %}

{% if line_item_group.deliverable? %}
  {% assign parent_line_item = line_item_group.parent_sales_line_item %}
  {% assign final_line_price = parent_line_item.final_line_price %}
  {% assign original_line_price = parent_line_item.original_line_price %}
  {% assign line_item_group_class = "order-list__parent_item__cell" %}
  {% assign padding_bottom_none_class = "padding-bottom-none" %}
{% endif %}

{% assign discount_keys = discount_keys_str | split: "," | uniq %}

<tr class="order-list__item">
  <td class="{{ line_item_group_class }}" style="padding: 15px 0 0px 1px;">
    <table height="100%">
        <td class="order-list__parent-image-cell">
          <table height="100%">
            <tr>
              <td class="{{ padding_bottom_none_class }}" valign="top">
                {% if parent_line_item and parent_line_item.image %}
                  <img src="{{ parent_line_item | img_url: 'compact_cropped' }}" align="left" width="60" height="60" class="order-list__product-image"/>
                {% elsif line_item_group.image %}
                  <img src="{{ line_item_group | img_url: 'compact_cropped' }}" align="left" width="60" height="60" class="order-list__product-image"/>
                {% else %}
                  <div class="order-list__no-image-cell">
                    <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="30" height="30" class="order-list__no-product-image"/>
                  </div>
                {% endif %}
              </td>
            </tr>
            {% if line_item_group.deliverable? == true %}
              <tr height="100%">
                <td height="100%" class="parent-vertical-line__cell">
                  <table height="100%" style="width: auto;">
                    <tr>
                      <td height="100%" class="nested-line-item-spacer-cell">
                        <div style="width: 6px;"></div>
                      </td>
                      <td height="100%" class="parent-vertical-line__cell">
                        <div class="parent-vertical-line__content"></div>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            {% endif %}
          </table>
        </td>

        <td class="order-list__product-description-cell">
          <table>
            <tr>
              <td class="order-list__product-description-cell" colspan="2">
                <span class="order-list__item-title">{{ line_item_group.display_title }}&nbsp;&times;&nbsp;{{ line_item_group.quantity }}</span><br/>
                {% if line_item_group.variant and line_item_group.variant.title != 'Default Title' %}
                  <span class="order-list__item-variant">{{ line_item_group.variant.title }}</span>
                {% endif %}

                {% if line_item_group.deliverable? %}
                  {% if parent_line_item.discount_allocations %}
                    {% for discount_allocation in parent_line_item.discount_allocations %}
                      {% if discount_allocation.discount_application.target_selection != 'all' %}
                        <p>
                          <span class="order-list__item-discount-allocation">
                            <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
                            <span>
                              {{ discount_allocation.discount_application.title | upcase }}
                              (-{{ discount_allocation.amount | money }})
                            </span>
                          </span>
                        </p>
                      {% endif %}
                    {% endfor %}
                  {% endif %}
                {% else %}
                  {% for discount_key in discount_keys %}
                    {% assign discount_amount = 0 %}

                    {% for component in line_item_group.components %}
                      {% for da in component.discount_allocations %}
                        {% assign key = da.discount_application.title | append: da.discount_application.type %}
                        {% if da.discount_application.target_selection != 'all' and key == discount_key %}
                          {% assign discount_amount = discount_amount | plus: da.amount %}
                          {% assign discount_title = da.discount_application.title %}
                        {% endif %}
                      {% endfor %}
                    {% endfor %}

                    <p>
                      <span class="order-list__item-discount-allocation">
                        <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
                        <span>
                          {{ discount_title | upcase }}
                          (-{{ discount_amount | money }})
                        </span>
                      </span>
                    </p>
                  {% endfor %}
                {% endif %}
              </td>

                <td class="order-list__parent_price-cell">
                  {% if original_line_price != final_line_price %}
                    <del class="order-list__item-original-price">{{ original_line_price | money }}</del>
                  {% endif %}
                  <p class="order-list__item-price">
                    {% if final_line_price > 0 %}
                      {{ final_line_price | money }}
                    {% else %}
                      {{ 'notifications.views.mailers.notifications.discount_free' | t }}
                    {% endif %}
                  </p>
                </td>
            </tr>

            {% if line_item_group.deliverable? == false %}
              {% for component in line_item_group.components %}
                
{% if true %}
  {% assign order_list_item_class = "order-list__bundle-item" %}
  {% assign css_image_class = 'order-list__image-cell' %}
  {% assign order_list_product_description_class = 'order-list__product-description-cell' %}
{% else %}
  {% assign order_list_product_description_class = 'order-list__product-description-cell--nested-line-item' %}
  {% if false %}
    {% assign css_curved_line_cell_container_class = 'curved-line-cell-container__top-spacer-cell--show-border' %}
    {% assign css_hide_vertical_line_class = 'vertical-line__content--hide' %}
    {% assign css_curved_line_cell_container_cell__no_padding_class = 'curved-line-cell-container__cell--no-padding' %}
  {% endif %}
{% endif %}

<tr height="100%">
    <td class="{{ order_list_item_class }} {{ css_image_class }}" valign="top">
        {% if component.image %}
        <img src="{{ component | img_url: 'compact_cropped' }}" align="left" width="40" height="40" class="order-list__product-image"/>
        {% else %}
        <div class="order-list__no-image-cell small">
            <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="20" height="20" class="order-list__no-product-image small"/>
        </div>
        {% endif %}
    </td>

    <td class="{{ order_list_product_description_class }}" valign="top">
        {% if component.product.title %}
            {% assign component_title = component.product.title %}
        {% else %}
            {% assign component_title = component.title %}
        {% endif %}

        {% if line_item_group.deliverable? %}
            <span class="order-list__item-title">{{ component_title }}&nbsp;&times;&nbsp;{{ component.quantity }}</span>
        {% else %}
            <span class="order-list__item-title">{{ component.quantity }}&nbsp;&times;&nbsp;{{ component_title }}</span>
        {% endif %}
        <br>
        {% if component.variant.title != 'Default Title' %}
            <span class="order-list__item-variant">{{ component.variant.title }}</span>
        {% endif %}

        {% if line_item_group.deliverable? %}
            {% if component.discount_allocations %}
                {% for discount_allocation in component.discount_allocations %}
                    {% if discount_allocation.discount_application.target_selection != 'all' %}
                        <p>
                            <span class="order-list__item-discount-allocation">
                            <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
                            <span>
                                {{ discount_allocation.discount_application.title | upcase }}
                                (-{{ discount_allocation.amount | money }})
                            </span>
                            </span>
                        </p>
                    {% endif %}
                {% endfor %}
            {% endif %}
        {% endif %}
    </td>

    {% if line_item_group.deliverable? %}
    <td class="order-list__price-cell">
        {% if component.original_line_price != component.final_line_price %}
            <del class="order-list__item-original-price">{{ component.original_line_price | money }}</del>
        {% endif %}
        <p class="order-list__item-price">
        {% if component.final_line_price > 0 %}
            {{ component.final_line_price | money }}
        {% else %}
            無料
        {% endif %}
        </p>
    </td>
    {% endif %}
</tr>

              {% endfor %}
            {% endif %}
          </table>
        </td>
    </table>
    {% if line_item_group.deliverable? %}
      <td height="100%">
        {% for component in line_item_group.components %}

          <tr>
            <td class="order-list__deliverable-item" height="100%" style="padding: 0;">
              <table height="100%">
                
{% if false %}
  {% assign order_list_item_class = "order-list__bundle-item" %}
  {% assign css_image_class = 'order-list__image-cell' %}
  {% assign order_list_product_description_class = 'order-list__product-description-cell' %}
{% else %}
  {% assign order_list_product_description_class = 'order-list__product-description-cell--nested-line-item' %}
  {% if forloop.last %}
    {% assign css_curved_line_cell_container_class = 'curved-line-cell-container__top-spacer-cell--show-border' %}
    {% assign css_hide_vertical_line_class = 'vertical-line__content--hide' %}
    {% assign css_curved_line_cell_container_cell__no_padding_class = 'curved-line-cell-container__cell--no-padding' %}
  {% endif %}
{% endif %}

<tr height="100%">
    <td class="nested-line-item-spacer-cell" style="padding: 1px;">
        <div class="nested-line-item-spacer"></div>
    </td>
    <td class="curved-line-cell-container" valign="top">
        <div style="width: 0px;">
            <table>
                <tr>
                    <td class="{{ css_curved_line_cell_container_cell__no_padding_class }}" style="mso-padding-right-alt: 10px;">
                        <div class="curved-line-cell-container__top-spacer {{ css_curved_line_cell_container_class }}"></div>
                    </td>
                </tr>
                <tr>
                    <td class="curved-line-cell-container__curvedLine-cell">
                        <div class="curved-line-cell-container__curvedLine-cell__curvedLine"></div>
                    </td>
                </tr>
            </table>
        </div>
    </td>
    <td class="vertical-line" height="100%">
        <div class="vertical-line__content {{ css_hide_vertical_line_class }}"></div>
    </td>
    <td class="nested-line-item-spacer-cell--right">
        <div class="nested-line-item-spacer"></div>
    </td>
    <td class="{{ order_list_item_class }} {{ css_image_class }}" valign="top">
        {% if component.image %}
        <img src="{{ component | img_url: 'compact_cropped' }}" align="left" width="40" height="40" class="order-list__product-image"/>
        {% else %}
        <div class="order-list__no-image-cell small">
            <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="20" height="20" class="order-list__no-product-image small"/>
        </div>
        {% endif %}
    </td>

    <td class="{{ order_list_product_description_class }}" valign="top">
        {% if component.product.title %}
            {% assign component_title = component.product.title %}
        {% else %}
            {% assign component_title = component.title %}
        {% endif %}

        {% if line_item_group.deliverable? %}
            <span class="order-list__item-title">{{ component_title }}&nbsp;&times;&nbsp;{{ component.quantity }}</span>
        {% else %}
            <span class="order-list__item-title">{{ component.quantity }}&nbsp;&times;&nbsp;{{ component_title }}</span>
        {% endif %}
        <br>
        {% if component.variant.title != 'Default Title' %}
            <span class="order-list__item-variant">{{ component.variant.title }}</span>
        {% endif %}

        {% if line_item_group.deliverable? %}
            {% if component.discount_allocations %}
                {% for discount_allocation in component.discount_allocations %}
                    {% if discount_allocation.discount_application.target_selection != 'all' %}
                        <p>
                            <span class="order-list__item-discount-allocation">
                            <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
                            <span>
                                {{ discount_allocation.discount_application.title | upcase }}
                                (-{{ discount_allocation.amount | money }})
                            </span>
                            </span>
                        </p>
                    {% endif %}
                {% endfor %}
            {% endif %}
        {% endif %}
    </td>

    {% if line_item_group.deliverable? %}
    <td class="order-list__price-cell">
        {% if component.original_line_price != component.final_line_price %}
            <del class="order-list__item-original-price">{{ component.original_line_price | money }}</del>
        {% endif %}
        <p class="order-list__item-price">
        {% if component.final_line_price > 0 %}
            {{ component.final_line_price | money }}
        {% else %}
            無料
        {% endif %}
        </p>
    </td>
    {% endif %}
</tr>

              </table>
            </td>
          </tr>
        {% endfor %}
      </td>
    {% endif %}
  </td>
</tr>

          {% else %}
            {% if delivery_agreement == line_item_group.parent_sales_line_item.delivery_agreement %}
              
{% assign final_line_price = 0 %}
{% assign original_line_price = 0 %}
{% assign discount_keys_str = "" %}
{% assign parent_line_item = nil %}

{% if line_item_group.deliverable? == false %}
  {% assign line_item_group_class = "order-list__item__cell" %}
  {% for component in line_item_group.components %}
    {% assign final_line_price = final_line_price | plus: component.final_line_price %}
    {% assign original_line_price = original_line_price | plus: component.original_line_price %}

    {% for da in component.discount_allocations %}
      {% if da.discount_application.target_selection != 'all' %}
        {% assign discount_key = da.discount_application.title | append: da.discount_application.type %}
        {% assign discount_keys_str = discount_keys_str | append: discount_key | append: "," %}
      {% endif %}
    {% endfor %}
  {% endfor %}
{% endif %}

{% if line_item_group.deliverable? %}
  {% assign parent_line_item = line_item_group.parent_sales_line_item %}
  {% assign final_line_price = parent_line_item.final_line_price %}
  {% assign original_line_price = parent_line_item.original_line_price %}
  {% assign line_item_group_class = "order-list__parent_item__cell" %}
  {% assign padding_bottom_none_class = "padding-bottom-none" %}
{% endif %}

{% assign discount_keys = discount_keys_str | split: "," | uniq %}

<tr class="order-list__item">
  <td class="{{ line_item_group_class }}" style="padding: 15px 0 0px 1px;">
    <table height="100%">
        <td class="order-list__parent-image-cell">
          <table height="100%">
            <tr>
              <td class="{{ padding_bottom_none_class }}" valign="top">
                {% if parent_line_item and parent_line_item.image %}
                  <img src="{{ parent_line_item | img_url: 'compact_cropped' }}" align="left" width="60" height="60" class="order-list__product-image"/>
                {% elsif line_item_group.image %}
                  <img src="{{ line_item_group | img_url: 'compact_cropped' }}" align="left" width="60" height="60" class="order-list__product-image"/>
                {% else %}
                  <div class="order-list__no-image-cell">
                    <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="30" height="30" class="order-list__no-product-image"/>
                  </div>
                {% endif %}
              </td>
            </tr>
            {% if line_item_group.deliverable? == true %}
              <tr height="100%">
                <td height="100%" class="parent-vertical-line__cell">
                  <table height="100%" style="width: auto;">
                    <tr>
                      <td height="100%" class="nested-line-item-spacer-cell">
                        <div style="width: 6px;"></div>
                      </td>
                      <td height="100%" class="parent-vertical-line__cell">
                        <div class="parent-vertical-line__content"></div>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            {% endif %}
          </table>
        </td>

        <td class="order-list__product-description-cell">
          <table>
            <tr>
              <td class="order-list__product-description-cell" colspan="2">
                <span class="order-list__item-title">{{ line_item_group.display_title }}&nbsp;&times;&nbsp;{{ line_item_group.quantity }}</span><br/>
                {% if line_item_group.variant and line_item_group.variant.title != 'Default Title' %}
                  <span class="order-list__item-variant">{{ line_item_group.variant.title }}</span>
                {% endif %}

                {% if line_item_group.deliverable? %}
                  {% if parent_line_item.discount_allocations %}
                    {% for discount_allocation in parent_line_item.discount_allocations %}
                      {% if discount_allocation.discount_application.target_selection != 'all' %}
                        <p>
                          <span class="order-list__item-discount-allocation">
                            <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
                            <span>
                              {{ discount_allocation.discount_application.title | upcase }}
                              (-{{ discount_allocation.amount | money }})
                            </span>
                          </span>
                        </p>
                      {% endif %}
                    {% endfor %}
                  {% endif %}
                {% else %}
                  {% for discount_key in discount_keys %}
                    {% assign discount_amount = 0 %}

                    {% for component in line_item_group.components %}
                      {% for da in component.discount_allocations %}
                        {% assign key = da.discount_application.title | append: da.discount_application.type %}
                        {% if da.discount_application.target_selection != 'all' and key == discount_key %}
                          {% assign discount_amount = discount_amount | plus: da.amount %}
                          {% assign discount_title = da.discount_application.title %}
                        {% endif %}
                      {% endfor %}
                    {% endfor %}

                    <p>
                      <span class="order-list__item-discount-allocation">
                        <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
                        <span>
                          {{ discount_title | upcase }}
                          (-{{ discount_amount | money }})
                        </span>
                      </span>
                    </p>
                  {% endfor %}
                {% endif %}
              </td>

                <td class="order-list__parent_price-cell">
                  {% if original_line_price != final_line_price %}
                    <del class="order-list__item-original-price">{{ original_line_price | money }}</del>
                  {% endif %}
                  <p class="order-list__item-price">
                    {% if final_line_price > 0 %}
                      {{ final_line_price | money }}
                    {% else %}
                      {{ 'notifications.views.mailers.notifications.discount_free' | t }}
                    {% endif %}
                  </p>
                </td>
            </tr>

            {% if line_item_group.deliverable? == false %}
              {% for component in line_item_group.components %}
                
{% if true %}
  {% assign order_list_item_class = "order-list__bundle-item" %}
  {% assign css_image_class = 'order-list__image-cell' %}
  {% assign order_list_product_description_class = 'order-list__product-description-cell' %}
{% else %}
  {% assign order_list_product_description_class = 'order-list__product-description-cell--nested-line-item' %}
  {% if false %}
    {% assign css_curved_line_cell_container_class = 'curved-line-cell-container__top-spacer-cell--show-border' %}
    {% assign css_hide_vertical_line_class = 'vertical-line__content--hide' %}
    {% assign css_curved_line_cell_container_cell__no_padding_class = 'curved-line-cell-container__cell--no-padding' %}
  {% endif %}
{% endif %}

<tr height="100%">
    <td class="{{ order_list_item_class }} {{ css_image_class }}" valign="top">
        {% if component.image %}
        <img src="{{ component | img_url: 'compact_cropped' }}" align="left" width="40" height="40" class="order-list__product-image"/>
        {% else %}
        <div class="order-list__no-image-cell small">
            <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="20" height="20" class="order-list__no-product-image small"/>
        </div>
        {% endif %}
    </td>

    <td class="{{ order_list_product_description_class }}" valign="top">
        {% if component.product.title %}
            {% assign component_title = component.product.title %}
        {% else %}
            {% assign component_title = component.title %}
        {% endif %}

        {% if line_item_group.deliverable? %}
            <span class="order-list__item-title">{{ component_title }}&nbsp;&times;&nbsp;{{ component.quantity }}</span>
        {% else %}
            <span class="order-list__item-title">{{ component.quantity }}&nbsp;&times;&nbsp;{{ component_title }}</span>
        {% endif %}
        <br>
        {% if component.variant.title != 'Default Title' %}
            <span class="order-list__item-variant">{{ component.variant.title }}</span>
        {% endif %}

        {% if line_item_group.deliverable? %}
            {% if component.discount_allocations %}
                {% for discount_allocation in component.discount_allocations %}
                    {% if discount_allocation.discount_application.target_selection != 'all' %}
                        <p>
                            <span class="order-list__item-discount-allocation">
                            <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
                            <span>
                                {{ discount_allocation.discount_application.title | upcase }}
                                (-{{ discount_allocation.amount | money }})
                            </span>
                            </span>
                        </p>
                    {% endif %}
                {% endfor %}
            {% endif %}
        {% endif %}
    </td>

    {% if line_item_group.deliverable? %}
    <td class="order-list__price-cell">
        {% if component.original_line_price != component.final_line_price %}
            <del class="order-list__item-original-price">{{ component.original_line_price | money }}</del>
        {% endif %}
        <p class="order-list__item-price">
        {% if component.final_line_price > 0 %}
            {{ component.final_line_price | money }}
        {% else %}
            無料
        {% endif %}
        </p>
    </td>
    {% endif %}
</tr>

              {% endfor %}
            {% endif %}
          </table>
        </td>
    </table>
    {% if line_item_group.deliverable? %}
      <td height="100%">
        {% for component in line_item_group.components %}

          <tr>
            <td class="order-list__deliverable-item" height="100%" style="padding: 0;">
              <table height="100%">
                
{% if false %}
  {% assign order_list_item_class = "order-list__bundle-item" %}
  {% assign css_image_class = 'order-list__image-cell' %}
  {% assign order_list_product_description_class = 'order-list__product-description-cell' %}
{% else %}
  {% assign order_list_product_description_class = 'order-list__product-description-cell--nested-line-item' %}
  {% if forloop.last %}
    {% assign css_curved_line_cell_container_class = 'curved-line-cell-container__top-spacer-cell--show-border' %}
    {% assign css_hide_vertical_line_class = 'vertical-line__content--hide' %}
    {% assign css_curved_line_cell_container_cell__no_padding_class = 'curved-line-cell-container__cell--no-padding' %}
  {% endif %}
{% endif %}

<tr height="100%">
    <td class="nested-line-item-spacer-cell" style="padding: 1px;">
        <div class="nested-line-item-spacer"></div>
    </td>
    <td class="curved-line-cell-container" valign="top">
        <div style="width: 0px;">
            <table>
                <tr>
                    <td class="{{ css_curved_line_cell_container_cell__no_padding_class }}" style="mso-padding-right-alt: 10px;">
                        <div class="curved-line-cell-container__top-spacer {{ css_curved_line_cell_container_class }}"></div>
                    </td>
                </tr>
                <tr>
                    <td class="curved-line-cell-container__curvedLine-cell">
                        <div class="curved-line-cell-container__curvedLine-cell__curvedLine"></div>
                    </td>
                </tr>
            </table>
        </div>
    </td>
    <td class="vertical-line" height="100%">
        <div class="vertical-line__content {{ css_hide_vertical_line_class }}"></div>
    </td>
    <td class="nested-line-item-spacer-cell--right">
        <div class="nested-line-item-spacer"></div>
    </td>
    <td class="{{ order_list_item_class }} {{ css_image_class }}" valign="top">
        {% if component.image %}
        <img src="{{ component | img_url: 'compact_cropped' }}" align="left" width="40" height="40" class="order-list__product-image"/>
        {% else %}
        <div class="order-list__no-image-cell small">
            <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="20" height="20" class="order-list__no-product-image small"/>
        </div>
        {% endif %}
    </td>

    <td class="{{ order_list_product_description_class }}" valign="top">
        {% if component.product.title %}
            {% assign component_title = component.product.title %}
        {% else %}
            {% assign component_title = component.title %}
        {% endif %}

        {% if line_item_group.deliverable? %}
            <span class="order-list__item-title">{{ component_title }}&nbsp;&times;&nbsp;{{ component.quantity }}</span>
        {% else %}
            <span class="order-list__item-title">{{ component.quantity }}&nbsp;&times;&nbsp;{{ component_title }}</span>
        {% endif %}
        <br>
        {% if component.variant.title != 'Default Title' %}
            <span class="order-list__item-variant">{{ component.variant.title }}</span>
        {% endif %}

        {% if line_item_group.deliverable? %}
            {% if component.discount_allocations %}
                {% for discount_allocation in component.discount_allocations %}
                    {% if discount_allocation.discount_application.target_selection != 'all' %}
                        <p>
                            <span class="order-list__item-discount-allocation">
                            <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
                            <span>
                                {{ discount_allocation.discount_application.title | upcase }}
                                (-{{ discount_allocation.amount | money }})
                            </span>
                            </span>
                        </p>
                    {% endif %}
                {% endfor %}
            {% endif %}
        {% endif %}
    </td>

    {% if line_item_group.deliverable? %}
    <td class="order-list__price-cell">
        {% if component.original_line_price != component.final_line_price %}
            <del class="order-list__item-original-price">{{ component.original_line_price | money }}</del>
        {% endif %}
        <p class="order-list__item-price">
        {% if component.final_line_price > 0 %}
            {{ component.final_line_price | money }}
        {% else %}
            無料
        {% endif %}
        </p>
    </td>
    {% endif %}
</tr>

              </table>
            </td>
          </tr>
        {% endfor %}
      </td>
    {% endif %}
  </td>
</tr>

            {% else %}
              {% for component in line_item_group.components %}
                
{% comment %} Skip child add-ons since they will be rendered under the parent line item {% endcomment %}
{% unless component.nested_line_child? %}

  {% assign is_parent = false %}
  {% assign is_nested_line_parent = component.nested_line_parent? %}
  {% if component.bundle_parent? or component.nested_line_parent? %}
    {% assign is_parent = true %}
  {% endif %}
  {% if is_nested_line_parent %}
    {% assign css_order_list_cell_nested_line_parent_class = 'order-list__parent-cell' %}
    {% assign css_order_list_parent_image_cell_nested_line_parent_class = 'order-list__nested-parent-image-cell' %}
  {% endif %}

  <tr class="order-list__item">
    <td class="order-list__item__cell {{ css_order_list_cell_nested_line_parent_class }}">
      <table height="100%">
        <td style="padding-bottom: 0px;">
          <table height="100%">
            <tr valign="top">
              {% if false and is_parent %}
                <td class="order-list__parent-image-cell {{ css_order_list_parent_image_cell_nested_line_parent_class }}">
                  {% if component.image %}
                    <img src="{{ component | img_url: 'compact_cropped' }}" align="left" width="60" height="60" class="order-list__product-image"/>
                  {% else %}
                    <div class="order-list__no-image-cell">
                      <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" class="order-list__no-product-image"/>
                    </div>
                  {% endif %}
                </td>
              {% else %}
                <td class="order-list__image-cell">
                  {% if component.image %}
                    <img src="{{ component | img_url: 'compact_cropped' }}" align="left" width="60" height="60" class="order-list__product-image"/>
                  {% else %}
                    <div class="order-list__no-image-cell">
                      <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="60" height="60" class="order-list__no-product-image"/>
                    </div>
                  {% endif %}
                </td>
              {% endif %}
            </tr>
            {% if is_nested_line_parent %}
              <tr height="100%">
                <td style="padding: 0px;" height="100%">
                  <table height="100%">
                    <tr>
                      <td height="100%" class="nested-line-item-spacer-cell">
                        <div class="nested-line-item-spacer"></div>
                      </td>
                      <td height="100%" class="parent-vertical-line__cell">
                        <div class="parent-vertical-line__content"></div>
                      </td>
                    </tr>
                  </table>                        
                </td>
              </tr>
            {% endif %}
          </table>
        </td>

        <td class="order-list__product-description-cell">
          {% if component.presentment_title %}
            {% assign line_title = component.presentment_title %}
          {% elsif component.title %}
            {% assign line_title = component.title %}
          {% else %}
            {% assign line_title = component.product.title %}
          {% endif %}
          {% if line.quantity < component.quantity %}
            {% capture line_display %}
              {{ line.quantity }}/{{ component.quantity }}個
            {% endcapture %}
          {% else %}
            {% assign line_display = component.quantity %}
          {% endif %}

          <span class="order-list__item-title">{{ line_title }}&nbsp;&times;&nbsp;{{ line_display }}</span><br/>

          {% if component.variant.title != 'Default Title' and is_parent == false %}
            <span class="order-list__item-variant">{{ component.variant.title }}</span><br/>
          {% elsif component.variant.title != 'Default Title' and component.nested_line_parent? %}
            <span class="order-list__item-variant">{{ component.variant.title }}</span><br/>
          {% elsif component.variant.title != 'Default Title' and component.bundle_parent? and false == false %}
            <span class="order-list__item-variant">{{ component.variant.title }}</span><br/>
          {% endif %}

          {% if false %}
            {% for child_line in component.bundle_components %}
              
{% if true %}
  {% assign css_class = 'order-list__bundle-item' %}
  {% assign css_image_class = 'order-list__image-cell' %}
  {% assign css_description_class = 'order-list__product-description-cell' %}
{% else %}
  {% assign css_class = 'order-list__deliverable-item_abandoned' %}
  {% assign css_image_class = 'order-list__image-cell--nested-line-item' %}
  {% assign css_description_class = 'order-list__product-description-cell--nested-line-item' %}
  {% if false %}
    {% assign css_curved_line_cell_container_class = 'curved-line-cell-container__top-spacer-cell--show-border' %}
    {% assign css_hide_vertical_line_class = 'vertical-line__content--hide' %}
    {% assign css_curved_line_cell_container_cell__no_padding_class = 'curved-line-cell-container__cell--no-padding' %}
  {% endif %}
{% endif %}

<table height="100%">
  <tr class="order-list__item">
    <td class="{{ css_class }}" height="100%">
      <table height="100%">
        <td class="{{ css_image_class }}">
          {% if child_line.image %}
            <img src="{{ child_line | img_url: 'compact_cropped' }}" align="left" width="40" height="40" class="order-list__product-image small"/>
          {% else %}
            <div class="order-list__no-image-cell small">
              <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="20" height="20" class="order-list__no-product-image small"/>
            </div>
          {% endif %}
        </td>

        <td class="{{ css_description_class }}">
          {% if child_line.product.title %}
            {% assign item_title = child_line.product.title %}
          {% else %}
            {% assign item_title = child_line.title %}
          {% endif %}

          {% assign item_display = child_line.quantity %}

            <span class="order-list__item-title">{{ item_display }}&nbsp;&times;&nbsp;{{ item_title }}</span><br>

          {% if child_line.variant.title != 'Default Title'%}
            <span class="order-list__item-variant">{{ child_line.variant.title }}</span><br/>
          {% endif %}
          {% if child_line.selling_plan_allocation %}
            <span class="order-list__item-variant">{{ child_line.selling_plan_allocation.selling_plan.name }}</span>
          {% endif %}
        </td>
      </table>
    </td>
  </tr>
</table>
            {% endfor %}
          {% else %}
            {% for group in component.groups %}
              {% if group.deliverable? %}
                <span class="order-list__item-variant">対象:{{ group.display_title }}</span><br/>
              {% else %}
                <span class="order-list__item-variant">{{ group.display_title }}の一部</span><br/>
              {% endif %}
            {% endfor %}
          {% endif %}

            {% if component.gift_card and component.properties["__shopify_send_gift_card_to_recipient"] %}
              {% for property in component.properties %}
  {% assign property_first_char = property.first | slice: 0 %}
  {% if property.last != blank and property_first_char != '_' %}
    <div class="order-list__item-property">
      <dt>{{ property.first }}:</dt>
      <dd>
      {% if property.last contains '/uploads/' %}
        <a href="{{ property.last }}" class="link" target="_blank">
        {{ property.last | split: '/' | last }}
        </a>
      {% else %}
        {{ property.last }}
      {% endif %}
      </dd>
    </div>
  {% endif %}
{% endfor %}

            {% endif %}

          {% if component.selling_plan_allocation %}
            <span class="order-list__item-variant">{{ component.selling_plan_allocation.selling_plan.name }}</span><br/>
          {% endif %}

          {% if component.refunded_quantity > 0 %}
            <span class="order-list__item-refunded">返金済み</span>
          {% endif %}

          {% if component.discount_allocations %}
            {% for discount_allocation in component.discount_allocations %}
              {% if discount_allocation.discount_application.target_selection != 'all' %}
              <p>
                <span class="order-list__item-discount-allocation">
                  <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
                  <span>
                    {{ discount_allocation.discount_application.title | upcase }}
                    (-{{ discount_allocation.amount | money }})
                  </span>
                </span>
              </p>
              {% endif %}
            {% endfor %}
          {% endif %}
        </td>
          {% if false and is_parent %}
            <td class="order-list__parent-price-cell">
          {% else %}
            <td class="order-list__price-cell">
          {% endif %}
          {% if component.original_line_price != component.final_line_price %}
            <del class="order-list__item-original-price">{{ component.original_line_price | money }}</del>
          {% endif %}
            <p class="order-list__item-price">
              {% if component.final_line_price > 0 %}
                {{ component.final_line_price | money }}
                {% if component.unit_price_measurement %}
  <div class="order-list__unit-price">
    {{- component.unit_price | unit_price_with_measurement: component.unit_price_measurement -}}
  </div>
{% endif %}
              {% else %}
                無料
              {% endif %}
            </p>
          </td>
        {% if component.nested_line_parent? %}
          {% for child_line in component.nested_lines %}
            
{% if false %}
  {% assign css_class = 'order-list__bundle-item' %}
  {% assign css_image_class = 'order-list__image-cell' %}
  {% assign css_description_class = 'order-list__product-description-cell' %}
{% else %}
  {% assign css_class = 'order-list__deliverable-item_abandoned' %}
  {% assign css_image_class = 'order-list__image-cell--nested-line-item' %}
  {% assign css_description_class = 'order-list__product-description-cell--nested-line-item' %}
  {% if forloop.last %}
    {% assign css_curved_line_cell_container_class = 'curved-line-cell-container__top-spacer-cell--show-border' %}
    {% assign css_hide_vertical_line_class = 'vertical-line__content--hide' %}
    {% assign css_curved_line_cell_container_cell__no_padding_class = 'curved-line-cell-container__cell--no-padding' %}
  {% endif %}
{% endif %}

<table height="100%">
  <tr class="order-list__item">
    <td class="{{ css_class }}" height="100%">
      <table height="100%">
          <td class="nested-line-item-spacer-cell"style="padding: 1px;">
            <div class="nested-line-item-spacer"></div>
          </td>
          <td class="curved-line-cell-container" valign="top">
            <div style="width: 0px;">
              <table>
                <tr>
                  <td class="{{ css_curved_line_cell_container_cell__no_padding_class }}" style="mso-padding-right-alt: 10px;">
                    <div class="curved-line-cell-container__top-spacer {{ css_curved_line_cell_container_class }}"></div>
                  </td>
                </tr>
                <tr>
                  <td class="curved-line-cell-container__curvedLine-cell">
                    <div class="curved-line-cell-container__curvedLine-cell__curvedLine"></div>
                  </td>
                </tr>
              </table>
            </div>
          </td>
          <td class="vertical-line" height="100%">
            <div class="vertical-line__content {{ css_hide_vertical_line_class }}"></div>
          </td>
          <td class="nested-line-item-spacer-cell--right">
            <div class="nested-line-item-spacer"></div>
          </td>
        <td class="{{ css_image_class }}">
          {% if child_line.image %}
            <img src="{{ child_line | img_url: 'compact_cropped' }}" align="left" width="40" height="40" class="order-list__product-image small"/>
          {% else %}
            <div class="order-list__no-image-cell small">
              <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="20" height="20" class="order-list__no-product-image small"/>
            </div>
          {% endif %}
        </td>

        <td class="{{ css_description_class }}">
          {% if child_line.product.title %}
            {% assign item_title = child_line.product.title %}
          {% else %}
            {% assign item_title = child_line.title %}
          {% endif %}

          {% assign item_display = child_line.quantity %}

            <span class="order-list__item-title">{{ item_title }}&nbsp;&times;&nbsp;{{ item_display }}</span><br>

          {% if child_line.variant.title != 'Default Title'%}
            <span class="order-list__item-variant">{{ child_line.variant.title }}</span><br/>
          {% endif %}
          {% if child_line.selling_plan_allocation %}
            <span class="order-list__item-variant">{{ child_line.selling_plan_allocation.selling_plan.name }}</span>
          {% endif %}
        </td>
      </table>
    </td>
  </tr>
</table>
          {% endfor %}
        {% endif %}
      </table>
    </td>
  </tr>

{% endunless %}

              {% endfor %}
            {% endif %}
          {% endif %}
        {% endfor %}
    </table>

    {% unless forloop.last %}
      <hr class="order-list__delivery-method-type-separator">
    {% endunless %}
  {% endif %}
{% endfor %}

            {% else %}
              
  
<table class="row">
  {% for line in subtotal_line_items %}
    {% if line.groups.size == 0 %}
      
{% comment %} Skip child add-ons since they will be rendered under the parent line item {% endcomment %}
{% unless line.nested_line_child? %}

  {% assign is_parent = false %}
  {% assign is_nested_line_parent = line.nested_line_parent? %}
  {% if line.bundle_parent? or line.nested_line_parent? %}
    {% assign is_parent = true %}
  {% endif %}
  {% if is_nested_line_parent %}
    {% assign css_order_list_cell_nested_line_parent_class = 'order-list__parent-cell' %}
    {% assign css_order_list_parent_image_cell_nested_line_parent_class = 'order-list__nested-parent-image-cell' %}
  {% endif %}

  <tr class="order-list__item">
    <td class="order-list__item__cell {{ css_order_list_cell_nested_line_parent_class }}">
      <table height="100%">
        <td style="padding-bottom: 0px;">
          <table height="100%">
            <tr valign="top">
              {% if false and is_parent %}
                <td class="order-list__parent-image-cell {{ css_order_list_parent_image_cell_nested_line_parent_class }}">
                  {% if line.image %}
                    <img src="{{ line | img_url: 'compact_cropped' }}" align="left" width="60" height="60" class="order-list__product-image"/>
                  {% else %}
                    <div class="order-list__no-image-cell">
                      <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" class="order-list__no-product-image"/>
                    </div>
                  {% endif %}
                </td>
              {% else %}
                <td class="order-list__image-cell">
                  {% if line.image %}
                    <img src="{{ line | img_url: 'compact_cropped' }}" align="left" width="60" height="60" class="order-list__product-image"/>
                  {% else %}
                    <div class="order-list__no-image-cell">
                      <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="60" height="60" class="order-list__no-product-image"/>
                    </div>
                  {% endif %}
                </td>
              {% endif %}
            </tr>
            {% if is_nested_line_parent %}
              <tr height="100%">
                <td style="padding: 0px;" height="100%">
                  <table height="100%">
                    <tr>
                      <td height="100%" class="nested-line-item-spacer-cell">
                        <div class="nested-line-item-spacer"></div>
                      </td>
                      <td height="100%" class="parent-vertical-line__cell">
                        <div class="parent-vertical-line__content"></div>
                      </td>
                    </tr>
                  </table>                        
                </td>
              </tr>
            {% endif %}
          </table>
        </td>

        <td class="order-list__product-description-cell">
          {% if line.presentment_title %}
            {% assign line_title = line.presentment_title %}
          {% elsif line.title %}
            {% assign line_title = line.title %}
          {% else %}
            {% assign line_title = line.product.title %}
          {% endif %}
          {% if line.quantity < line.quantity %}
            {% capture line_display %}
              {{ line.quantity }}/{{ line.quantity }}個
            {% endcapture %}
          {% else %}
            {% assign line_display = line.quantity %}
          {% endif %}

          <span class="order-list__item-title">{{ line_title }}&nbsp;&times;&nbsp;{{ line_display }}</span><br/>

          {% if line.variant.title != 'Default Title' and is_parent == false %}
            <span class="order-list__item-variant">{{ line.variant.title }}</span><br/>
          {% elsif line.variant.title != 'Default Title' and line.nested_line_parent? %}
            <span class="order-list__item-variant">{{ line.variant.title }}</span><br/>
          {% elsif line.variant.title != 'Default Title' and line.bundle_parent? and false == false %}
            <span class="order-list__item-variant">{{ line.variant.title }}</span><br/>
          {% endif %}

          {% if false %}
            {% for child_line in line.bundle_components %}
              
{% if true %}
  {% assign css_class = 'order-list__bundle-item' %}
  {% assign css_image_class = 'order-list__image-cell' %}
  {% assign css_description_class = 'order-list__product-description-cell' %}
{% else %}
  {% assign css_class = 'order-list__deliverable-item_abandoned' %}
  {% assign css_image_class = 'order-list__image-cell--nested-line-item' %}
  {% assign css_description_class = 'order-list__product-description-cell--nested-line-item' %}
  {% if false %}
    {% assign css_curved_line_cell_container_class = 'curved-line-cell-container__top-spacer-cell--show-border' %}
    {% assign css_hide_vertical_line_class = 'vertical-line__content--hide' %}
    {% assign css_curved_line_cell_container_cell__no_padding_class = 'curved-line-cell-container__cell--no-padding' %}
  {% endif %}
{% endif %}

<table height="100%">
  <tr class="order-list__item">
    <td class="{{ css_class }}" height="100%">
      <table height="100%">
        <td class="{{ css_image_class }}">
          {% if child_line.image %}
            <img src="{{ child_line | img_url: 'compact_cropped' }}" align="left" width="40" height="40" class="order-list__product-image small"/>
          {% else %}
            <div class="order-list__no-image-cell small">
              <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="20" height="20" class="order-list__no-product-image small"/>
            </div>
          {% endif %}
        </td>

        <td class="{{ css_description_class }}">
          {% if child_line.product.title %}
            {% assign item_title = child_line.product.title %}
          {% else %}
            {% assign item_title = child_line.title %}
          {% endif %}

          {% assign item_display = child_line.quantity %}

            <span class="order-list__item-title">{{ item_display }}&nbsp;&times;&nbsp;{{ item_title }}</span><br>

          {% if child_line.variant.title != 'Default Title'%}
            <span class="order-list__item-variant">{{ child_line.variant.title }}</span><br/>
          {% endif %}
          {% if child_line.selling_plan_allocation %}
            <span class="order-list__item-variant">{{ child_line.selling_plan_allocation.selling_plan.name }}</span>
          {% endif %}
        </td>
      </table>
    </td>
  </tr>
</table>
            {% endfor %}
          {% else %}
            {% for group in line.groups %}
              {% if group.deliverable? %}
                <span class="order-list__item-variant">対象:{{ group.display_title }}</span><br/>
              {% else %}
                <span class="order-list__item-variant">{{ group.display_title }}の一部</span><br/>
              {% endif %}
            {% endfor %}
          {% endif %}

            {% if line.gift_card and line.properties["__shopify_send_gift_card_to_recipient"] %}
              {% for property in line.properties %}
  {% assign property_first_char = property.first | slice: 0 %}
  {% if property.last != blank and property_first_char != '_' %}
    <div class="order-list__item-property">
      <dt>{{ property.first }}:</dt>
      <dd>
      {% if property.last contains '/uploads/' %}
        <a href="{{ property.last }}" class="link" target="_blank">
        {{ property.last | split: '/' | last }}
        </a>
      {% else %}
        {{ property.last }}
      {% endif %}
      </dd>
    </div>
  {% endif %}
{% endfor %}

            {% endif %}

          {% if line.selling_plan_allocation %}
            <span class="order-list__item-variant">{{ line.selling_plan_allocation.selling_plan.name }}</span><br/>
          {% endif %}

          {% if line.refunded_quantity > 0 %}
            <span class="order-list__item-refunded">返金済み</span>
          {% endif %}

          {% if line.discount_allocations %}
            {% for discount_allocation in line.discount_allocations %}
              {% if discount_allocation.discount_application.target_selection != 'all' %}
              <p>
                <span class="order-list__item-discount-allocation">
                  <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
                  <span>
                    {{ discount_allocation.discount_application.title | upcase }}
                    (-{{ discount_allocation.amount | money }})
                  </span>
                </span>
              </p>
              {% endif %}
            {% endfor %}
          {% endif %}
        </td>
          {% if false and is_parent %}
            <td class="order-list__parent-price-cell">
          {% else %}
            <td class="order-list__price-cell">
          {% endif %}
          {% if line.original_line_price != line.final_line_price %}
            <del class="order-list__item-original-price">{{ line.original_line_price | money }}</del>
          {% endif %}
            <p class="order-list__item-price">
              {% if line.final_line_price > 0 %}
                {{ line.final_line_price | money }}
                {% if line.unit_price_measurement %}
  <div class="order-list__unit-price">
    {{- line.unit_price | unit_price_with_measurement: line.unit_price_measurement -}}
  </div>
{% endif %}
              {% else %}
                無料
              {% endif %}
            </p>
          </td>
        {% if line.nested_line_parent? %}
          {% for child_line in line.nested_lines %}
            
{% if false %}
  {% assign css_class = 'order-list__bundle-item' %}
  {% assign css_image_class = 'order-list__image-cell' %}
  {% assign css_description_class = 'order-list__product-description-cell' %}
{% else %}
  {% assign css_class = 'order-list__deliverable-item_abandoned' %}
  {% assign css_image_class = 'order-list__image-cell--nested-line-item' %}
  {% assign css_description_class = 'order-list__product-description-cell--nested-line-item' %}
  {% if forloop.last %}
    {% assign css_curved_line_cell_container_class = 'curved-line-cell-container__top-spacer-cell--show-border' %}
    {% assign css_hide_vertical_line_class = 'vertical-line__content--hide' %}
    {% assign css_curved_line_cell_container_cell__no_padding_class = 'curved-line-cell-container__cell--no-padding' %}
  {% endif %}
{% endif %}

<table height="100%">
  <tr class="order-list__item">
    <td class="{{ css_class }}" height="100%">
      <table height="100%">
          <td class="nested-line-item-spacer-cell"style="padding: 1px;">
            <div class="nested-line-item-spacer"></div>
          </td>
          <td class="curved-line-cell-container" valign="top">
            <div style="width: 0px;">
              <table>
                <tr>
                  <td class="{{ css_curved_line_cell_container_cell__no_padding_class }}" style="mso-padding-right-alt: 10px;">
                    <div class="curved-line-cell-container__top-spacer {{ css_curved_line_cell_container_class }}"></div>
                  </td>
                </tr>
                <tr>
                  <td class="curved-line-cell-container__curvedLine-cell">
                    <div class="curved-line-cell-container__curvedLine-cell__curvedLine"></div>
                  </td>
                </tr>
              </table>
            </div>
          </td>
          <td class="vertical-line" height="100%">
            <div class="vertical-line__content {{ css_hide_vertical_line_class }}"></div>
          </td>
          <td class="nested-line-item-spacer-cell--right">
            <div class="nested-line-item-spacer"></div>
          </td>
        <td class="{{ css_image_class }}">
          {% if child_line.image %}
            <img src="{{ child_line | img_url: 'compact_cropped' }}" align="left" width="40" height="40" class="order-list__product-image small"/>
          {% else %}
            <div class="order-list__no-image-cell small">
              <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="20" height="20" class="order-list__no-product-image small"/>
            </div>
          {% endif %}
        </td>

        <td class="{{ css_description_class }}">
          {% if child_line.product.title %}
            {% assign item_title = child_line.product.title %}
          {% else %}
            {% assign item_title = child_line.title %}
          {% endif %}

          {% assign item_display = child_line.quantity %}

            <span class="order-list__item-title">{{ item_title }}&nbsp;&times;&nbsp;{{ item_display }}</span><br>

          {% if child_line.variant.title != 'Default Title'%}
            <span class="order-list__item-variant">{{ child_line.variant.title }}</span><br/>
          {% endif %}
          {% if child_line.selling_plan_allocation %}
            <span class="order-list__item-variant">{{ child_line.selling_plan_allocation.selling_plan.name }}</span>
          {% endif %}
        </td>
      </table>
    </td>
  </tr>
</table>
          {% endfor %}
        {% endif %}
      </table>
    </td>
  </tr>

{% endunless %}

    {% endif %}
  {% endfor %}
  {% for line_item_group in line_item_groups %}
    
{% assign final_line_price = 0 %}
{% assign original_line_price = 0 %}
{% assign discount_keys_str = "" %}
{% assign parent_line_item = nil %}

{% if line_item_group.deliverable? == false %}
  {% assign line_item_group_class = "order-list__item__cell" %}
  {% for component in line_item_group.components %}
    {% assign final_line_price = final_line_price | plus: component.final_line_price %}
    {% assign original_line_price = original_line_price | plus: component.original_line_price %}

    {% for da in component.discount_allocations %}
      {% if da.discount_application.target_selection != 'all' %}
        {% assign discount_key = da.discount_application.title | append: da.discount_application.type %}
        {% assign discount_keys_str = discount_keys_str | append: discount_key | append: "," %}
      {% endif %}
    {% endfor %}
  {% endfor %}
{% endif %}

{% if line_item_group.deliverable? %}
  {% assign parent_line_item = line_item_group.parent_sales_line_item %}
  {% assign final_line_price = parent_line_item.final_line_price %}
  {% assign original_line_price = parent_line_item.original_line_price %}
  {% assign line_item_group_class = "order-list__parent_item__cell" %}
  {% assign padding_bottom_none_class = "padding-bottom-none" %}
{% endif %}

{% assign discount_keys = discount_keys_str | split: "," | uniq %}

<tr class="order-list__item">
  <td class="{{ line_item_group_class }}" style="padding: 15px 0 0px 1px;">
    <table height="100%">
        <td class="order-list__parent-image-cell">
          <table height="100%">
            <tr>
              <td class="{{ padding_bottom_none_class }}" valign="top">
                {% if parent_line_item and parent_line_item.image %}
                  <img src="{{ parent_line_item | img_url: 'compact_cropped' }}" align="left" width="60" height="60" class="order-list__product-image"/>
                {% elsif line_item_group.image %}
                  <img src="{{ line_item_group | img_url: 'compact_cropped' }}" align="left" width="60" height="60" class="order-list__product-image"/>
                {% else %}
                  <div class="order-list__no-image-cell">
                    <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="30" height="30" class="order-list__no-product-image"/>
                  </div>
                {% endif %}
              </td>
            </tr>
            {% if line_item_group.deliverable? == true %}
              <tr height="100%">
                <td height="100%" class="parent-vertical-line__cell">
                  <table height="100%" style="width: auto;">
                    <tr>
                      <td height="100%" class="nested-line-item-spacer-cell">
                        <div style="width: 6px;"></div>
                      </td>
                      <td height="100%" class="parent-vertical-line__cell">
                        <div class="parent-vertical-line__content"></div>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            {% endif %}
          </table>
        </td>

        <td class="order-list__product-description-cell">
          <table>
            <tr>
              <td class="order-list__product-description-cell" colspan="2">
                <span class="order-list__item-title">{{ line_item_group.display_title }}&nbsp;&times;&nbsp;{{ line_item_group.quantity }}</span><br/>
                {% if line_item_group.variant and line_item_group.variant.title != 'Default Title' %}
                  <span class="order-list__item-variant">{{ line_item_group.variant.title }}</span>
                {% endif %}

                {% if line_item_group.deliverable? %}
                  {% if parent_line_item.discount_allocations %}
                    {% for discount_allocation in parent_line_item.discount_allocations %}
                      {% if discount_allocation.discount_application.target_selection != 'all' %}
                        <p>
                          <span class="order-list__item-discount-allocation">
                            <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
                            <span>
                              {{ discount_allocation.discount_application.title | upcase }}
                              (-{{ discount_allocation.amount | money }})
                            </span>
                          </span>
                        </p>
                      {% endif %}
                    {% endfor %}
                  {% endif %}
                {% else %}
                  {% for discount_key in discount_keys %}
                    {% assign discount_amount = 0 %}

                    {% for component in line_item_group.components %}
                      {% for da in component.discount_allocations %}
                        {% assign key = da.discount_application.title | append: da.discount_application.type %}
                        {% if da.discount_application.target_selection != 'all' and key == discount_key %}
                          {% assign discount_amount = discount_amount | plus: da.amount %}
                          {% assign discount_title = da.discount_application.title %}
                        {% endif %}
                      {% endfor %}
                    {% endfor %}

                    <p>
                      <span class="order-list__item-discount-allocation">
                        <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
                        <span>
                          {{ discount_title | upcase }}
                          (-{{ discount_amount | money }})
                        </span>
                      </span>
                    </p>
                  {% endfor %}
                {% endif %}
              </td>

                <td class="order-list__parent_price-cell">
                  {% if original_line_price != final_line_price %}
                    <del class="order-list__item-original-price">{{ original_line_price | money }}</del>
                  {% endif %}
                  <p class="order-list__item-price">
                    {% if final_line_price > 0 %}
                      {{ final_line_price | money }}
                    {% else %}
                      {{ 'notifications.views.mailers.notifications.discount_free' | t }}
                    {% endif %}
                  </p>
                </td>
            </tr>

            {% if line_item_group.deliverable? == false %}
              {% for component in line_item_group.components %}
                
{% if true %}
  {% assign order_list_item_class = "order-list__bundle-item" %}
  {% assign css_image_class = 'order-list__image-cell' %}
  {% assign order_list_product_description_class = 'order-list__product-description-cell' %}
{% else %}
  {% assign order_list_product_description_class = 'order-list__product-description-cell--nested-line-item' %}
  {% if false %}
    {% assign css_curved_line_cell_container_class = 'curved-line-cell-container__top-spacer-cell--show-border' %}
    {% assign css_hide_vertical_line_class = 'vertical-line__content--hide' %}
    {% assign css_curved_line_cell_container_cell__no_padding_class = 'curved-line-cell-container__cell--no-padding' %}
  {% endif %}
{% endif %}

<tr height="100%">
    <td class="{{ order_list_item_class }} {{ css_image_class }}" valign="top">
        {% if component.image %}
        <img src="{{ component | img_url: 'compact_cropped' }}" align="left" width="40" height="40" class="order-list__product-image"/>
        {% else %}
        <div class="order-list__no-image-cell small">
            <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="20" height="20" class="order-list__no-product-image small"/>
        </div>
        {% endif %}
    </td>

    <td class="{{ order_list_product_description_class }}" valign="top">
        {% if component.product.title %}
            {% assign component_title = component.product.title %}
        {% else %}
            {% assign component_title = component.title %}
        {% endif %}

        {% if line_item_group.deliverable? %}
            <span class="order-list__item-title">{{ component_title }}&nbsp;&times;&nbsp;{{ component.quantity }}</span>
        {% else %}
            <span class="order-list__item-title">{{ component.quantity }}&nbsp;&times;&nbsp;{{ component_title }}</span>
        {% endif %}
        <br>
        {% if component.variant.title != 'Default Title' %}
            <span class="order-list__item-variant">{{ component.variant.title }}</span>
        {% endif %}

        {% if line_item_group.deliverable? %}
            {% if component.discount_allocations %}
                {% for discount_allocation in component.discount_allocations %}
                    {% if discount_allocation.discount_application.target_selection != 'all' %}
                        <p>
                            <span class="order-list__item-discount-allocation">
                            <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
                            <span>
                                {{ discount_allocation.discount_application.title | upcase }}
                                (-{{ discount_allocation.amount | money }})
                            </span>
                            </span>
                        </p>
                    {% endif %}
                {% endfor %}
            {% endif %}
        {% endif %}
    </td>

    {% if line_item_group.deliverable? %}
    <td class="order-list__price-cell">
        {% if component.original_line_price != component.final_line_price %}
            <del class="order-list__item-original-price">{{ component.original_line_price | money }}</del>
        {% endif %}
        <p class="order-list__item-price">
        {% if component.final_line_price > 0 %}
            {{ component.final_line_price | money }}
        {% else %}
            無料
        {% endif %}
        </p>
    </td>
    {% endif %}
</tr>

              {% endfor %}
            {% endif %}
          </table>
        </td>
    </table>
    {% if line_item_group.deliverable? %}
      <td height="100%">
        {% for component in line_item_group.components %}

          <tr>
            <td class="order-list__deliverable-item" height="100%" style="padding: 0;">
              <table height="100%">
                
{% if false %}
  {% assign order_list_item_class = "order-list__bundle-item" %}
  {% assign css_image_class = 'order-list__image-cell' %}
  {% assign order_list_product_description_class = 'order-list__product-description-cell' %}
{% else %}
  {% assign order_list_product_description_class = 'order-list__product-description-cell--nested-line-item' %}
  {% if forloop.last %}
    {% assign css_curved_line_cell_container_class = 'curved-line-cell-container__top-spacer-cell--show-border' %}
    {% assign css_hide_vertical_line_class = 'vertical-line__content--hide' %}
    {% assign css_curved_line_cell_container_cell__no_padding_class = 'curved-line-cell-container__cell--no-padding' %}
  {% endif %}
{% endif %}

<tr height="100%">
    <td class="nested-line-item-spacer-cell" style="padding: 1px;">
        <div class="nested-line-item-spacer"></div>
    </td>
    <td class="curved-line-cell-container" valign="top">
        <div style="width: 0px;">
            <table>
                <tr>
                    <td class="{{ css_curved_line_cell_container_cell__no_padding_class }}" style="mso-padding-right-alt: 10px;">
                        <div class="curved-line-cell-container__top-spacer {{ css_curved_line_cell_container_class }}"></div>
                    </td>
                </tr>
                <tr>
                    <td class="curved-line-cell-container__curvedLine-cell">
                        <div class="curved-line-cell-container__curvedLine-cell__curvedLine"></div>
                    </td>
                </tr>
            </table>
        </div>
    </td>
    <td class="vertical-line" height="100%">
        <div class="vertical-line__content {{ css_hide_vertical_line_class }}"></div>
    </td>
    <td class="nested-line-item-spacer-cell--right">
        <div class="nested-line-item-spacer"></div>
    </td>
    <td class="{{ order_list_item_class }} {{ css_image_class }}" valign="top">
        {% if component.image %}
        <img src="{{ component | img_url: 'compact_cropped' }}" align="left" width="40" height="40" class="order-list__product-image"/>
        {% else %}
        <div class="order-list__no-image-cell small">
            <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="left" width="20" height="20" class="order-list__no-product-image small"/>
        </div>
        {% endif %}
    </td>

    <td class="{{ order_list_product_description_class }}" valign="top">
        {% if component.product.title %}
            {% assign component_title = component.product.title %}
        {% else %}
            {% assign component_title = component.title %}
        {% endif %}

        {% if line_item_group.deliverable? %}
            <span class="order-list__item-title">{{ component_title }}&nbsp;&times;&nbsp;{{ component.quantity }}</span>
        {% else %}
            <span class="order-list__item-title">{{ component.quantity }}&nbsp;&times;&nbsp;{{ component_title }}</span>
        {% endif %}
        <br>
        {% if component.variant.title != 'Default Title' %}
            <span class="order-list__item-variant">{{ component.variant.title }}</span>
        {% endif %}

        {% if line_item_group.deliverable? %}
            {% if component.discount_allocations %}
                {% for discount_allocation in component.discount_allocations %}
                    {% if discount_allocation.discount_application.target_selection != 'all' %}
                        <p>
                            <span class="order-list__item-discount-allocation">
                            <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
                            <span>
                                {{ discount_allocation.discount_application.title | upcase }}
                                (-{{ discount_allocation.amount | money }})
                            </span>
                            </span>
                        </p>
                    {% endif %}
                {% endfor %}
            {% endif %}
        {% endif %}
    </td>

    {% if line_item_group.deliverable? %}
    <td class="order-list__price-cell">
        {% if component.original_line_price != component.final_line_price %}
            <del class="order-list__item-original-price">{{ component.original_line_price | money }}</del>
        {% endif %}
        <p class="order-list__item-price">
        {% if component.final_line_price > 0 %}
            {{ component.final_line_price | money }}
        {% else %}
            無料
        {% endif %}
        </p>
    </td>
    {% endif %}
</tr>

              </table>
            </td>
          </tr>
        {% endfor %}
      </td>
    {% endif %}
  </td>
</tr>

  {% endfor %}
</table>

            {% endif %}
            <table class="row subtotal-lines">
  <tr>
    <td class="subtotal-spacer"></td>
    <td>
      <table class="row subtotal-table">

        
{% assign total_order_discount_amount = 0 %}
{% assign has_shipping_discount = false %}
{% assign epsilon = 0.00001 %}

{% for discount_application in discount_applications %}
  {% if discount_application.target_selection == 'all' and discount_application.target_type == 'line_item' %}
    {% assign order_discount_count = order_discount_count | plus: 1 %}
    {% assign total_order_discount_amount = total_order_discount_amount | plus: discount_application.total_allocated_amount %}
  {% endif %}
  {% if discount_application.target_type == 'shipping_line' %}
    {% assign has_shipping_discount = true %}
    {% assign shipping_discount_title = discount_application.title %}
    {% assign discount_value_price = discount_application.total_allocated_amount %}
    {% assign shipping_amount_minus_discount_value_price = shipping_price | minus: discount_value_price %}
    {% assign shipping_amount_minus_discount_value_price_abs = shipping_amount_minus_discount_value_price | abs %}
    {% assign discount_application_value_type = discount_application.value_type | strip %}
    {% if shipping_amount_minus_discount_value_price_abs < epsilon or discount_application_value_type == 'percentage' and discount_application.value == 100 %}
      {% assign free_shipping = true %}
    {% else %}
      {% assign discounted_shipping_price = shipping_amount_minus_discount_value_price %}
    {% endif %}
  {% endif %}
{% endfor %}


  
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>小計</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{{ subtotal_price | plus: total_order_discount_amount | money }}</strong>
  </td>
</tr>



{% if order_discount_count > 0 %}
  {% if order_discount_count == 1 %}
    
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>注文のディスカウント</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>-{{ total_order_discount_amount | money }}</strong>
  </td>
</tr>

  {% endif %}
  {% if order_discount_count > 1 %}
    
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>注文のディスカウント</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>-{{ total_order_discount_amount | money }}</strong>
  </td>
</tr>

  {% endif %}
  {% for discount_application in discount_applications %}
    {% if discount_application.target_selection == 'all' and discount_application.target_type != 'shipping_line' %}
      <tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span class="subtotal-line__discount">
        <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
        <span class="subtotal-line__discount-title">
            {{ discount_application.title }} (-{{ discount_application.total_allocated_amount | money }})
        </span>
      </span>
    </p>
  </td>
</tr>

    {% endif %}
  {% endfor %}
{% endif %}


        {% unless retail_delivery_only %}
          {% assign shipping_type_total = 0 %}
          {% assign shipping_type_original_total = 0 %}
          {% for method in shipping_methods %}
            {% assign shipping_type_total = shipping_type_total | plus: method.price_with_discounts %}
            {% assign shipping_type_original_total = shipping_type_original_total | plus: method.original_price %}
          {% endfor %}
          {% assign pickup_type_total = 0 %}
          {% for method in pickup_methods %}
            {% assign pickup_type_total = pickup_type_total | plus: method.price_with_discounts %}
          {% endfor %}
          {% assign render_fallback_delivery_subtotal = false %}
          {% if shipping_methods.size == 0 and pickup_methods.size == 0 %}
            {% assign render_fallback_delivery_subtotal = true %}
          {% endif %}
          {% if delivery_method_for_subtotal == 'pick-up' and pickup_methods.size == 0 %}
            {% assign render_fallback_delivery_subtotal = true %}
          {% endif %}
          {% if shipping_methods.size > 0 and render_fallback_delivery_subtotal != true %}
            {% if has_shipping_discount %}
              {% if free_shipping == true or shipping_type_total == 0 %}
                
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>配送</span>
    </p>
  </td>
  <td class="subtotal-line__value">
    <del>{% if shipping_type_original_total != 0 %}{{ shipping_type_original_total | money }}{% endif %} </del>
      <strong>無料</strong>
  </td>
</tr>

              {% else %}
                
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>配送</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{{ shipping_type_total | money }}</strong>
  </td>
</tr>

              {% endif %}
              <tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span class="subtotal-line__discount">
        <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
        <span class="subtotal-line__discount-title">
            {{ shipping_discount_title }} 
            {% if discount_value_price != 0 %}
              (-{{ discount_value_price | money }})
            {% endif %}
        </span>
      </span>
    </p>
  </td>
</tr>

            {% else %}
              
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>配送</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{{ shipping_type_total | money }}</strong>
  </td>
</tr>

            {% endif %}
          {% endif %}
          {% if pickup_methods.size > 0 %}
            
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>受取</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{{ pickup_type_total | money }}</strong>
  </td>
</tr>

            {% if has_shipping_discount and shipping_methods.size == 0 %}
              <tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span class="subtotal-line__discount">
        <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
        <span class="subtotal-line__discount-title">
            {{ shipping_discount_title }} 
            {% if discount_value_price != 0 %}
              (-{{ discount_value_price | money }})
            {% endif %}
        </span>
      </span>
    </p>
  </td>
</tr>

            {% endif %}
          {% endif %}
          {% if render_fallback_delivery_subtotal %}
            {%- capture fallback_delivery_title -%}
              {%- if delivery_method_for_subtotal == 'pick-up' -%}
                受取
              {%- else -%}
                配送
              {%- endif -%}
            {%- endcapture -%}
            {% if has_shipping_discount %}
              {% if free_shipping == true or shipping_price == 0 %}
                
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>{{ fallback_delivery_title }}</span>
    </p>
  </td>
  <td class="subtotal-line__value">
    <del>{% if shipping_price != 0 %}{{ shipping_price | money }}{% endif %} </del>
      <strong>無料</strong>
  </td>
</tr>

              {% else %}
                
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>{{ fallback_delivery_title }}</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{{ discounted_shipping_price | money }}</strong>
  </td>
</tr>

              {% endif %}
              <tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span class="subtotal-line__discount">
        <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
        <span class="subtotal-line__discount-title">
            {{ shipping_discount_title }} 
            {% if discount_value_price != 0 %}
              (-{{ discount_value_price | money }})
            {% endif %}
        </span>
      </span>
    </p>
  </td>
</tr>

            {% else %}
              
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>{{ fallback_delivery_title }}</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{{ shipping_price | money }}</strong>
  </td>
</tr>

            {% endif %}
          {% endif %}
        {% endunless %}

        {% if total_duties %}
          
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>関税</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{{ total_duties | money }}</strong>
  </td>
</tr>

        {% endif %}

        
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>税金合計</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{{ tax_price | money }}</strong>
  </td>
</tr>


        {% if total_tip and total_tip > 0 %}
          
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>Tip</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{{ total_tip | money }}</strong>
  </td>
</tr>

        {% endif %}
      </table>

      {% assign transaction_size = 0 %}
      {% assign transaction_amount = 0 %}
      {% assign net_transaction_amount_rounding = 0 %}
      {% assign authorized_amount = 0 %}
      {% assign has_refunds = false %}
      {% assign shopify_pay_captured = false %}
      {% assign shop_cash_offers_captured = false %}
      {% for transaction in transactions %}
        {% if transaction.kind == "sale" or transaction.kind == "capture" %}
          {% if transaction.status == "success" %}
            {% if transaction.payment_details.credit_card_company %}
              {% assign shopify_pay_captured = true %}
            {% endif %}
            {% if transaction.gateway == "shop_cash" or transaction.gateway == "shop_offer" %}
              {% assign shop_cash_offers_captured = true %}
            {% endif %}
            {% assign transaction_size = transaction_size | plus: 1 %}
            {% assign transaction_amount = transaction_amount | plus: transaction.amount %}
            {% if transaction.amount_rounding != nil %}
              {% assign net_transaction_amount_rounding = net_transaction_amount_rounding | plus: transaction.amount_rounding %}
            {% endif %}
          {% endif %}
        {% elsif transaction.kind == "authorization" %}
          {% if transaction.status == "success" %}
            {% assign authorized_amount = authorized_amount | plus: transaction.amount %}
          {% endif %}
        {% elsif transaction.kind == "refund" or transaction.kind == "change" %}
          {% if transaction.status == "success" or transaction.status == "pending" %}
            {% assign transaction_size = transaction_size | plus: 1 %}
            {% assign transaction_amount = transaction_amount | minus: transaction.amount %}
            {% assign has_refunds = true %}
            {% if transaction.amount_rounding != nil %}
              {% assign net_transaction_amount_rounding = net_transaction_amount_rounding | minus: transaction.amount_rounding %}
            {% endif %}
          {% endif %}
        {% endif %}
      {% endfor %}

      {% # Add shop cash/offer transactions to totals if shopify pay is captured and shop cash/offer is not captured yet %}
      {% if shopify_pay_captured == true and shop_cash_offers_captured == false %}
        {% for transaction in transactions %}
        {% if transaction.status == "success" %}
          {% if transaction.kind == "authorization" and transaction.gateway == "shop_cash" or transaction.gateway == "shop_offer" %}
              {% assign transaction_size = transaction_size | plus: 1 %}
              {% assign transaction_amount = transaction_amount | plus: transaction.amount %}
              {% if transaction.amount_rounding != nil %}
                {% assign net_transaction_amount_rounding = net_transaction_amount_rounding | plus: transaction.amount_rounding %}
              {% endif %}
          {% endif %}
        {% endif %}
      {% endfor %}
      {% endif %}
      <table class="row subtotal-table subtotal-table--total">
      {% if payment_terms and payment_terms.automatic_capture_at_fulfillment == false or b2b? %}
        {% assign next_payment = payment_terms.next_payment %}
        {% assign due_at_date = next_payment.due_at | date: "%b %d, %Y" %}
        {% if net_transaction_amount_rounding != 0 %}
          
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>合計</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{{ total_price | money_with_currency }}</strong>
  </td>
</tr>

          {% if total_discounts > 0 %}
            <tr class="subtotal-line">
              <td></td>
              <td class="subtotal-line__value total-discount">
                  割引 <span class="total-discount--amount">{{ total_discounts | money }}</span>
              </td>
            </tr>
          {% endif %}
          <tr><td colspan="2" class="subtotal-table__line"></td></tr>
          <div class="subtotal-line__value-small">
            
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>キャッシュの端数処理</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{% if net_transaction_amount_rounding < 0 %}-{% endif %} {{ net_transaction_amount_rounding | abs | money }}</strong>
  </td>
</tr>

          </div>
          <tr><td colspan="2" class="subtotal-table__line"></td></tr>
        {% endif %}
        
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>支払合計 (本日)</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{{ transaction_amount | plus: net_transaction_amount_rounding | money_with_currency }}</strong>
  </td>
</tr>

        <div class="payment-terms">
          {% assign next_amount_due = total_price %}
          {% if next_payment %}
            {% assign next_amount_due = next_payment.amount_due %}
          {% elsif total_outstanding > 0 %}
            {% assign next_amount_due = total_outstanding %}
          {% endif %}

          {% if payment_terms.type == 'receipt' %}
            
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>受領時の支払合計</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{{ next_amount_due | money_with_currency }}</strong>
  </td>
</tr>

          {% elsif payment_terms.type == 'fulfillment' %}
            
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>フルフィルメント時の支払合計</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{{ next_amount_due | money_with_currency }}</strong>
  </td>
</tr>

          {% else %}
            
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>支払合計期限: {{ due_at_date }}</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{{ next_amount_due | money_with_currency }}</strong>
  </td>
</tr>

          {% endif %}
        </div>
        {% if total_discounts > 0 and net_transaction_amount_rounding == 0 %}
          <tr class="subtotal-line">
            <td></td>
            <td class="subtotal-line__value total-discount">
                割引 <span class="total-discount--amount">{{ total_discounts | money }}</span>
            </td>
          </tr>
        {% endif %}
      {% else %}
        
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>合計</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{{ total_price | money_with_currency }}</strong>
  </td>
</tr>

        {% if total_discounts > 0 %}
          <tr class="subtotal-line">
            <td></td>
            <td class="subtotal-line__value total-discount">
                割引 <span class="total-discount--amount">{{ total_discounts | money }}</span>
            </td>
          </tr>
        {% endif %}
        {% if net_transaction_amount_rounding != 0 %}
          <tr><td colspan="2" class="subtotal-table__line"></td></tr>
          <div class="subtotal-line__value-small">
            
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>キャッシュの端数処理</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{% if net_transaction_amount_rounding < 0 %}-{% endif %} {{ net_transaction_amount_rounding | abs | money }}</strong>
  </td>
</tr>

          </div>
          {% if financial_status == 'paid' %}
            
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>支払い済み</span>
        <br>
        <small>{{ order.transactions | map: 'gateway_display_name' | uniq | join: ', ' }}</small>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{{ transaction_amount | plus: net_transaction_amount_rounding | money_with_currency }}</strong>
  </td>
</tr>

          {% endif %}
        {% endif %}
        {% if transaction_amount != total_price and payment_terms == nil%}
          {% if transaction_amount == 0 and authorized_amount > 0 and has_refunds == false %}
          {% else %}
            <div class="payment-terms">
              
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>支払合計 (本日)</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{{ transaction_amount | plus: net_transaction_amount_rounding | money_with_currency }}</strong>
  </td>
</tr>

            </div>
          {% endif %}
        {% endif %}
      {% endif %}
      </table>

      {% unless payment_terms %}
      {% if transaction_size > 1 or transaction_amount < total_price %}
        <table class="row subtotal-table">
          <tr><td colspan="2" class="subtotal-table__line"></td></tr>
          <tr><td colspan="2" class="subtotal-table__small-space"></td></tr>

          {% for transaction in transactions %}
            {% assign amount_rounding = 0 %}
            {% if transaction.amount_rounding != 0 %}
              {% assign amount_rounding =  transaction.amount_rounding %}
            {% endif %}
            {% if transaction.status == "success" and transaction.kind == "capture" or transaction.kind == "sale" %}
              {% if transaction.payment_details.gift_card_last_four_digits %}
                {% capture transaction_name %}ギフトカード (下4桁が{{ transaction.payment_details.gift_card_last_four_digits }}){% endcapture %}
              {% elsif transaction.payment_details.local_payment? %}
                {% capture transaction_name %}{{ transaction.payment_details.payment_method_display_name | default: transaction.payment_details.payment_method_name }}{% endcapture %}
              {% elsif transaction.payment_details.credit_card_company %}
                {% capture transaction_name %}{{ transaction.payment_details.credit_card_company }} (カード番号下4桁: {{ transaction.payment_details.credit_card_last_four_digits }}){% endcapture %}
              {% else %}
                {% capture transaction_name %}{{ transaction.gateway_display_name }}{% endcapture %}
              {% endif %}

              
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>{{transaction_name}}</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{{ transaction.amount | plus: amount_rounding | money }}</strong>
  </td>
</tr>

            {% elsif shopify_pay_captured and shop_cash_offers_captured == false and transaction.kind == "authorization" and transaction.gateway == "shop_cash" or transaction.gateway == "shop_offer" %}
              {% capture transaction_name %}{{ transaction.gateway_display_name }}{% endcapture %}

              
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>{{transaction_name}}</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{{ transaction.amount | plus: amount_rounding | money }}</strong>
  </td>
</tr>

            {% endif %}
            {% if transaction.kind == 'refund' and transaction.gateway != "shop_offer" %}
              {% if transaction.payment_details.gift_card_last_four_digits %}
                {% capture refund_method_subtitle %}{{ transaction.payment_details.type | replace: '_', ' ' | capitalize }}{% endcapture %}
              {% elsif transaction.payment_details.local_payment? %}
                {% capture refund_method_subtitle %}{{ transaction.payment_details.payment_method_display_name | default: transaction.payment_details.payment_method_name }}{% endcapture %}
              {% elsif transaction.payment_details.credit_card_company %}
                {% capture refund_method_subtitle %}{{ transaction.payment_details.credit_card_company | replace: '_', ' ' | capitalize }}{% endcapture %}
              {% else %}
                {% capture refund_method_subtitle %}{{ transaction.gateway_display_name | replace: '_', ' ' | capitalize }}{% endcapture %}
              {% endif %}

              {% if transaction.gateway == 'shopify_store_credit' %}
                {% assign link_url = routes.account_profile_url %}
                {% capture link_text %}表示する{% endcapture %}
              {% else %}
                {% assign link_url = nil %}
                {% assign link_text = nil %}
              {% endif %}

              
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>返金</span>
        <br>
        <small>{{ refund_method_subtitle }}</small>
          &nbsp;&nbsp;<a href="{{ link_url }}" class="small">{{ link_text }}</a>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{{ transaction.amount | plus: amount_rounding | times: -1 | money }}</strong>
  </td>
</tr>

            {% endif %}
          {% endfor %}
        </table>
      {% endif %}


      {% endunless %}
    </td>
  </tr>
</table>

            {% assign shopped_currency = original_presentment_currency | default: currency %}
            {% comment %} Skip the CNY note when the buyer already shops and is charged in CNY, since it would just repeat CNY. {% endcomment %}
            {% unless shopped_currency == "CNY" and currency == "CNY" %}
              {% case wallet_brand %}
              {% when "wechat_pay" %}
                <p>WeChat で CNY の合計を確認</p>
              {% when "alipay" %}
                <p>Alipay で CNY の合計を確認</p>
              {% endcase %}
            {% endunless %}

            </td>
          </tr>
        </table>
      </center>
    </td>
  </tr>
</table>

          <table class="row section">
  <tr>
    <td class="section__cell">
      <center>
        <table class="container">
          <tr>
            <td>
              <h3>お客様情報</h3>
            </td>
          </tr>
        </table>
        <table class="container">
          <tr>
            <td>
              
            <table class="row">
              <tr>
                {% if requires_shipping and shipping_address %}
                  <td class="customer-info__item">
                    <h4>配送先住所</h4>
                    {{ shipping_address | format_address }}
                  </td>
                {% endif %}
                {% if billing_address %}
                  <td class="customer-info__item">
                    <h4>請求先住所</h4>
                    {{ billing_address | format_address }}
                  </td>
                {% endif %}
              </tr>
            </table>
            <table class="row">
              <tr>
                {% if company_location %}
                  <td class="customer-info__item">
                    <h4>ロケーション</h4>
                    <p>
                      {{ company_location.name }}
                    </p>
                  </td>
                {% endif %}
                {% capture payment_section_body %}
  {% if payment_terms and payment_terms.automatic_capture_at_fulfillment == false %}
    {% assign due_date = payment_terms.next_payment.due_at | default: nil %}
    {% if payment_terms.type == 'receipt' or payment_terms.type == 'fulfillment' and payment_terms.next_payment.due_at == nil %}
      {{ payment_terms.translated_name }}<br>
    {% else %}
      {{ payment_terms.translated_name }}:{{ due_date | date: format: 'date' }}が期限<br>
    {% endif %}
  {% endif %}
  {% if transactions.size > 0 %}
    {% for transaction in transactions %}
      {% if transaction.status == "success" or transaction.status == "pending" %}
        {% if transaction.kind == "capture" or transaction.kind == "sale" %}
          {% if transaction.payment_details.gift_card_last_four_digits %}
            <img src="{{ transaction.payment_details.payment_icon_source | payment_type_img_url }}" class="customer-info__item-credit" height="24">
            下4桁{{ transaction.payment_details.gift_card_last_four_digits }}<br>
          {% elsif transaction.payment_details.type == "shop_pay_installments" and transaction.payment_details.credit_card_company == "unknown" %}
            <img src="{{ 'notifications/shop-pay.svg' | shopify_asset_url  }}" class="customer-info__item-shop-pay">
            <br>
            <span>Shop Payの分割払いで支払い済み</span><br>
          {% elsif transaction.payment_details.type == "card" %}
            <img src="{{ transaction.payment_details.credit_card_company | payment_icon_png_url  }}" class="customer-info__item-credit" height="24" alt="{{ transaction.payment_details.credit_card_company }}">
            <span>下4桁{{ transaction.payment_details.credit_card_last_four_digits }}</span><br>
            {% if transaction.first_installment_amount %}
              <span>{{ transaction.installment_count }} か月間、月額 {{ transaction.first_installment_amount | money }}</span><br>
            {% endif %}
          {% elsif transaction.gateway_display_name == "Gift card" %}
            <img src="{{ transaction.gateway_icon_source | payment_type_img_url }}" class="customer-info__item-credit" height="24">
            下4桁{{ transaction.payment_details.gift_card.last_four_characters | upcase }}<br>
              &emsp;&emsp;&emsp;&nbsp;ギフトカード残高 - <b>{{ transaction.payment_details.gift_card.balance |  money }}</b>
          {% elsif transaction.payment_details.local_payment? %}
            <img src="{{ transaction.payment_details.payment_icon_source | payment_type_img_url }}" class="customer-info__item-credit" height="24">
            <span>{{ transaction.payment_details.payment_method_display_name }}</span><br>
          {% elsif transaction.gateway_display_name != "Shop Cash" and transaction.gateway != "shop_offer" %}
            {{ transaction.gateway_display_name }}<br>
          {% endif %}
        {% elsif transaction.kind == "authorization" and transaction.gateway_display_name == "Shop Cash" %}
          <span>Shop Cash</span><br>
        {% endif %}
      {% endif %}
    {% endfor %}
  {% endif %}
{% endcapture %}

{% assign show_payment_section = false %}
{% if b2b? %}{% assign show_payment_section = true %}{% endif %}

{% assign payment_section_body_stripped = payment_section_body | strip %}
{% if payment_section_body_stripped != "" %}{% assign show_payment_section = true %}{% endif %}

{% if show_payment_section %}
  <td class="customer-info__item">
    <h4>決済</h4>
    <p class="customer-info__item-content">
      {{ payment_section_body }}
    </p>
  </td>
{% endif %}

              </tr>
              <tr>
                {% if requires_shipping and shipping_address %}
                  {% if shipping_methods.size > 0 %}
                    <td class="customer-info__item">
                      <h4>配送方法</h4>
                      {%- assign unique_shipping_titles = shipping_methods | map: 'title' | uniq -%}
                      <p>
                        {%- if unique_shipping_titles.size == 1 and delivery_promise_branded_shipping_line -%}
                          {{ delivery_promise_branded_shipping_line }}
                        {%- else -%}
                          {%- for shipping_title in unique_shipping_titles -%}
                            {{ shipping_title }}{% unless forloop.last %}<br>{% endunless %}
                          {%- endfor -%}
                        {%- endif -%}
                      </p>
                    </td>
                  {% elsif shipping_method %}
                    <td class="customer-info__item">
                      <h4>配送方法</h4>
                      <p>
                        {% if delivery_promise_branded_shipping_line %}
                          {{ delivery_promise_branded_shipping_line }}
                        {% else %}
                          {{ shipping_method.title }}
                        {% endif %}
                      </p>
                    </td>
                  {% endif %}
                {% endif %}
              </tr>
            </table>

            </td>
          </tr>
        </table>
      </center>
    </td>
  </tr>
</table>

          <table class="row footer">
  <tr>
    <td class="footer__cell">
      <center>
        <table class="container">
          <tr>
            <td>
              
              <p class="disclaimer__subtext">ご不明な点がございましたら、このメールにご返信いただくか、<a href="mailto:{{ shop.email }}">{{ shop.email }}</a> までお問い合わせください。<!-- shopify-shop-marketplace-footer --></p>
            </td>
          </tr>
        </table>
      </center>
    </td>
  </tr>
</table>

<img src="{{ 'notifications/spacer.png' | shopify_asset_url }}" class="spacer" height="1" />

        </td>
      </tr>
    </table>
  </body>
</html>

{%- if billing_address.country_code == 'DE' or billing_address.country_code == 'DK' -%}
  {%- if shop.terms_of_service.body != blank -%}
    {{ shop.terms_of_service | attach_as_pdf: "利用規約" }}
  {%- endif -%}

  {%- if shop.refund_policy.body != blank -%}
    {{ shop.refund_policy | attach_as_pdf: "返金ポリシー" }}
  {%- endif -%}
{%- endif -%}

■2. 商品タグを設定する(パターン3・4のみ)

Shopify管理画面 > 商品管理 > 対象の商品 > タグ 欄に amp-ticket を追加します。

チケットとして販売しているすべての商品に付けてください。タグが付いた商品を含まない注文では、メールにボタンは表示されません。

💡タグはストア側で付けていただく必要があります。新しいチケット商品を追加した際に付け忘れると、その商品のみの注文ではボタンが表示されませんのでご注意ください。

■3. コードを貼り付ける

Shopify管理画面 > 設定 > 通知 > お客様への通知 > 注文の確認 > コードを編集 を開き、選んだコードを貼り付けます。

Shopify管理画面の「注文の確認」通知と「コードを編集」ボタン

スニペットのみ(パターン1・3)の場合は、ボタンを表示したい位置に貼り付けてください。メール全体コード(パターン2・4)の場合は、テンプレート全体を置き換えてください。

■4. カスタマイズする

コードを編集すると、次の内容を変更できます。

・ボタンの文言(初期値:チケットを表示する)… ticket_button_label の値を変更します。

・ボタンの色(初期値:メール内の他のボタンと同色。Shopifyの通知メール設定に連動します)… <td class="button__cell"> を <td class="button__cell" bgcolor="#RRGGBB" style="background-color: #RRGGBB;"> に書き換えます。

・文字の色(初期値:メール内の他のボタンと同色)… <td class="button__cell"> に続く <a> タグに style="color: #RRGGBB;" を追加します。

・対象のタグ(パターン3・4のみ。初期値:amp-ticket)… ticket_tag の値を変更します。商品側に付けたタグと一致させてください。

■ご注意点

CSSが読み込まれない環境では、ボタンの見た目にならない場合がございます。その場合は通常のテキストリンクとして表示され、機能します。

💡実際の運用を始める前に、必ずテスト注文などで想定どおりの動きになるかご確認ください。

■チケット画面へのリンクを他の場所で使う

注文確認メール以外でも、チケット画面へ遷移するリンクをご利用いただけます。

・Shopifyのテンプレート内で使う場合(通知メールのテンプレート、テーマファイルなど)

 {{ shop.url }}?open-tickets=1 の形式をそのままお使いください。

・Shopifyのテンプレート以外で使う場合(Webサイト、SNS、Shopify以外のメールなど)

 https://ストアのドメイン/?open-tickets=1 の形式で、ストアのURLを直接記載してください。

 例:ストアのURLが https://sample-store.myshopify.com の場合は https://sample-store.myshopify.com/?open-tickets=1 になります。

💡どちらの場合も、テーマでアプリ埋め込みが有効になっている必要があります。

■関連記事

アプリ設定完了後のストアフロントにおける動き

初めての方はこちら

カテゴリーで調べる

読み込み中...