skip to Main Content

How to implement script tags in shopify using my laravel app (php). I want to show some dynamic text in product page. so how to include my app content using script tags??

2

Answers


  1. Chosen as BEST ANSWER

    Finally I got the answer- You can refer this link to add script tags in the shopify store using your php app laravel package


  2. You can add script tag using bellow code

    POST /admin/script_tags.json
    
    {
        "script_tag": {
            "event": "onload",
            "src": "https://djavaskripped.org/fancy.js"
        }
    }
    

    also you need shopify domain and token to create this request. You can add your dynamic code in the js file like first you have to check that current page is product page and then if yes then show your dynamic text there.

    Thanks

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search