Skip to content

Order data problem with OrderManager and Pagination #103

@MicahKV

Description

@MicahKV

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions