My apologies as this may not be the correct forum location to post.
I’ve added the following code to include tracking information on the order History page. However, It is displaying the results for each item ordered. What should I change or add so that the results only display once?
{% for line_item in order.line_items %}
{% if line_item.fulfillment.tracking_numbers.size > 0 %}
{% if line_item.fulfillment.tracking_numbers.size == 1 and line_item.fulfillment.tracking_company and line_item.fulfillment.tracking_url %}
Your order has been shipped with {{ line_item.fulfillment.tracking_company }}!
Click below for shipping updates.
{{ line_item.fulfillment.tracking_numbers.first }}
{% elsif line_item.fulfillment.tracking_numbers.size == 1 %}
Tracking number: {{ line_item.fulfillment.tracking_numbers.first }}
{% else %}
Your order has been shipped with {{ line_item.fulfillment.tracking_company }}!
Click below for shipping updates.
{% for tracking_number in line_item.fulfillment.tracking_numbers %}
{% if line_item.fulfillment.tracking_urls[forloop.index0] %}
{{ tracking_number }}
{% else %}
{{ tracking_number }}
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
{% endfor %}
Here’s how it currently displays:
