Trying to find a service method to GetAllOrders or at least All Finalized Orders not processed yet. But I only seem to be able to GetAllOrders with known ids.
The idea is to make a custom dashboard in the backoffice so I can list some of the custom properties.
Hi Matt, I'm actually using the code above to get all the "active" orders, but we have 700+ non-finalized orders and the method results to be very slow (4-5 seconds). Do you have any suggestion to improve the search?
var orders = _orderService.SearchOrders((x) => x
.FromStore(storeId)
.AndNot(x.IsFinalized()), 1, int.MaxValue).Items;
I'd suggest going through the Vendr DB tables and adding indexes on all the connected order entities (discounts, price adjustments etc) as this is likely the issue.
We'll be adding indexes in an upcoming release as we've done some tests on them now to know the have benefit.
Basically anywhere order ID is used as a foreign key, add a db index on them.
Getting all unprocessed Orders?
Trying to find a service method to GetAllOrders or at least All Finalized Orders not processed yet. But I only seem to be able to GetAllOrders with known ids.
The idea is to make a custom dashboard in the backoffice so I can list some of the custom properties.
Maybe: GetOpenOrdersForAllCustomers(storeid)
Hey Marcus,
For that you'll need to use the
SearchOrders
method. Something like this should get you what you want I think.Hi Matt, I'm actually using the code above to get all the "active" orders, but we have 700+ non-finalized orders and the method results to be very slow (4-5 seconds). Do you have any suggestion to improve the search?
HI Michele,
I'd suggest going through the Vendr DB tables and adding indexes on all the connected order entities (discounts, price adjustments etc) as this is likely the issue.
We'll be adding indexes in an upcoming release as we've done some tests on them now to know the have benefit.
Basically anywhere order ID is used as a foreign key, add a db index on them.
is working on a reply...