Jump to content

backoffice sell/orders page build up is very slow


ebonit

Recommended Posts

when working with a lot of orders the orders list in /admin/sell/orders becomes very slow. 7 seconds in our case. I found that when I run the query without the sub query for new customer it is about 3 seconds quicker. Since we don't use that info normally like to strip that subquery from the query.

it is the method OrderQueryBuilder::getSearchQueryBuider(). Since the OrderQueryBuider class is a final class it cannot be overwritten.

The way I solved this is to use the hook actionOrderGridQueryBuilderModifier, reset the select on the querybuilder (search for resetQueryParts) and then fill in the select again.

You can remove the column from the grid with the hook ActionOrderGridDefinitionModifier. see also https://devdocs.prestashop-project.org/1.7/development/components/grid/tutorials/modify-grid-in-module/#querybuilder-configuration

see the attachment for my code

 

Scherm­afbeelding 2023-02-16 om 22.49.17.png

Edited by ebonit (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...