Right, we can access the Shopify.checkout.order_id value since it is injected into the script.
However, it is not the case if the order is a manually created in admin panel or a transfer order. It doesn't have an associated checkout object in these cases.
Isn't it really strange to not include any pointer / id which is directly related with the order entity instead of depending on the checkout entity which might not be existing?
Perhaps creating a checkout record for each transferred order will solve half of the problem (which would be really stupid attempt for only getting the order ID in the order status page, but anyway), however manual orders will still not have a checkout record.
I should be really missing something here. There must be a way to access the order id in the dedicated Order Status Page. However, looking at Shopify Digital Downloads app, it can't do the same thing most likely because of the same reason and it doesn't make sense that they see this problem and don't expose the order id in the Order Status Page.
Could you please help me to figure it out if I am missing something?
So, are we really supposed to do the following?
No, I should be really missing something here. Order ID should be being provided somewhere in the Order Status page. Please, I am really hoping that someone will tell me that I am missing something.
Wouldn't it be amazing if Shopify could add one more property called as __st.order_id?