How to add a track order link in the customer order

  1. Go to Shopify admin and then go to the Themes menu: Store admin -> Online Store -> Themes
  2. Press the Actions button then select the Edit code from the drop-down menu.
  3. After selecting the Edit code menu then select the Templates folder.
  4. To add a track order link to customer order: Click the arrow button in the upper right corner to enlarge the screen then select customers/order.liquid.
  5. Search for the word (CTRL + F), write the word you are looking for or look for the same code snippet as in the image below then press Enter before the end of the tag.
  6. Then place this following code below it, and press the save button after that
    {% if order.fulfillment_status_label == 'Fulfilled' %}
     <a href="#" class="tracking_order" data-shop_name="{{shop.permanent_domain}}" data-order_number="{{order.order_number}}" data-email="{{}}" >Track Order </a>
     {% endif %}

  7. The javascript code below is also placed at the end of the file and hit the Save button
    <script type="text/javascript" src="//"></script>

  8. The following is the customer order page after the customer logs in with the URL: your-website-name/account/orders if the code placement is correct, the Track Order button will appear on the page as shown below:
  9. When you click the Track Order button you will be redirected to the order tracking page as shown below:

What are you looking for?

Your Cart