How to get the link to the order status page a customer sees after checkout

New Member
3 0 1

Is there any way to link to the Shopify order status page from the actual site?  This is the url that looks like checkouts.shopify/245241/checkouts/3401293840/thank_you.  I can't seem to find this in the documentation and it seems like a great page for order status.

Thanks

0 Likes
Shopify Staff
Shopify Staff
105 0 17

Hi Ruben,

Chris from Shopify here. After your customer places an order, they will receive an email confirmation of that order. They can click a link in that notification to be taken back to the page you're referencing, the thank you page, to check their order status! This is what it looks like: https://screenshot.click/07-25-oy7i1-mf8cp.png

There are of course apps that offer order status tracking. For instance, Aftership is one of the more popular choices: https://apps.shopify.com/aftership

Hope I was of some help. If you have any further questions, the forums are a great resource. However, feel free to reach out to support@shopify.com for answers as well :). 

Regards,

Chris D
Shopify Guru

0 Likes
New Member
3 0 1

I know that customers get a link in the email, but I want to provide a link from within their actual account on the site.  Are there any workarounds to make that possible?

1 Like
Tourist
8 0 1

You can "create" a new URL from the account/order page's canonical URL to use for this...
 

{% assign orderpath = canonical_url | replace: 'https://www.YOURSHOP.COM/account/', 'https://checkout.shopify.com/[STOREID]/' %}

Where YOURSHOP.COM is your Shopify store's URL, and [STOREID] is seen from an example order status page (and should be the same for all orders for your store). 

Once you have this link created, you can insert it in the orders page:

  <div class="grid-item one-third medium-down--one-whole">
    <div class="page-header">
      <h4>Track Your Order / View Order Confirmation</h4>
    </div>
    <p><strong>Order Status:</strong> Click <a href="{{ orderpath }}" title="Track Your Order" target="_blank" class="link-style-you-choose">here</a></p>
  </div>

For debugging purposes, I recommend outputting the values of {{ canonical_url }}  and {{ orderpath }} on the page directly until you get things working.  

The convention for a properly formed order status page URL is: https://checkout.shopify.com/[STOREID]/orders/XXXXXXXXXXXXXXXXXXXX.

Shopify happens to also use order key (the XXXXXXXXXXXXXXXXXXXXXX bit) for the canonical URL for account/orders as well... which makes this possible with a little string filtering as I outline above. 

0 Likes
Tourist
8 0 1

BTW, it looks like "koilhair.com" is your store URL and  "245241" is your STOREID from your original post.

So creating the orderpath string variable will look (something) like this for your store:

{% assign orderpath = canonical_url | replace: 'https://www.koilhair.com/account/', 'https://checkout.shopify.com/245241/' %}

You can then reference {{ orderpath }} in a <a href> anywhere on the account/order page that you want to place a tracking link.

0 Likes
Tourist
8 0 1

If you want to add a column to the Account page in the orders section, you can similarly add:
 

      <table class="full">
        <thead style="background-color:#f2f2f2;">
          <tr>
            <th>Order</th>
            <th>Date & Time</th>
            <th>Payment Status</th>
            <th>Fulfillment Status</th>
            <th>Order Status</th>            
            <th>Total</th>
          </tr>
        </thead>
        <tbody>
          {% for order in customer.orders %}
          {% assign orderpath =  order.customer_url | replace: 'https://www.YOURSHOP.COM/account/', 'https://checkout.shopify.com/[STOREID]/' %}
            <tr>
              <td>{{ order.name | link_to: order.customer_url }}</td>
              <td>{{ order.created_at | date: "%-m/%-d/%Y at %l:%M %p" }}</td>
              <td>{{ order.financial_status | capitalize  }}</td>
              <td>{{ order.fulfillment_status | capitalize }}</td>
              <td><a href="{{ orderpath }}" title="Track Your Order" target="_blank">Track Order</a></td>
              <td>{{ order.total_price | money }}</td>
            </tr>
          {% endfor %}
        </tbody>
      </table>

Note: I added the "orderpath" string assign code inside the FOR loop for orders, then added a table header (TH) for the column heading and a table data cell (TD) for the link to the tracking page to the standard code for the account page to accomplish this. Your code may look different based on the theme you use.

The net result looks something like this...

0 Likes
Shopify Partner
1 0 0

Hi Alpha Thread,

I followed your steps but mine doesn't seem to be working properly. Here's what I added to my code in customers/order.liquid:

{% for order in customer.orders %}
{% assign orderpath = order.customer_url | replace: 'https://khongsittha-muay-thai.myshopify.com', 'https://checkout.shopify.com/16209071/' %}
<td>
<a href="{{ orderpath }}" title="Track Your Order" target="_blank">View Order Summary Page</a>
</td>
{% endfor %}

- - -

However, when I tested the link, it doesn't work properly. Would you be able to guide me?

0 Likes
Shopify Expert
159 0 39

You can get this URL by using:

{{ order.order_status_url }}

For example; you could add a tracking link on customers order details page (/templates/accounts/order.liquid) using:

<a href="{{ order.order_status_url }}" title="Track Your Order" target="_blank">Track Order</a>

Kindest,
Cam @ Elkfox

Head fox at Elkfox | App and web, design and development | Digital commerce experts | https://elkfox.com
2 Likes
Tourist
8 0 1

Khongsittha​​​​,

It looks like you are missing a "/" in your first path (after "replace")...

{% assign orderpath = order.customer_url | replace: 'https://khongsittha-muay-thai.myshopify.com/', 'https://checkout.shopify.com/16209071/' %}

Plus I haven't tested this with myshopify.com URLs, though I don't see why the replace statement wouldn't work the same in their case.

I'd also considering giving Cam's suggestion (above) a go. In my case, I couldn't find a orderstatus URL in the documentation, so I built my own. 

Best regards,
Alpha Thread

1 Like
Shopify Expert
159 0 39

Yeah, unfortunately that one doesn't seem to be in the documentation yet. But it works, so is a nice suprise :)

Head fox at Elkfox | App and web, design and development | Digital commerce experts | https://elkfox.com
0 Likes