Skip to content

Composer package Shopify API for use with Zendframework 2

Notifications You must be signed in to change notification settings

milqmedia/mq-shopify

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 

Repository files navigation

PHP-Shopify-API

Basic Example

<?php
        define('API_KEY', 'xxxxx');
        define('SECRET', 'xxxxx');

        require_once('Zend/Loader/StandardAutoloader.php');

        $loader = new \Zend\Loader\StandardAutoloader();
        $loader->registerNamespaces(array(
                'Zend' => __DIR__ .'/library/Zend',
                'Shopify' => __DIR__ .'/library/Shopify'
        ));
        $loader->register();

        $client = new \Shopify\Client(array(
                'shop'    => $_GET['shop'],
                'api_key' => API_KEY,
                'secret'  => SECRET
        ));

        $ShopifyProduct = new \Shopify\Resource\Product(array(
                'client' => $client
        ));

        $products = $ShopifyProduct->getAll(array(
                'fields'=> array('id'),
                'collection_id' => '3782202'
        ));

        print_r($products);

About

Composer package Shopify API for use with Zendframework 2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%