Create a new file called .env
which contains your Shopify API credentials and server hostname (with port).
See .env.example
for an example.
First, ensure your PHP version is 7.0 or greater. (php -v
)
Then install the necessary project dependencies through composer
:
cd src
composer install
cd src/public
php -S localhost:8000
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.
helpers.php
includes a simple API wrapper for Shopify.
See this gist for a more advanced usage example of performShopifyRequest()
.