reverbdotcom / reverb-magento

Magento 1.x plugin for syncing with Reverb
Other
7 stars 10 forks source link

Order sync does not handle pagination #188

Closed skwp closed 8 years ago

skwp commented 8 years ago

If you execute an order retrieval, it will only return 24 results per page by default. Additional pages are indicated by the presence of the _links.next.href element. Anyone who has more than 24 orders per sync will be affected by this. High volume sellers are likely to be affected by this and it will be made worse by #186 if we start reaching back to longer timeframes as we will get only the early orders and not the ones that came later.

Correct implementation

  1. fetch the first page of orders
  2. if _links.next.href is present, fetch that link to get the next page
  3. keep going until the link is not present
dunagan5887 commented 8 years ago

"if _links.next.href is present, fetch that link to get the next page"

I assume that means that _links.next.href will be a url, and that url should be the URL which the "next" order retrieval call is made to?

skwp commented 8 years ago

correct

skwp commented 8 years ago

i added a bunch of orders to the sandbox