jeppos/shopify-php-sdk

An easy to use Shopify PHP SDK.


Keywords
api-client, api-wrapper, php, php71, shopify, shopify-api, shopify-sdk
License
MIT

Documentation

shopify-php-api-client

A simple Shopify PHP API client.

Codacy Badge Build Status Codacy Badge

Installation

Composer

composer require jeppos/shopify-php-api-client

Usage

Following example shows how to get a single product.

<?php

use Jeppos\ShopifyApiClient\SerializerFactory;
use Jeppos\ShopifyApiClient\Service\ProductService;

$guzzleClient = new \GuzzleHttp\Client([
    'base_uri' => 'https://your-store-name.myshopify.com/',
    'auth' => ['username', 'password'],
    'headers' => [
        'Content-Type' => 'application/json'
    ]
]);

$productService = new ProductService($guzzleClient, SerializerFactory::create());

$product = $productService->getOneById(123456789);

echo $product->getTitle();