I want to add tracking number on order page only once

{%- for line_item in order.line_items -%}
{%- if line_item.fulfillment -%}

{{ line_item.fulfillment.tracking_number }}
{%- endif -%} {%- endfor -%}

I tried this code and it worked. but the problem is, when there are multiple items in one order, the tracking number appears same multiple times because of {for} tag. like image below

How can I edit to show only once?

Hi @loolakoola

To add a tracking number on the order page just once, you can try these steps:

{%- for line_item in order.line_items -%}

{%- if line_item.fulfillment -%}

{{ line_item.fulfillment.tracking_number }}

{% break %}

{%- endif -%}

{%- endfor -%}