Questions related to the testing and development of shop applications

advertisements
  1. I can not find Publish Beta App button at the partners dashboard, How to REAL test my application? I have tested with the private app API.

  2. What will happen If a shop owner click the INSTALL button at app store after the app published? And how to get variables about the client? I tracked the installation of A app, got:

    http://app.com/shopify/?shop=schuppe-conn-and-oconner436.myshopify.com&t=ed8f063be7d4583fbd194836b12599b3&timestamp=1339572934&signature=e7451b42b2fd5f67465c0b98bcaf7668

    But some document says I will get something like:

    http://app.com/shopify?code=TEMP_TOKEN

    Which is correct?

  3. About the PHP library: https://github.com/cmcdonaldca/ohShopify.php I can get a limited time permission to operate the shop, but how to get the permission later? (I can not get shop owner to click the INSTALL button again).


When someone clicks the "install" button at the Shopify App store, they are redirected to your apps URL (return URL if you are using OAuth) with the shop parameter attached to the request.

Using your example, when I click "install" in the App store, I am redirected to http://app.com/shopify/?shop=schuppe-conn-and-oconner436.myshopify.com. In your app, all you have to do is check to see if that param is there, and respond accordingly.

In Ruby, this looks like:

if params[:shop].present?
  redirect_to "/auth/shopify?shop=#{params[:shop]}"
else
  # render the normal page
end

As for the PHP question:

About the PHP library: https://github.com/cmcdonaldca/ohShopify.php I can get a limited time permission to operate the shop, but how to get the permission later? (I can not get shop owner to click the INSTALL button again).

I think that the thing you are missing is that when you get through the OAuth process, you should have a token that you need to save. This token, along with your app's shared secret, is needed to construct the URL you need to connect to the API. That is what ohShopify is doing for a session, but if you need to connect to the API without the merchant (Shopify store owner) logging in, then you need to store that OAuth token.