erdiko/shopify 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

erdiko/shopify

Composer 安装命令:

composer require erdiko/shopify

包简介

Erdiko Shopify Package

README 文档

README

Package version

Shopify API Adapter

  • Connect to the Shopify API
  • Guzzle support
  • Convenient composer install
  • PSR compliant
  • Use with Erdiko or your favorite framework

If you are using composer and php 5.3 or greater, then this is a great package to use. It is compatible with frameworks such as Laravel, Symfony, SlimPHP, and of course Erdiko.

If you are using php 4 or are not using composer then check out ohShopify

Installation

via composer

composer require erdiko/shopify

Usage

To connect to shopify you can use the \erdiko\shopify\Shopify class to connect to the Shopify API. This library can be used within any PHP app that supports composer.

If you are using erdiko you can leverage our service models and sample app to jumpstart your development.

Authorizing your App with your Shopify Store

This module relies on OAuth to access and interact with your shopify stores. Authorization with this module is only required for setup, but it is required for each store.

The workflow of authorizing your application with OAuth is "asking for permission" by constructing a link to allow Shopify to install this application. You will need to expose your application to a URL from which you can redirect and access. Edit your routes config to expose the Shopify module controller to make sure we construct and output the expected output for Shopify like so:

 {
     "routes": {
     	...
        "shop": "\erdiko\shopify\controllers\Shopify",
        ...
     }
 }

While we will defer you to the official Shopify Docs for complete instructions, here are the brief instructions to authorize your application with your store:

  • Register your application with the Shopify Partners Dashboard
  • Retrieve your API Key, API Secret and the Refresh Token (also known as a "nonce") for your newly created application
  • Construct your "Permissions Prompt" URL by editing the following URL

https://{shop}.myshopify.com/admin/oauth/authorize?client_id={api_key}&scope={scopes}&redirect_uri={redirect_uri}&state={nonce}

Tokens:

  • {shop}
    • The subdomain for your shopify store
  • {api_key}
    • This is your API key
  • {scopes}
    • This is a comma separated list of permissions you allow for your application
    • We would like to suggest the following: write_products,write_orders,write_customers
  • {nonce}
    • Your Refresh Token, also known as a "nonce"
  • {redirect_url}
    • A publicily accessible route exposed by your erdiko application where the Shopify model is initialized

Erdiko App Skeleton

If you are using Erdiko, www.erdiko.org, there is some useful code for interacting with Shopify (beyond the basic API library).

To install this skeleton app in your existing Erdiko app it takes only 3 steps.

  1. Copy the contents of the erdiko-shopify /app folder into the relavant /app folders in your site.

  2. Modify app/config/default/shopify.json with your specific Shopify settings

  3. Add a route to the Shopfy controller in your routes.json file. The class is /erdiko/shopify/controllers/Shopify.

Feedback

Please send us feedback if you have any questions or suggestions. If you find any bugs or find places where we are not PSR compliant please submit a github issue or email us.

Special Thanks

Arroyo Labs - For sponsoring development, http://arroyolabs.com

cmcdonaldca/ohShopify.php - Original Shopify PHP class

erdiko/shopify 适用场景与选型建议

erdiko/shopify 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 911 次下载、GitHub Stars 达 7, 最近一次更新时间为 2014 年 08 月 09 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「framework」 「erdiko」 「erdiko-shopify」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 erdiko/shopify 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 erdiko/shopify 我们能提供哪些服务?
定制开发 / 二次开发

基于 erdiko/shopify 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-08-09