POS exchange V2 receipt

Sent to the customer by Shopify, when they complete an exchange V2 in person and want to be emailed a receipt.

ايصال الإستبدال من {{ shop.name }}
{% capture email_title %}تم استبدال المنتجات{% endcapture %}

<!DOCTYPE html>
<html lang="ar">
  <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>
    /*
     * Arabic Shopify Notifications - By Enfitah - www.enfitah.com
     */
    
    body {
        direction: rtl
    }
    
    .container {
        text-align: right;
    }
    
    .actions {
        margin-top: 20px
    }
    
    .main-action-cell {
        float: right;
        margin-left: 15px;
        margin-right: unset
    }
    
    @media (max-width: 600px) {
        .main-action-cell {
            margin-left: 0 !important;
            margin-right: unset !important;
        }
    }
    
    .text-icon {
        padding-left: 8px;
        padding-right: unset
    }
    
    .order-number__cell {
        text-align: left;
    }
    
    @media (max-width: 600px) {
        .order-number__cell {
            text-align: right !important;
        }
    }
    
    .or {
        margin-left: 10px;
        margin-right: unset;
    }
    
    @media (max-width: 600px) {
        .or {
            margin-left: 0 !important;
            margin-right: unset !important;
        }
    }
    
    .customer-info__item-credit {
        margin-left: 10px;
        margin-right: unset;
    }
    
    .order-list__product-image {
        margin-left: 15px;
        margin-right: unset;
    }
    
    .order-list__item-original-price {
        text-align: left;
    }
    
    .order-list__item-price {
        text-align: left;
        margin-right: 15px;
        margin-left: unset;
    }
    
    .subtotal-line__value {
        text-align: left
    }
        .button__cell { background: {{ 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>
            {% 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 %}


            </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">
  {% for line in return_line_items %}
  <tr class="order-list__item">
    <td class="order-list__item__cell">
      <table>
        <td>
          {% if line.image %}
            <img src="{{ line | img_url: 'compact_cropped' }}" align="right" width="60" height="60" class="order-list__product-image"/>
          {% endif %}
        </td>
        <td class="order-list__product-description-cell">
          {% if line.product.title %}
            {% assign line_title = line.product.title %}
          {% else %}
            {% assign line_title = line.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' %}
            <span class="order-list__item-variant">{{ line.variant.title }}</span><br/>
          {% endif %}

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

          {% if true %}
            <span class="order-list__item-refunded">تم الإرجاع</span>
          {% elsif false %}
            <span class="order-list__item-added">تمت الإضافة</span>
          {% endif %}

          {% if line.discount_allocations %}
            {% for discount_allocation in line.discount_allocations %}
              {% if discount_allocation.discount_application.target_selection != 'all' %}
                <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>
              {% endif %}
            {% endfor %}
          {% endif %}
        </td>
          <td class="order-list__price-cell">
            {% if line.original_line_price != line.final_line_price %}
              <del class="order-list__item-original-price">
                {% if true %}-{% endif %}
                {{ line.original_line_price | money }}
              </del>
            {% endif %}
            <p class="order-list__item-price">
              {% if line.final_line_price != 0 %}
                {% if true %}
                  -{{ line.final_line_price | abs | money }}
                {% else %}
                  {{ line.final_line_price | money }}
                {% endif %}
              {% else %}
                مجاناً
              {% endif %}
            </p>
          </td>
      </table>
    </td>
  </tr>{% endfor %}
</table>

            {% assign subtotal = return_subtotal %}
{% assign tax_total = return_tax_total %}
{% assign total = return_total %}

<table class="row subtotal-lines" style="border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #e5e5e5">
  <tr>
    <td class="subtotal-spacer"></td>
    <td style="padding-bottom: 40px">
      <table class="row subtotal-table">
        
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>المجموع الفرعي</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>-{{ subtotal | abs | money_with_currency }}</strong>
  </td>
</tr>

        
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>الضرائب</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>-{{ tax_total | abs | money_with_currency }}</strong>
  </td>
</tr>

      </table>
      <table class="row subtotal-table subtotal-table--total">
        
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>إجمالي المنتجات المرجعة</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>-{{ total | abs | money_with_currency }}</strong>
  </td>
</tr>

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


            </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">
  {% for line in added_line_items %}
  <tr class="order-list__item">
    <td class="order-list__item__cell">
      <table>
        <td>
          {% if line.image %}
            <img src="{{ line | img_url: 'compact_cropped' }}" align="right" width="60" height="60" class="order-list__product-image"/>
          {% endif %}
        </td>
        <td class="order-list__product-description-cell">
          {% if line.product.title %}
            {% assign line_title = line.product.title %}
          {% else %}
            {% assign line_title = line.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' %}
            <span class="order-list__item-variant">{{ line.variant.title }}</span><br/>
          {% endif %}

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

          {% if false %}
            <span class="order-list__item-refunded">تم الإرجاع</span>
          {% elsif true %}
            <span class="order-list__item-added">تمت الإضافة</span>
          {% endif %}

          {% if line.discount_allocations %}
            {% for discount_allocation in line.discount_allocations %}
              {% if discount_allocation.discount_application.target_selection != 'all' %}
                <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>
              {% endif %}
            {% endfor %}
          {% endif %}
        </td>
          <td class="order-list__price-cell">
            {% if line.original_line_price != line.final_line_price %}
              <del class="order-list__item-original-price">
                {% if false %}-{% endif %}
                {{ line.original_line_price | money }}
              </del>
            {% endif %}
            <p class="order-list__item-price">
              {% if line.final_line_price != 0 %}
                {% if false %}
                  -{{ line.final_line_price | abs | money }}
                {% else %}
                  {{ line.final_line_price | money }}
                {% endif %}
              {% else %}
                مجاناً
              {% endif %}
            </p>
          </td>
      </table>
    </td>
  </tr>{% endfor %}
</table>

            {% assign subtotal = added_subtotal %}
{% assign tax_total = added_tax_total %}
{% assign total = added_total %}

<table class="row subtotal-lines" style="border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #e5e5e5">
  <tr>
    <td class="subtotal-spacer"></td>
    <td style="padding-bottom: 40px">
      <table class="row subtotal-table">
        
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>المجموع الفرعي</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{{ subtotal | money_with_currency }}</strong>
  </td>
</tr>

        
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>الضرائب</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{{ tax_total| money_with_currency }}</strong>
  </td>
</tr>

      </table>
      <table class="row subtotal-table subtotal-table--total">
        
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span>إجمالي المنتجات الجديدة</span>
    </p>
  </td>
  <td class="subtotal-line__value">
      <strong>{{ total | money_with_currency }}</strong>
  </td>
</tr>

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


            </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>
              
            <tr>
              <td>
                <p>
                  <span style="font-size: 24px;">إجمالي الاستبدال</span>
                </p>
              </td>
              <td align="left">
                <strong style="font-size: 24px;">{{ exchange_total | money_with_currency }}</strong>
              </td>
            </tr>

            </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>
              
            {% assign transaction_count = transactions | size %}
<h4>
  {% if exchange_type == "net_refundable" %}
    طريقة الاسترداد
  {% else %}
    الدفع
  {% endif %}
</h4>
{% if transaction_count > 0 %}
{% for transaction in transactions %}
{% if transaction.status == "success" or transaction.status == "pending" %}
  {% if transaction.payment_details.credit_card_company %}
      <p class="customer-info__item-content">
        <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>تنتهي بـ {{ transaction.payment_details.credit_card_last_four_digits }} &mdash; <strong>{{ transaction.amount | money }}</strong></span>
      </p>
  {% elsif transaction.gateway_display_name == "Gift card" %}
    <p class="customer-info__item-content">
      <img src="{{ transaction.gateway_display_name | downcase | replace: ' ', '-'  | payment_type_img_url }}" class="customer-info__item-credit" height="24">
    تنتهي بـ {{ transaction.payment_details.gift_card.last_four_characters | upcase }} &mdash; <strong>{{ transaction.amount | money }}</strong> <br />
      &emsp;&emsp;&emsp;&nbsp;رصيد بطاقة الهدايا: {{ transaction.payment_details.gift_card.balance |  money }}
    </p>
  {% else %}
    <p class="customer-info__item-content">
      {{ transaction.gateway_display_name }} &mdash; <strong>{{ transaction.amount | money }}</strong>
    </p>
  {% endif %}
{% endif %}
{% endfor %}
{% else %}
<p>
<span>لا يوجد دفع أو استرداد لهذا الاستبدال<span>
</p>
{% endif %}

        </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></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>

Last updated