jazkarta / jazkarta.shop

A web-based shop for Plone
GNU General Public License v2.0
4 stars 2 forks source link

More efficient mechanism for fetching/batching orders in the control panel #77

Closed alecpm closed 2 years ago

alecpm commented 2 years ago

The prior implementation retrieved all orders and then sorted them before filtering them by date. This implementation retrieves only the keys (which include a date), filters and sorts those keys, and then provides a lazy list implementation for retrieving the order items which can be used for batching.

This will also require some changes to jazkarta.pfg.jazshop which imports and uses the private _fetch_orders() function.

alecpm commented 2 years ago

This also incorporates the pick-a-date date picker switch from issue #70 (PR #75)

alecpm commented 2 years ago

See jazkarta/jazkarta.pfg.jazshop#2 for related updates to that package.

alecpm commented 2 years ago

@fulv Is that happening on your local instance when using this branch?

alecpm commented 2 years ago

@fulv I've fixed the issue causing the 404. For some reason on NCI view/__name__ was throwing an attribute error. That's not a change that I introduced, but it may have been added on master at some point. It was also breaking the shipping control panel, but it should be working now.

I've deployed the changes to staging and it seems to be performing quite well there.

alecpm commented 2 years ago

Oddly, I didn't see that view/__name__ issue when testing on my local copy of NCI staging (just pulled this morning), but it did happen on staging. Very strange.

jessesnyder commented 2 years ago

Order filtering & speed, and CSV download all working well for me now.