Giter Club home page Giter Club logo

php-shopify-api-wrapper's People

Contributors

cargi avatar cargix1 avatar dragoszapiet avatar kristofers91 avatar michaeljhopkins avatar nothsa avatar riotcode avatar rjbecker avatar sebmaynard avatar sorena avatar tareqtms avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

php-shopify-api-wrapper's Issues

Is "deleteProductMetafield" not working?

I am trying to delete a metafield using the deleteProductMetafield function and passing (Array ([id] => 8694792272 [metafieldId] => 30289307280).

The application returns an error:

Fatal error: Uncaught exception 'GuzzleHttp\Exception\ClientException' with message 'Client error response [url] https://<shopUrl>.com/admin/products/8694792272/metafields/8694792272.json [status code] 404 [reason phrase] Not Found '....

It seems like it is passing twice the same id ... ... Am I wrong?

Get all methods?

Is there any way to somehow view the methods available to me without having to go through each .php file inside src/resources/*.php? Either through somehow dd() stuff to the view, or using Debugbar, or autocomplete in PhpStorm?

guzzlehttp/guzzle ~6.0

- shopifyextras/shopify-php-api-wrapper v1.1 requires guzzlehttp/guzzle ~5.0.3 -> satisfiable by guzzlehttp/guzzle[5.0.3] but these conflict with your requirements or minimum-stability.

Shopify Plus

Will you be adding support for discount, gift card and Multipass APIs that come with shopify plus?

Failing to Install On Composer

Problem 1
- Installation request for guzzlehttp/guzzle (locked at 6.3.0) -> satisfiable by guzzlehttp/guzzle[6.3.0].
- shopifyextras/shopify-php-api-wrapper 1.1.3 requires guzzlehttp/command 0.7.0 -> satisfiable by guzzlehttp/command[0.7.0].
- Conclusion: don't install guzzlehttp/command 0.7.0
- shopifyextras/shopify-php-api-wrapper 1.1.1 requires guzzlehttp/guzzle ~5.0.3 -> satisfiable by guzzlehttp/guzzle[5.0.3].
- shopifyextras/shopify-php-api-wrapper v1.1 requires guzzlehttp/guzzle ~5.0.3 -> satisfiable by guzzlehttp/guzzle[5.0.3].
- Conclusion: don't install guzzlehttp/guzzle 5.0.3
- Installation request for shopifyextras/shopify-php-api-wrapper ^1.1 -> satisfiable by shopifyextras/shopify-php-api-wrapper[1.1.1, 1.1.3, v1.1].

Webhook

How can I create webhook using PHP-Shopify-API-Wrapper?
Please let me know which setting will be needed for that ?

pretty nooby question.

I followed the installation guide except i downloaded it and used "composer install" but i get
Parse error: syntax error, unexpected '$client' (T_VARIABLE) in C:\Users\Matrix\Cloud\OneDrive\WebD\ss\shopify\index.php on line 5

sometimes I can fix this missing var issue by putting "global $var" but in this case it isn't working. I feel pretty nooby considering all it is, is including autoload.php :/ I have done this kind of thing before! I swear! :P

Multiple clients

Hi,

I'm trying to instantiate multiple clients; I got it working just fine with 1 client, but if I create 2
$client1 = new Shopify\Client();
...
$client2 = new Shopify\Client();
...

then any call I make with $client2 still uses the shop url from $client1...

Thanks!

guzzle 6.2.1 support

I've successfully added and tested support for guzzle 6.2.1 in my forked repo.

Not sure thought should I make a pull request for it.

Please, do let me know if it's something of your interest.

Get Order

Error Occur : Error executing command: cURL error 6: Could not resolve host: https

Typo in getProduct method

The uri set in the getProduct method is
"uri" => "/admin/product/{id}.json",

It should be
"uri" => "/admin/products/{id}.json",

Guzzle conflict

Any chance this will be able to use the latest guzzle (v6.2)? Getting conflicts when trying to require dev-master branch with composer. composer.json shows that either v 5 or 6 can be used but guzzlehttp/command 0.7.0 requires guzzle 5

Proxy?

Why no support for this?

Leaky bucket

I can't see where i can get the call limit data...
Is there a way to have Shopify Leaky bucket data?
If not, is there a plan to add the Leaky bucket function support?
Or is there a way, using this library, to get the call limits?

Instantiating the client

Hi

Using your Shopify client; seems like it has a pretty friendly API!

To get it working with a private app, I had to deviate a bit from the instructions

<?php
require 'vendor/autoload.php';
// Shopify::settings gave errors about unknown class Shopify
$client = new Shopify\Client();
$url = "thename.myshopify.com";
$key = "the-password-field-in-the-private-app-auth-section";
// found by looking at the source a bit :)
$client->settings(Array("shopUrl" => $url, "X-Shopify-Access-Token" => $key));
// try it
print_r($client->getProducts());

Seems to work now :)

Thanks!!

PHP-shopify-api-create-webhook

I created a custom app form shopify partner account.
Used this as my application https://github.com/phpish/shopify_app-skeleton.git
configured the Callback URL : myapplicationLink/oauth.php
Redirection URl : myapplicationLInk/install.php
Changed my myapplicationLInk/conf.php configuretion based on my app.

So i able to install the app in shopify store with some scope (like 'read_customers', 'read_orders').

Problem : create webhook through PHP api call, as soon as my app is installed in shopify store. (Not able to know how to do ?)

Question : if my problem is resovled can i see the result in ( https://MYSTORE.myshopify.com/admin/webhook.json ) or not once app is installed ??

Sorry for trouble. I very new to shopify API..

Backoff plugin

Feature request.

It would be great to add a plugin that understood the Shopify API limits and would intelligently block and/or retry as needed to either avoid exceeding them or retry after exceeding them. Something based on the work in the old Guzzle BackoffPlugin might work.

Laravel facade does not load the client

I'm unable to load the Client using the Laravel facade. If I change the getFacadeAccessor() method to return 'Shopify\Client' instead of 'shopify', it works fine though. Isn't the facade supposed to return the Client instead of just 'shopify'?

Session token compatibility

Hi,

This message is for those that contribute to this repo regarding embedded apps. Shopify will be migrating from cookies to session tokens, which currently is a requirement for new apps but existing apps have until Jan 1 2022. Just wanted to check if this library would be affected and if any assistance is required.

Thanks

composer installation giving errors

HI,

when trying to do give the command to the composer as

composer require shopifyextras/shopify-php-api-wrapper
i am getting the response as below,

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - shopifyextras/shopify-php-api-wrapper v1.1 requires guzzlehttp/guzzle ~5.0.3 -> satisfiable by guzzlehttp/guzzle[5.0.3] but these conflict with your requirements or minimum-stability.
    - guzzlehttp/command 0.7.0 requires guzzlehttp/guzzle ~5.0 -> satisfiable by guzzlehttp/guzzle[5.0.0, 5.0.1, 5.0.2, 5.0.3, 5.1.0, 5.2.0, 5.3.0, 5.3.1, 5.3.2, 5.3.x-dev] but these conflict with your requirements or minimum-stability.
    - shopifyextras/shopify-php-api-wrapper 1.1.1 requires guzzlehttp/guzzle ~5.0.3 -> satisfiable by guzzlehttp/guzzle[5.0.3] but these conflict with your requirements or minimum-stability.
    - shopifyextras/shopify-php-api-wrapper 1.1.3 requires guzzlehttp/command 0.7.0 -> satisfiable by guzzlehttp/command[0.7.0].
    - Installation request for shopifyextras/shopify-php-api-wrapper ^1.1 -> satisfiable by shopifyextras/shopify-php-api-wrapper[1.1.1, 1.1.3, v1.1].


Installation failed, reverting ./composer.json to its original content.
```
`
any idea how to resolve this issue.?

What exactly does it do?

Hi, can this code be run locally on Windows 10 like a dashboard allowing me to find out the status of my Customers Installed Shopify App Status? Status such as Active, accepted, pending, declined or expired?

Please advise....Thank you!

composer.json is error when "guzzlehttp/guzzle": "~6.0",

shopifyextras/shopify-php-api-wrapper 1.1.3 requires guzzlehttp/command 0.7.0 -> satisfiable by guzzlehttp/command[0.7.0].
  - shopifyextras/shopify-php-api-wrapper 1.1.3 requires guzzlehttp/command 0.7.0 -> satisfiable by guzzlehttp/command[0.7.0].
  - shopifyextras/shopify-php-api-wrapper v1.1.0 requires guzzlehttp/guzzle ~5.0.3 -> satisfiable by guzzlehttp/guzzle[5.0.3] but these conflict with your requirements or minimum-stability.
  - shopifyextras/shopify-php-api-wrapper 1.1.1 requires guzzlehttp/guzzle ~5.0.3 -> satisfiable by guzzlehttp/guzzle[5.0.3] but these conflict with your requirements or minimum-stability.
  - guzzlehttp/command 0.7.0 requires guzzlehttp/guzzle ~5.0 -> satisfiable by guzzlehttp/guzzle[5.0.0, 5.0.1, 5.0.2, 5.0.3, 5.1.0, 5.2.0, 5.3.0, 5.3.1, 5.3.2, 5.3.x-dev] but these conflict with your requirements or minimum-stability.
  - guzzlehttp/command 0.7.0 requires guzzlehttp/guzzle ~5.0 -> satisfiable by guzzlehttp/guzzle[5.0.0, 5.0.1, 5.0.2, 5.0.3, 5.1.0, 5.2.0, 5.3.0, 5.3.1, 5.3.2, 5.3.x-dev] but these conflict with your requirements or minimum-stability.
  - Installation request for shopifyextras/shopify-php-api-wrapper ^1.1 -> satisfiable by shopifyextras/shopify-php-api-wrapper[1.1.1, 1.1.3, v1.1.0].

[shopify-api-timeout error]

[31-May-2017 09:56:04 Etc/GMT] PHP Fatal error: Uncaught exception 'ShopifyCurlException' with message 'Connection timed out after 30001 milliseconds' in /home/avishopr/public_html/playground/mysqg/M-Sendy/shopify.php:117
Stack trace:
#0 /home/avishopr/public_html/playground/mysqg/M-Sendy/shopify.php(36): ShopifyClient->curlHttpApiRequest('POST', 'https://sellerb...', '', 'client_id=95c6c...', Array)
#1 /home/avishopr/public_html/playground/mysqg/M-Sendy/authorization.php(16): ShopifyClient->getAccessToken('35e185a7821981e...')
#2 {main}
thrown in /home/avishopr/public_html/playground/mysqg/M-Sendy/shopify.php on line 117

Earlier it was working. now its throwing time out error. please let me know, what change need to do

Typo in order-risk

src/resources/order-risk.php, line 24, the URI should be "/admin/orders/{id}/risks.json" (note the plural risks)

postField vs json location

I'm wondering if there was any particular reason that the postField location is used for most create/update methods instead of using json. The json location is used in all of the shopify API examples and I have found two cases where the postField location fails and the json location succeeds.

The two examples that I have come across are attempting to add multiple metafields to a product and when creating multiple images on a product. When attempting to add multiple metafields with postField I get validation errors indicating that various metafield values are missing; if I instead pass only one metafield, not an array of metafields, the single field is processed correctly. Multiple images are simply ignored.

Switching the parameter locations to json in the createProduct service definition resolves the problem. I suspect that the problem is avoided when using JSON because when the server decodes the JSON the difference between arrays and objects is clear, so it can see that a list of objects has been sent, while when decoding post fields it will all come through as arrays.

Trying to update to Guzzle V6

I have trouble understanding what this does:

https://github.com/ShopifyExtras/PHP-Shopify-API-Wrapper/blob/master/src/Client.php#L139

getEmitter() doesn't exist in V6 but does in V5.

I get this error:

PHP Fatal error:  Uncaught InvalidArgumentException: Magic request methods require a URI and optional options array in /var/www/public/api/vendor/guzzlehttp/guzzle/src/Client.php:79

Stack trace:\n#0 /var/www/public/api/src/Client.php(139): GuzzleHttp\\Client->__call('getEmitter', Array)\n#1 /var/www/public/api/src/Client.php(241): Shopify\\Client->buildClient()

#2 /var/www/public/api/index.php(54): Shopify\\Client->__call('getProducts', Array)

#3 {main}\n  thrown in /var/www/public/api/vendor/guzzlehttp/guzzle/src/Client.php on line 79

"uri" used instead of "query" for get methods

Most of the resources definitions incorrectly specify "uri" instead of "query" for the location of parameters, e.g. the standard "limit" and "page" pagination parameters. "uri" is intended for parameters which form part of the path, not part of the query string, so the end result is that these parameters are not applied. I stumbled across it with the aforementioned pagination parameters, but it looks to be widespread.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.