A simple Shopify app in PHP.
Getting Started
Create a new file called .env
which contains your Shopify API credentials and server hostname (with port).
See .env.example
for an example.
Install dependencies
First, ensure your PHP version is 7.0 or greater. (php -v
)
Then install the necessary project dependencies through composer
:
cd src
composer install
Run the application
cd src/public
php -S localhost:8000
Installing to your Shopify store
Navigate to the following URL in your browser:
http://localhost:8000/?shop=my-test-shop.myshopify.com
Making the appropriate subsitutions for your hostname and myshopify
domain.
Advanced Usage
helpers.php
includes a simple API wrapper for Shopify.
See this gist for a more advanced usage example of performShopifyRequest()
.