skip to Main Content

I’m beginner as shopify partner and I want to get parameters from home page using proxy app.

Url : mystore.myshopify.com/client_id=value

I want to get client_id via shopify app. What I have to do in path_prefix in proxy configuration.

Here more detail about what i want to get the parameters that I want with proxy configuration and nothing received when visting home page

parameters that I want:

parametters that i want

Proxy configuration:

this configuration
Thanks in advance.

2

Answers


  1. Chosen as BEST ANSWER

    Here is the solution.

    is to created a file Js in theme and send it via app proxy like what i do here.

    `var client_id = getUrlParameter('client_id'); jQuery(function($){

        /*  app proxy in jQuery*/            
        var base_urlc = window.location.hostname; //grab shop url
        var window_width = $(window).width();  //save width
        $.ajax({
            type: "GET",
            url: "/apps/client",
            contentType: "application/json",
            data: {client_id:client_id}
        })
        .done(function( msg ){
            console.log( msg );
        });
    
    });`
    

    Thanks anyways


  2. In your Partner setup of the proxy choose /tools, /a, /community or /apps and then some resource name. For example:

    /apps/client
    

    Set the URL to be your App’s actual endpoint… https://foo.bar.com/yooba

    Now you expect Shopify to send requests to your App’s /yooba route.

    Note that the JS you use will now be a GET or POST to /apps/client

    Be careful with App Proxy. You can waste a lot of time with it. And note that the merchant can change the Proxy URL and break it anytime they want.

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