ebonit Posted February 16, 2023 Share Posted February 16, 2023 (edited) 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 Edited February 16, 2023 by ebonit (see edit history) 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now