phpish / shopify_app-skeleton

Skeleton Shopify App project using phpish/shopify
94 stars 41 forks source link

Cant see the app installed when run the command.. #11

Open navalevivek opened 8 years ago

navalevivek commented 8 years ago

hi, I cant see anything except the message in store side as "The page you’re looking for could not be found Please make sure the web address is correct."

Basically I am running the command "http://path-to-new_prj/install.php?shop=example-shop.myshopify.com" . Only the thing is my project is hosted at local apache server. So does becuase of that I am getting this issue to test app installed or any files.

PFA the image of error I am getting. theme-editi-3

navalevivek commented 8 years ago

And also please reply that, does my all local files or the folder which i made for the app, is it necessary that it should be live or hosted somewhere. because i am running that command using local environment.

myjanky commented 8 years ago

@navalevivek http://path-to-new_prj/install.php?shop=example-shop.myshopify.com

that is not a valid url. Is your shop @ example-shop.myshopify.com? (should be mydevshop-38.myshopify.com) plus path-to-new_prj should be localhost if your project is on your local pc. Please note that localhost is not a secure path as far as your browser is concerned.

navalevivek commented 8 years ago

so how do i test it.

should i have to host my data on server so that my url will become https like "https://www.mydevshop-38.myshopify.com http://mydevshop-38.myshopify.com"

plz convey in detail

On Tue, Jan 5, 2016 at 7:43 PM, Larry notifications@github.com wrote:

@navalevivek https://github.com/navalevivek http://path-to-new_prj/install.php?shop=example-shop.myshopify.com

that is not a valid url. Is your shop @ example-shop.myshopify.com? (should be mydevshop-38.myshopify.com) plus path-to-new_prj should be localhost if your project is on your local pc. Please note that localhost is not a secure path as far as your browser is concerned.

— Reply to this email directly or view it on GitHub https://github.com/phpish/shopify_app-skeleton/issues/11#issuecomment-169011373 .

Thanks&Regards, Bhausaheb O. Navale +919890071124, +91 9503609531 navalevivek@gmail.com

navalevivek commented 8 years ago

@myjanky

could you please explain me in detail, i am confused whether we can test the app by putting or accessing in local enviornment or do i need to host it so to test out the stuff...

navalevivek commented 8 years ago

Now today, for testing, i hosted my all data to another server , whatever has been there like composer.json, vendor folder, create_product.php, get_product.php files etc. But still I gets same error,

Could you please check and let me know what should i do now to install or bring the app on dev store please. I am totally referring your API's or library only which ever you shown in this git.

myjanky commented 8 years ago

Please setup a server (heroku app or similar) and give it a valid SSL cert for HTTPS. *heroku has ssl built in. Your store should only be http except the checkout. https://docs.shopify.com/support/other/general-information/why-do-i-get-a-security-warning-in-my-browser-when-accessing-my-storefront

Show me your APP settings from your developer account. (urls changed to hide my app) screenshot 2016-01-06 at 10 25 36 am

myjanky commented 8 years ago

Also ohShopify may be a little easier for you to use. (or even the Ruby gem Shopify app). the screenshot above is from an app that uses ohShopify instead of phpish/shopify_app-skeleton.....

navalevivek commented 8 years ago

hi myjanky,

Thanks a lot for the information. But first please check first what I did and what I want to develop :-

   what I  did : I registered  as  Partner. Created or filled the form for creating the app. I also created devlopment store. Once i created dev store I got one link called 'http://mydevshop-38.myshopify.com/admin'. Now once I  clicked  on that,  i created app  from  the  admin dashboard  from  dev  store itself.  
   So  now after that, I downloaded  the files from 'phpish/shopify_app-skeleton'  library  and done all the necessary process.  and   hosted my data on some  server. But  when running 'http://path-to-new_prj/install.php?shop=example-shop.myshopify.com' url by putting my  server url and dev store url,  i was gettng the error which  i shown in screenshot above. 

  What I want  to  do : Basically my requirnment is very clear,  I want  to develop a simple  app, which  will be  mostly on checkout page functioanlity. So, once user comes on checkout page after  selecting  the product, there on checkout page  I  want add  some functioanlity or some button  or  something like that from  which user clicks on that button (my newly added) button, it wil  pop-up  and open one form  to  fill and  user submits  and once  user clicks checkout submit other process  reamains same as normally. So for this I  want to develop the  app  for  shopify store   for my client who  has  the website. 

So for that purpose, initially i read somewhere that to develop the app, you should have partner account,, once test dev. store and like that. also read that i need to develop using some library out of that i choosed PHPish library.

So now can you tell me, I am going correct or wrong. Also tell me for my requirement on checkout page, how this PHPish library will help me in terms of doing app developt and is this necessary to host our data/app on heroku server.

Please please explain, I am very confused and scared now, to move on on this.

Eagerly waiting for your reply.

Thanks and sorry to bother you.

navalevivek commented 8 years ago

And one more im. question : If i am creating the app from partner account and again crating the app from dev. store admin dashboard, then why two apps and how they are interrelated.

Also do i need to register or create a developer account?

navalevivek commented 8 years ago

Hi,

For testing or devlopt. purpose i am now using ohShopify.php example from GIT. I created 3 files given in turotiral. and hosted all the 3 files on server, but stilll i cant get anything on page or in my dev store. I dont why these all shopify realted are so UNCLEAR and HALF EXPLAINED.

Could you please explain me how did you developed the app using ohShopify.....NOW I am very frustatated at this moment.

myjanky commented 8 years ago

@navalevivek

