patrmich Posted November 16, 2015 Share Posted November 16, 2015 Hi,My shop is built with Prestashop 1.5.6.2.1- When I want to create an order from the admin panel, I face the following problem :- the search for a product is slow.2- In the same way, when I want to add a product to a supply order, the search for a product is slow.I have in my database around 3000 products. With their attributes, there are about 40 000 entries in the ps_product_attribute table.On the FO, the search for a product is fast.On the BO, the search for a product in the header search box is fast as well.Is there any way to improve the search speed when adding a product to a customer order or to a supply order from the BO ?Thank you in advance for any help.Patrick Link to comment Share on other sites More sharing options...
tuk66 Posted November 17, 2015 Share Posted November 17, 2015 The reason is that the Product::searchByName function is used for this. It is fine for small amount of products only. This function doesn't use indices and searches in 10 fields at once. It can't be fast! Link to comment Share on other sites More sharing options...
patrmich Posted November 17, 2015 Author Share Posted November 17, 2015 Hi tuk66, Thank you for your kind reply. 1- Adding a product to an order from the FO : As I have no really need to search by Name, would it be possible to amend the function to search by product reference ? In this case what files would need to be amended ? Is it controllers/admin/AdminOrdersController.php ? What would be the code to change ? It seems to me that when a product has been searched at least one time, the next search (even on another computer) is faster. Is this observation reliable ? If it is what could cause this speed improvement ? 2- Adding a product to a supply order : Would you know what could improve the product search ? Thank you in advance for any reply. Patrick Link to comment Share on other sites More sharing options...
tuk66 Posted November 18, 2015 Share Posted November 18, 2015 I don't know answers. It is about reading the code and serious work. I mean it will take hours (and maybe days) instead of minutes. Now, I know just one thing - searching in FO uses search index and it is completely different than searching in BO. 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