Git Product home page Git Product logo

Comments (8)

tobiasdalhof avatar tobiasdalhof commented on August 22, 2024

You mean a ScriptTag (https://help.shopify.com/api/reference/online_store/scripttag)?

Have a look at your shopify-app.php config

    /*
    |--------------------------------------------------------------------------
    | Shopify ScriptTags
    |--------------------------------------------------------------------------
    |
    | This option is for defining scripttags.
    |
    */
    'scripttags' => [
        /*
            [
                'src' => env('SHOPIFY_SCRIPTTAG_1_SRC', 'https://some-app.com/some-controller/js-method-response'),
                'event' => env('SHOPIFY_SCRIPTTAG_1_EVENT', 'onload'),
                'display_scope' => env('SHOPIFY_SCRIPTTAG_1_DISPLAY_SCOPE', 'online_store')
            ],
            ...
        */
    ],

from laravel-shopify.

ardnor avatar ardnor commented on August 22, 2024

@tobiasdalhof Yes, you are right. I will test it. Thank you.

from laravel-shopify.

ardnor avatar ardnor commented on August 22, 2024

Is it still working in local?

from laravel-shopify.

tobiasdalhof avatar tobiasdalhof commented on August 22, 2024

It works locally with a http tunnel like https://ngrok.com/

from laravel-shopify.

ardnor avatar ardnor commented on August 22, 2024

Okay, thank you. I will try to figure it out.

from laravel-shopify.

gnikyt avatar gnikyt commented on August 22, 2024

@ardnor Yes, this is the correct way. List the scripts there and a job process will install them on authentication. Ngrok does some odd things, so I can not guarentee it will work but through Homestead and Valet, it is working for me via (https://localhost.local) I have setup.

I'll close for now, but if you run into a bug, feel free to make an issue :)

from laravel-shopify.

ardnor avatar ardnor commented on August 22, 2024

@ohmybrew Thank you for your comment. I am using Windows machine right now.

from laravel-shopify.

veed76 avatar veed76 commented on August 22, 2024

Hi @ohmybrew
I installed the app in my Shopify store and added the script tag in the shopify-app.php file, but in frontend, it won't display.

Here is my code
The "src" full URL is: https://offer.local/js/crawlapps-cli-offer.js
That is my localhost URL.

'scripttags' => [
            [
                'src' => env('APP_URL')."/js/crawlapps-cli-offer.js",
                'event' => env('SHOPIFY_SCRIPTTAG_1_EVENT', 'onload'),
                'display_scope' => env('SHOPIFY_SCRIPTTAG_1_DISPLAY_SCOPE', 'online_store')
            ],
    ],

Please guid me where I'm wrong.
Thank you.

from laravel-shopify.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.