Slow down and take a deep breath. I can help you. One thing that is required is an in depth knowledge of a few technologies. SSL, Shopify platform, Shopify App platform and basic server technologies (HTTP, HTTPS so on).

*Do not use any of your existing setup. Start from scratch. Steps:

  1. Goto Developer.shopify.com and register an account if you have not already. (log in if you have an account.) This is also called a partner account.
  2. Create a new App and or a new Developer store. (you can use an existing store)
  3. Install phpish on a server and make note of the oauth.php path. This server must have SSL and not self signed.
  4. In the App settings, select embedded app enabled and enter the application url. The application URL is the URL of the server you installed phpish. For example, if your server's url is www.navalevivek.com and the path to oauth.php is www.navalevivek.com/oauth.php then that is your application/callback URL.
  5. The redirect URL is the path where the meat of your application lives. After authentication (the app is installed) Shopify sends you to your application hence the redirect. This can even be oauth.php with an if($auth=true){ //code here }

Tips: You can not create an App for the Checkout page unless you have a Shopify Plus account and have the representative enable the Checkout page in your dev account for editing. Now you may have meant Cart page and not Checkout but there is a difference with these two pages on Shopify. These steps should give you the best chance at success. If something is not clear, please ask and I will do my best to clarify.

navalevivek commented 8 years ago

@myjanky,

Thanks a lot dear for explaining it step-by-step. Now please check my comments on some new doubts after you statements itself.

  1. Create a new App and or a new Developer store. (you can use an existing store) Doubt=> From developer account itself or by creating developer store and then in from dev.store admin dashboard i have to create the app, becuase both admin has facility to create the app.
  2. The redirect URL is the path where the meat of your application lives. After authentication (the app is installed) Shopify sends you to your application hence the redirect. This can even be oauth.php with an if($auth=true){ //code here } Doubt=> Does if($auth=true){...} code, here what we need to do.

Your point: You can not create an App for the Checkout page unless you have a Shopify Plus account and have the representative enable the Checkout page in your dev account for editing. Now you may have meant Cart page and not Checkout but there is a difference with these two pages on Shopify.

Doubt=> How much it will cost me. Also if I want to do some changes or call 3rd party api then I can do once I will purchase or get PLUS account and what I have to do Plus account.?

Also is this first or primary phase to install the phpish library and all to develop an app on CHECKOUT page for my shopify website, becuase my app would be mostly related on checkoout page only. So for that also I need to develop from this autorization,oauth calls and all or do I have to do some diff. API or code.

And once again dear, sorry to bother you on small things but seriously I was very confused till yesterday but by reading your todays post, i got much confidence and on that basis I put some new doubts, so hoping you will answer them properly like todays post :) thanks ..

myjanky commented 8 years ago

Doubt=> From developer account itself or by creating developer store and then in from dev.store admin >dashboard i have to create the app, becuase both admin has facility to create the app.

There are two ways to create an app and both ways have the same functionality available to them.

  1. private app which does not appear installed in the app section of the store.
  2. public app which is installed in the app section and can be published on the app marketplace for other store owners. We are discussing a public app.

Doubt=> Does if($auth=true){...} code, here what we need to do.

It is up to you as the programer to determine the needs of your application. You could use oauth.php in either redirect or the callback url, I have seen both iterations. You would just have to test if the app has been authenticated then do a header() redirect within oauth.php to send the admin to your application settings.

Doubt=> How much it will cost me. Also if I want to do some changes or call 3rd party api then I can do >once I will purchase or get PLUS account and what I have to do Plus account.? https://www.shopify.com/plus

cost is $995 per month and you get assigned a representative that will answer all your questions. Yes you can call 3rd party api and integrate the data into your store.

Also is this first or primary phase to install the phpish library and all to develop an app on >CHECKOUT page for my shopify website, becuase my app would be mostly related on checkoout >page only. So for that also I need to develop from this autorization,oauth calls and all or do I have to >do some diff. API or code.

This is the first step to installing the app. There is only the authentication mechanism in the code and a couple of helper files as examples, get_product.php etc... Your application/callback URL could be get_product.php. Review install.php and then oauth and go to this link https://docs.shopify.com/api/authentication/oauth It has the steps as comments from this page.

One more thing that tripped me up when using this library was that there is a index.html file which is blank. I am not sure of its intentions but my server was set to render html files before parsing PHP. So the default root documents pointed to index.html and after the install I would only see a blank page. I eventually deleted the index file and made sure the header redirect pointed to my application file.

navalevivek commented 8 years ago

Ok thanks a lot for the answers.

But basically my requirnement is to developa priavate app, so for that also i need to use this phpish library and do the authentication using the helpers files you provided?

also the amount which you said i.e. $995, without buying it i cant make changes in checkout page which i want to do? or if i develop and app for checkout page then will it possible to me if u buyies it or that repersenstative will help me in doing integration fr 3rd arty api and all?

Please answer and thanks for your support till yet.

have a nice day ahead and tc.

myjanky commented 8 years ago

I am not sure what you asking.

You could speak with a representative and see if it is possible to add checkout page to a Dev account.

navalevivek commented 8 years ago

ok, thanks let me check

On Mon, Jan 11, 2016 at 8:36 PM, Larry notifications@github.com wrote:

I am not sure what you asking.

You could speak with a representative and see if it is possible to add checkout page to a Dev account.

— Reply to this email directly or view it on GitHub https://github.com/phpish/shopify_app-skeleton/issues/11#issuecomment-170581261 .

Thanks&Regards, Bhausaheb O. Navale +919890071124, +91 9503609531 navalevivek@gmail.com