Closed skwp closed 7 years ago
I believe the correct algorithm would be:
IF the user has "Paid Orders Awaiting Shipment" setting
IF the user has the All Orders setting,
Yes we have this same issue after most recent update. Set to "Paid Orders Awaiting Shipment" still downloading unpaid pending orders. Do you have a fix for this?
We are working on a fix, when we have one we'll close this issue and make a release. Thanks.
@skwp For this update, I am assuming that if the user has "Paid Orders Awaiting Shipment" setting, and an order is "unpaid", the task should be set to "Complete" or "Aborted", and should not be executed again, correct? Once the order becomes paid, a new Order update will be created in the Reverb system which the Magento system will retrieve via the API, correct?
Yes once the order is paid it will be processed during update. The task should be set to Complete unless we have a way to mark it ignored which is a bit more clear.
@skwp In your first algorithm above, you noted
on update, poll the endpoint (still using the "all" endpoint as we do want all updates)
However, one of the specifications of the system is that if the user has set the "Which orders should sync from Reverb?" setting to "Paid Orders Awaiting Shipment", then the endpoint is NOT the all endpoint, but is rather the endpoint given below
/api/my/orders/selling/awaiting_shipment?updated_start_date=%s
Should this still be the case? Or should we refactor the system to poll the "All" endpoint regardless of that setting? The "All" endpoint is given below:
/api/my/orders/selling/all?created_start_date=%s
So the problem is:
Got it
Fixed in #269
I believe we may have introduced a bug in https://github.com/reverbdotcom/reverb-magento/pull/256 because we are now creating orders when they come in on an update.
Here's the bug
These statuses: unpaid/pending_review/blocked should not cause order creation if the user has set his sync to be only for orders Awaiting Shipment
How to fix
I believe the correct algorithm would be:
IF the user has "Paid Orders Awaiting Shipment" setting
IF the user has the All Orders setting,