pblanc Posted October 24, 2010 Share Posted October 24, 2010 Hi there,I have 100 parents categories. In each, something like 3000 subcategories. I did not imported the products yet because just after imported the categories (around 35000) , the application is tooooo slow (A few minutes to load the home page)How to deal with mass categories and product with prestashop ?Regards, Link to comment Share on other sites More sharing options...
rocky Posted October 25, 2010 Share Posted October 25, 2010 PrestaShop's category block doesn't handle loading many categories very well. What it does is load all 3000 categories, then hides all but the top-level ones using Javascript. Obviously, loading 3000 categories is going to take a long time. I've written a module here that loads only the top-level categories, then dynamically loads the subcategories using AJAX only when needed. For sites with lots of subcategories, this dramatically improves the load time of the website.If you are looking for a free module instead of a paid module, try this one. Link to comment Share on other sites More sharing options...
pblanc Posted October 25, 2010 Author Share Posted October 25, 2010 Thanks you very much for your reply :-)I will test it ASAP Link to comment Share on other sites More sharing options...
pblanc Posted October 25, 2010 Author Share Posted October 25, 2010 I just buy your module. It woks like a charm. Do you plan to insert it in the backoffice because there is the same issue when you want to assign a category for a product ? Link to comment Share on other sites More sharing options...
tomerg3 Posted October 25, 2010 Share Posted October 25, 2010 Have you thought about re-designing your category structure, having 35,000 is not practical at all, I can't think of any good reason to have so many categories in your shop. Link to comment Share on other sites More sharing options...
pblanc Posted October 25, 2010 Author Share Posted October 25, 2010 I have 100 categories and inside each 3500 sub categories. So it is not exactly 35000 categories but 100x3500 Link to comment Share on other sites More sharing options...
tomerg3 Posted October 25, 2010 Share Posted October 25, 2010 Even 3,500 is way too much, I don't know what you are selling or why you need so many categories, but there must be a better way to organize your product without using so many categories. Link to comment Share on other sites More sharing options...
rocky Posted October 26, 2010 Share Posted October 26, 2010 I've had many requests to ajaxify the categories in the "1. Info." tab of the product editor. The problem is that there must be a checkbox for every category so that all the categories are posted and saved. If I only load the top-level categories, then only the top-level categories will be saved. I suppose I could load all the categories using AJAX so that the whole page loads first, then the categories are loaded. It would still take a long time to load the page though. How about if I hide all the categories by default and add a "Show categories" link that loads them all? That would speed up the load time when you want to edit a product without changing its categories. You'd still have to click the link and wait a long time for the categories to load if you wanted to change categories though. Link to comment Share on other sites More sharing options...
pblanc Posted October 26, 2010 Author Share Posted October 26, 2010 How about if I hide all the categories by default and add a "Show categories" link that loads them all? That would speed up the load time when you want to edit a product without changing its categories. You'd still have to click the link and wait a long time for the categories to load if you wanted to change categories though. Yes, it will be a good thing in a first time.In a second time, what about generate the form on the fly with ajax :First, the form will contain a check box for the mains categories and if you click on one of the main category, the form will be regenrated with categories inside ? Link to comment Share on other sites More sharing options...
rocky Posted October 26, 2010 Share Posted October 26, 2010 The problem with that is that if you have selected a subcategory that is hidden, then click Save, you will lose the product from that category, since the checkbox doesn't exist. I suppose I could automatically expand all levels that have a box ticked. Link to comment Share on other sites More sharing options...
tomerg3 Posted October 26, 2010 Share Posted October 26, 2010 I still don't see a reason to have 3,500 categories, except for bad design...I may be wrong, but it seems like way way too much. Link to comment Share on other sites More sharing options...
Lenc Posted November 1, 2010 Share Posted November 1, 2010 What about module where you can sort multiple articles into categories?So you can put 10 or 100 aritcles at the same time to category that it belongs.I have it for oscommerce but I cant find it for PS.. Link to comment Share on other sites More sharing options...
maniakpresta Posted November 5, 2010 Share Posted November 5, 2010 :question: In some cases, you need to have 15000 Categories (car model year).This makes the admin page edit product to have 15000 rows and having 80 sec load time in each productCould you display the tree as category same module Categories block menu as in magentoWith the existing way view the tree in admin, the prestashop will no have future!!! Link to comment Share on other sites More sharing options...
Recommended Posts