Shopify API
Categories
Component ID
2469089
Component name
Shopify API
Component type
module
Maintenance status
Development status
Component security advisory coverage
covered
Downloads
4970
Component created
Component changed
Component body
Simple integration with the Shopify API. Shopify is a leading eCommerce solution. Using this module requires a Shopify store of your own.
Drupal 7
Dependencies
- Libraries API
- Shopify API library (see installation instructions)
Installation
- Download the Shopify API library from https://github.com/cmcdonaldca/ohShopify.php. Add it to your libraries directory (ie, sites/all/libraries/shopify).
- Download and install this module.
- Navigate to the admin settings page at admin/config/services/shopify.
- Follow the help instructions to connect Drupal to your Shopify store.
Usage
$client = shopify_api_client();
$products = $client->call('GET', '/admin/products.json', array('limit' => 100, 'page' => 2));
Drupal 8
Dependencies
- Use composer to download the required Shopify PHP SDK library. Run in your Drupal root:
composer require donutdan4114/shopify:dev-master
You should now have a new directory in /vendor/donutdan4114/shopify
Installation
- Download this module.
- Run
composer require donutdan4114/shopify:dev-masterin the root directory. - Navigate to the admin settings page at admin/config/system/shopify_api.
- Follow the help instructions to connect Drupal to your Shopify store.
Usage
Shopify PHP SDK documentation.
$client = shopify_api_client();
$products = $client->getProducts(['query' => ['limit' => 100, 'page' => 2']]);
$shop = $client->getShopInfo();
Notes
This module provides no user interface other than the admin configuration form. It is intended for developers.
For a full Shopify integration, check out the Shopify module, which uses this module.
