Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hello all,
We are struggling with my team to figure out how could we inject javascript into the Order Status page (https://website.myshopify.com/XXX/orders/XXX)
For now all our JS code is in a snippet, included in the theme.liquid file. But if my understanding is correct, the theme.liquid is not used on this Order Status page.
Our objective is to get access to the liquid object order.attribues, to get the details of the products of the order passed and send them in a POST call to our app.
Any hint?
Many thanks
Please refer to this answer.
It is a simple process. There is an feature of RESTAPI to perform CURD operation on script tag.
https://shopify.dev/docs/api/admin-rest/2024-01/resources/scripttag#get-script-tags
To replicate the steps in POSTMAN,
1 Create a Custom app with script tag permission for Admin API.
2) Install the app and get the , AAdmin API token. snapt.....
Follow the steps below.
to replicate this request in Postman, follow these steps:
Open Postman and create a new request.
Set the request type to POST.
Enter the request URL: https://your-development-store.myshopify.com/admin/api/2024-01/script_tags.json Replace your-development-store with your Shopify store's development URL.
In the Headers section, add the following key-value pairs:
In the Body section, select the raw option and choose JSON (application/json) as the format.
Copy and paste the JSON payload into the body:
Ensure the JSON payload matches the structure and data you want to send in the request.
Click the Send button to execute the request.
This setup in Postman replicates the cURL command by specifying the request type as POST, setting the URL, adding headers for authentication and content type, and providing the JSON payload in the request body. Adjust the URL, headers, and JSON payload as needed for your specific Shopify script tag creation.
Thanks
Sajal Timilsina | Shopify App Developer
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025