arindam/shopify-apis
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.
arindam/shopify-apis 适用场景与选型建议
arindam/shopify-apis 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 10 次下载、GitHub Stars 达 4, 最近一次更新时间为 2023 年 10 月 07 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 arindam/shopify-apis 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 arindam/shopify-apis 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 10
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 10
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-10-07