承接 arindam/shopify-apis 相关项目开发

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

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

arindam/shopify-apis

最新稳定版本:v1.1.0

Composer 安装命令:

composer require arindam/shopify-apis

包简介

A laravel package for all shopify apis

README 文档

README

A laravel package to integrate all shopify apis

Installation

No dependency on PHP version and LARAVEL version

STEP 1: Run the composer command:

composer require arindam/shopify-apis

STEP 2: Laravel without auto-discovery:

If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php

Arindam\ShopifyApis\ShopifyApiServiceProvider::class,

You need to use the below facade, add this to aliases section in config/app.php:

'ShopifyApis' => Arindam\ShopifyApis\Shopify\ShopifyClassFacade::class,

STEP 3: (Optional) Publish the package config:

If you need to customize the api configuration

php artisan vendor:publish --provider="Arindam\ShopifyApis\ShopifyApiServiceProvider" --force

- OR -

php artisan vendor:publish --tag="shopifyapis:config"

How to use?:

First, you need to create an app in your shopify admin section and you will get the access token. Then, you need to just add below information in your .env file

SHOPIFY_STORE_URL=https://{your-store-name}.myshopify.com
SHOPIFY_ACCESS_TOKEN={YOUR_APP_ACCESS_TOKEN}

Now enjoy with the below methods:

Products APIs

1.  ShopifyApis::allProducts();
2.  ShopifyApis::allActiveProducts();
3.  ShopifyApis::allDraftProducts();
4.  ShopifyApis::allArchivedProducts();
5.  ShopifyApis::allPublishedProducts();
6.  ShopifyApis::productByIds($productIds); // pass an array of product ids, ex: ['xxx', 'xxx']
7.  ShopifyApis::specificProductById($productId); // pass specific product id as param
8.  ShopifyApis::allActiveProductCount();
9.  ShopifyApis::allDraftProductCount();
10. ShopifyApis::allProducts();
11. ShopifyApis::productImages($productId); // pass specific product id as param
12. ShopifyApis::productImagesCount($productId); // pass specific product id as param

Product Collection APIs

1.  ShopifyApis::allCollections();
2.  ShopifyApis::specificCollection($collectionId); // pass specific collection id as param
3.  ShopifyApis::allCollectionCount();
4.  ShopifyApis::collectionInfoById($collectionId); // pass specific collection id as param
5.  ShopifyApis::productsOfCollection($collectionId); // pass specific collection id as param

Product Variants APIs

1.  ShopifyApis::allProductVariants($productId); // pass specific product id as param
2.  ShopifyApis::variantInfo($variantId); // pass specific variant id as param
3.  ShopifyApis::productVariantCount($productId); // pass specific product id as param

Orders APIs

1.  ShopifyApis::allOrders();
2.  ShopifyApis::allOpenOrders();
3.  ShopifyApis::allClosedOrders();
4.  ShopifyApis::allCancelledOrders();
5.  ShopifyApis::allAuthorizedOrders();
6.  ShopifyApis::allPendingOrders();
7.  ShopifyApis::allPaidOrders();
8.  ShopifyApis::allUnPaidOrders();
9.  ShopifyApis::allPartialPaidOrders();
10.  ShopifyApis::allRefundOrders();
11.  ShopifyApis::allPartiallyRefundOrders();
12.  ShopifyApis::allVoidOrders();
13.  ShopifyApis::specificOrder($orderId); // pass specific order id as param
14.  ShopifyApis::ordersByIds($orderIds); // pass an array of order ids, ex: ['xxx', 'xxx']

license:

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

Post Issues: if found any

If have any issue please write me.

统计信息

  • 总下载量: 10
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-10-07