I have a question about `Shopify` global object on order status page. I need to use `Shopify.checkout` object to grab data about current order but i noticed two things :
1) `Shopify.checkout` is sometimes not presented at all
2) There is no documentation about this.
Maybe documentation is presented somewhere? Should i use liquid snippet instead to make sure everything order ?
You are usinf shopify or shopify plus?
In shopify we have no control of checkout page.
Refer below link for more help:
Sounds like you might be running into this, from the documentation:
Upon reload, both the Shopify.Checkout.step and Shopify.Checkout.page objects will return as undefined, while the Shopify.Checkout.OrderStatus will still show as an object"
Hey guys, I'm reopening the conversation as I found some discrepancies in what the Shopify.checkout shows on the thank you page (the first time it loads).
Sometimes though, I'm having nothing in the os-order-number and also nothing in the Shopify.checkout.order_id ... but the amount is here and the detail is here also.
Why is the Thank you page is not showing any order number in some cases or does not even contain an order_id in the Shopify.checkout ?
In our experience, it's 2 to 3% of the orders.
Thanks for the help if you know anything about that.
So I have found an answer I think. Basically, when Shopify is too busy with orders, they must have a queue or something, if the queue has not treated the order quick enough, Shopify will show the order page without the order number. Therefore, there's no Shopify.checkout.order_id value neither (null value). That is highly annoying, but unfortunately there seems to have no way to reach Shopify about this matter.
I know that's it's not a documented thing to use the Shopify.checkout object in the success page, but still, you'd expect consistent values in there.
So now, I know why it does that (or at least have a very high assumption) but I still don't know how to fix it.
If someone knows about the problem, is there a way to fix it?