Jump to content

Edit History

ebonit

ebonit

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

ebonit

ebonit

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. 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.40.37.png

ebonit

ebonit

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

see the attachment for my code

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

ebonit

ebonit

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 OrderQuieryBuilder::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

see the attachment for my code

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

×
×
  • Create New...