We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Order id

Order id

kurs
Shopify Partner
12 0 1

Is there a way to dinamically access order id (when customer is placing order) without checkout extensions (without Shopify Plus plan basically)?

Replies 7 (7)

Huptech-Web
Shopify Partner
1169 234 265

Hello @kurs 
If you have access to the Shopify order ID on the thank you page, you can use either `Shopify.checkout.order_id` or `window.Shopify.checkout.order_id` to retrieve it. This ID can be obtained from the thank you page. Let me know if you need further clarification or assistance with anything else!

If you found this response helpful, please do like and accept the solution. Thanks!
Need support with Customizing your Shopify store?
Feel free to contact me at info@huptechweb.com or Visit our website Huptech Web.
Instant Shortcode Builder: Integrate customizable UI features anywhere in your store - No coding knowledge required
kurs
Shopify Partner
12 0 1

Hi, @Huptech-Web 

Can I do this with theme extension? 

Huptech-Web
Shopify Partner
1169 234 265

Yes off course

If you found this response helpful, please do like and accept the solution. Thanks!
Need support with Customizing your Shopify store?
Feel free to contact me at info@huptechweb.com or Visit our website Huptech Web.
Instant Shortcode Builder: Integrate customizable UI features anywhere in your store - No coding knowledge required
kurs
Shopify Partner
12 0 1

How can I access only a thank you page using theme extension app embed block? 
Should I place there an if statement with template.name or some similar object?

Thank you page isn't available for customization in Shopify Editor as far as I can understand. 

So I need to use app embed and not app blocks. 
Also I don't want the code to be embeded on the whole store, so I would like to limit that only to thank you page

Huptech-Web
Shopify Partner
1169 234 265

In the Theme App extension, you need to specify conditions for particular pages. For instance, if you're adding it to the thank you page, you should include a condition for the thank you page specifically. You can achieve this by adding a script tag. Alternatively, you can include a JavaScript file via a script tag, allowing for extensive customization

If you found this response helpful, please do like and accept the solution. Thanks!
Need support with Customizing your Shopify store?
Feel free to contact me at info@huptechweb.com or Visit our website Huptech Web.
Instant Shortcode Builder: Integrate customizable UI features anywhere in your store - No coding knowledge required
kurs
Shopify Partner
12 0 1

Unfortunately adding script (tested both body and head) in app embed works for all store pages besides checkout and thank you page.

kurs
Shopify Partner
12 0 1

I did that with web pixels and checkout_completed event (event.data.checkout.order.id)