Solved

How to get the order ID on the store thanks page

Shopflyer
Shopify Partner
9 0 3

I'm working on an app recently, which is used to track the distributor of the order, so I need to get the order ID on the thank you page. How should I do this? This problem bothered me for a long time.

Accepted Solution (1)

DivinityWebS
Shopify Partner
9 4 3

This is an accepted solution.

You can get the order ID on the thank you page in JavaScript file by this variable "Shopify.checkout.order_id"

If helpful then please Like and Accept Solution.
Want to develop Public/Custom Shopify Apps - Hire me.
- Feel free to contact me on divinitywebsolutions@gmail.com regarding any help
Shopify Partner

View solution in original post

Replies 5 (5)

DivinityWebS
Shopify Partner
9 4 3

This is an accepted solution.

You can get the order ID on the thank you page in JavaScript file by this variable "Shopify.checkout.order_id"

If helpful then please Like and Accept Solution.
Want to develop Public/Custom Shopify Apps - Hire me.
- Feel free to contact me on divinitywebsolutions@gmail.com regarding any help
Shopify Partner
Shopflyer
Shopify Partner
9 0 3

Thank you very much for your answer

LCtest
Shopify Partner
3 0 1

Shopify.checkout isn't available on many stores. Do you know what could be the possible reason for this? Also, any alternatives to get order ID if checkout object isn't accessible?

manumathew17
Shopify Partner
1 0 0

Same problem I am also facing please share if you found any solution i am using 

Shopify.checkout.order_id 

to get the order id from thanks page

Thanks you 

hvrajput7
Shopify Partner
4 0 0

try this

{{checkout.order.id | json}}