Personalized checkout and custom promotions with Shopify Scripts
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
hello,
I have created an app using Shopify App Template - PHP,
Shopify php+reactjs app, but now I'm confused to create a script tag,
I don't understand how to create a script tag using Shopify App Template - PHP Structure,
exactly I don't understand which file I need to create that effect on the cart page.
I have read the script tag documentation, but don't get an exact idea about it,
I don't understand how to create a script tag, using Routes, Controller, and Component,
that the structure of this php App.
curl -d '{"script_tag":{"event":"onload","src":"https://example.com/my_script.js"}}' \
-X POST "https://your-development-store.myshopify.com/admin/api/2023-04/script_tags.json" \
-H "X-Shopify-Access-Token: {access_token}" \
-H "Content-Type: application/json"
I used this code and run into the Postman, it's run but, but now where does the output display in the front end?
in "src":"https://example.com/my_script.js", in src, which exact url i need to add?
because I'm developing this app in my local host.
please help me on this to create script tag.
Thanks.
@OneCommerce @PageFly-Victor @GemPages @flareAI @Alok_Kasgar
Please help me with this, give me some explanation on this.
Thank You.