Refund notification issue {% for line in subtotal_line_items %}

Refund notification issue {% for line in subtotal_line_items %}

KimiSi
Shopify Partner
5 0 0

I have issue with the order refund notification emails. We hired a freelancer to custom made the notification templates for us. Notification should show all the refunded products but now it shows all the product which weren't refunded. I think that issue is with the "for" line, if I'm right the "subtotal_line_items " returns all the products which are included to the subtotal aka products which were not refunded. 

I tried to apply {% for line_item in return.line_items %} here but I can't get it to work. Any ideas?

 

 <table width="90%" align="center" bgcolor="#ffffff" cellpadding="0" cellspacing="0">
                                        <tr>
                                          <td width="100%" align="left" style="padding-top: 20px; padding-bottom: 0px;"><h2>Item description</h2></td>
                                        </tr>
                                            {% for line in subtotal_line_items %}{% if line.quantity < line.quantity %}
                                            {% capture line_display %} {{ line.quantity }} of {{ line.quantity }} {% endcapture %}
                                            {% else %}{% assign line_display = line.quantity  %}{% endif %}
                                            <tr>
                                                <td width="100%" style="padding-top: 20px; padding-bottom: 20px;">
                                                    <table width="100%" align="center" bgcolor="#ffffff" cellpadding="0" cellspacing="0">
                                                        <tr>
                                                            {% if line.image %}
                                                            <td width="25%"><img src="{{ line | img_url: '120x' }}" style="width: 100%; max-width: 100%;"></td>
                                                            {% endif %}
                                                            <td width="75%" style="padding-left: 5%;">
                                                                <h4>{{ line.title }}</h4>
    
                                                                <h5>{% if line.final_line_price > 0 %}{{ line.final_line_price | money }}{% else %} Free{% endif %}
                                                                    {% if line.original_line_price != line.final_line_price %}
                                                                    <span><del style="font-weight: 500;">{{ line.original_line_price | money }}</del></span>
                                                                    {% endif %}
                                                                </h5>
                                                                {% if line.variant.title != 'Default Title' %}
                                                                  <h5>{{ line.variant.title }}</h5>
                                                                {% 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" style="display: flex; align-items: center;">
                                                                        <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
                                                                        <span style="font-family: 'Nunito', sans-serif; color: #2F2F2F; font-size: 12px; margin-left: 6px;">
                                                                          {{ discount_allocation.discount_application.title | upcase }}
                                                                          (-{{ discount_allocation.amount | money }})
                                                                        </span>
                                                                      </span>
                                                                    {% endif %}
                                                                  {% endfor %}
                                                                {% endif %}

                                                                <p style="font-size: 13px">Qty: {{ line_display }}</p>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </td>
                                            </tr>
                                            {% endfor %}
                                        </table>

 

Replies 0 (0)