How can I add a tracking number link on the My Accounts page?

How can I add a tracking number link on the My Accounts page?

Yin_Fu
New Member
5 0 0

Hi all,

I wanted to add a link to tracking number to the My Account page, so that when my customers log into their account, they'd be able to track order status of all of their orders from there. The idea would be similar to the "Track my package" link on your Amazon account.

Is there a way to modify the code to show this? Any feedback would be greatly appreciated!

Best,

Yin

Replies 8 (8)

Don
Shopify Staff
2787 199 405

Hi there Yin!

Don here from Shopify. 🙂

I've checked in with our theme specialists here who confirmed that this level of customisation would require the services of a Shopify Expert Designer to put in place.

There are a couple of Experts that specialise in theme-related projects like HeyCarson or TaskHuskythat you can check out for this task.

The information on tracking etc. would also already be display on the order confirmation page for your customers.

Just reach out to any of the Experts linked above to start working out how you might best be able to put this in place for your store. 🙂

All the best!

Regards,
Don

Don | Social Care @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

MartyDunlop
Visitor
2 0 2

That's a pretty lame response from the company to be honest.

Something like this would not require a paid for 'expert', the answer is simply a line of code.

I myself am going through this change on my account page, I've been able to add a track column to the table and a link text, the main challenge is pulling the tracking number from within each individual order to add to the link (or just to present on screen).

A useful answer from Shopify would be the identification of what that could should look like in .liquid form, not simply, "PAY THIS PERSON".

Come on.

Mak_flurry
Tourist
3 0 1

Would I be able to get some help on this please? i am willing to put the code in myself. I simply want the tracking code to be present with the order so that the customer doesn't have to keep searching their email for it.... or at least hide the number with a label that says "track order".

PluginHive
Shopify Partner
797 31 100

Hello,

 

You can try an app like Shipment Tracking and Notify app. The app automatically send email notifications to your customers, every time there is a change in the tracking status.

 

Also, the app helps to make order tracking a part of your online store with an integrated "Track Your Order" page, from where your customers can track their orders. You can also get live tracking updates on the Tracking Dashboard and monitor all your shipments from various integrated carriers.

Customer Success @ PluginHive
Shipping Automation | FedEx shipping | Multi-carrier shipping | Shipment Tracking | Australia Post shipping

martincarvalho
Shopify Partner
2 0 2

You can access the tracking code by accessing the fulfillment object's tracking_number.


The final code would be something like this:

 

 

{% for line_item in order.line_items %}
  {% if line_item.fulfillment.tracking_number %}
    <p>Tracking code: #{{ line_item.fulfillment.tracking_number}}</p>
  {% endif %}
{% endfor %}

 

 

 

Shoplindens
Tourist
6 0 3

where do you put this code?

Lindens

WAWbox
Tourist
7 0 14

So it looks like no one has figured this out? I am baffled that Shopify doesnt just have this in peoples accounts. I've never not had an account with an online shopping company and gone to my order and not seen my tracking number. How janky of shopify to not have this automatic!

efex
Shopify Partner
6 0 0

You can alter and use this code below, it should work just fine.

A lot of the cargo companies generates tracking codes in this format: www.cargocompany.com/somedefaulttext/tracking_number:123456789

I think because of the rules, you cannot add the tracking number of an order. Instead, you can separately add items' tracking number. Meaning if there are 2 products in an order, you will see 2 links as an output.

If anyone knows how to limit to 1, please hit this thread up.

 

<tr>
<td>{{ 'customer.order.tracking_number' | t }}</td>
<td>
{% for line_item in order.line_items %}
{% if line_item.fulfillment.tracking_number %}
<p><a href="https://panel.bovo.com.tr/kargo-takip?tracking_number={{ line_item.fulfillment.tracking_number }}">{{ line_item.fulfillment.tracking_number}}</p>
{% endif %}
{% endfor %}
</td>
</tr>

 

In the account.liquid file, you will see <tr> and <td> tags. Paste the code between any </tr> and <tr> you like. It should look like this:

 

Screenshot 2025-01-09 at 10.18.30 AM.png

 

 

I hope you can do it easily,

Sincerely