承接 signifly/shopify-php-sdk 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

signifly/shopify-php-sdk

最新稳定版本:v0.4.1

Composer 安装命令:

composer require signifly/shopify-php-sdk

包简介

Shopify PHP SDK

README 文档

README

The signifly/shopify-php-sdk package allows you to easily make requests to the Shopify API.

Below is a small example of how to use it with the CredentialsProfile.

use Signifly\Shopify\Shopify;
use Signifly\Shopify\Profiles\CredentialsProfile;

$shopify = new Shopify(
    new CredentialsProfile(
        env('SHOPIFY_API_KEY'),
        env('SHOPIFY_PASSWORD'),
        env('SHOPIFY_DOMAIN'),
        env('SHOPIFY_API_VERSION')
    )
);

// Retrieve a list of products
$shopify->products()->all(); // returns a collection of ProductResource

// Count all products
$shopify->products()->count();

// Find a product
$resource = $shopify->products()->find($id); // returns a ProductResource

// Update a product
$shopify->products()->update($id, $data); // returns a ProductResource

// Delete a product
$shopify->products()->destroy($id);

Documentation

To get started follow the installation instructions below.

Installation

You can install the package via composer:

$ composer require signifly/shopify-php-sdk

Reference

A list of the available methods on the Shopify API client. The examples below assumes you have knowledge of how to make valid requests to the Shopify API.

If you want to learn more about what options are available when making a request, please refer to Shopify's documentation.

Products

Retrieve a list of products

$shopify->products()->all([
    'page' => 1,
    'limit' => 250,
]);

// returns a collection of ProductResource

NOTE: There's a max limit of 250 items per request.

Retrieve a count of products

$shopify->products()->count(); // returns an integer

Retrieve a single product

$shopify->products()->find(123456789); // returns a ProductResource

Create a new product

$shopify->products()->create([
    'title' => 'Burton Custom Freestyle 151',
    'body_html' => '<strong>Good snowboard!</strong>',
    'vendor' => 'Burton',
    'product_type' => 'Snowboard',
    'tags' => 'Barnes & Noble, John\'s Fav, "Big Air"',
]);

// returns a ProductResource

Update a product

$shopify->products()->update(123456789, [
    'title' => 'An updated title',
]);

// returns a ProductResource

Delete a product

$shopify->products()->destroy(123456789); // returns void

Testing

$ composer test

Security

If you discover any security issues, please email dev@signifly.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 4.24k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 8
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 8
  • Watchers: 5
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-01-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固