Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order data problem with OrderManager and Pagination #103

Open
MicahKV opened this issue Sep 6, 2021 · 2 comments
Open

Order data problem with OrderManager and Pagination #103

MicahKV opened this issue Sep 6, 2021 · 2 comments

Comments

@MicahKV
Copy link

MicahKV commented Sep 6, 2021

Hello, thank you for providing this integration! I have encountered an unusual situation where order data is not being returned for a particular shop. I am using this to fetch paginated orders:

$pagination = $client->getOrderManager()->paginate($params);
$orders = $pagination->current($pageCode);

This works for most shops, but I have one shop for which $orders is coming back as an empty array. In trying to identify the problem, I added an ECHO to the createRequest() function in Client.php on line 342 just before it returns the response:

echo((string)$body);

This produces the expected output for most shops:

{"count":53}{"orders":[{"id":...}]}

But this is the output for the problem shop:

{"count":47}{"orders":[]}{"orders":[{"id":...}]}

In this case, there are 2 orders[] arrays shown, the first being empty and the second being populated. This only seems to be an issue with pagination, using the order manager without pagination is successfully returning the order data from the problem shop:

$orders = $client->getOrderManager()->findAll($params); // This is working

Any idea what could cause this problem when using pagination? Is there anything I can do to resolve it?

@slince
Copy link
Owner

slince commented Sep 9, 2021

Hello, can you provide your shop domain and a valid access token? Please email me: [email protected]

@MicahKV
Copy link
Author

MicahKV commented Sep 9, 2021

Unfortunately I cannot, it was a client's shop and they uninstalled my app shortly after I posted this. I will follow up if I encounter the issue again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants