mmsh Posted October 6, 2014 Share Posted October 6, 2014 (edited) hi, here prestashop 1.4.x i don't know what's the problem i had 100.000 old disabled products that i want to show now in some categories as historical archive only... moved correctly these 100.000 products to 10 categories about 10.000 products each one (ps_product and ps_category_product correctly edited) while the actual products load normally, these products are regularly shown on frontend categories with photo, title and price BUT when i try to load the product page nothing happens and it does an eternal load without showing the correct page... it never ends to load the page what's the problem? too many products (10.000) in one category? ps_product and ps_category_product tables are not enough to show the product page? something else to change? these products have active = 1 on ps_product thanks Edited October 6, 2014 by mmsh (see edit history) Link to comment Share on other sites More sharing options...
mmsh Posted October 7, 2014 Author Share Posted October 7, 2014 (edited) tried to split in 40 categories by 2500 products each one and the matter is better... but always more than 10-15 seconds to load the page. The previous untouched and newer products don't make delay... max 2-3 secs and the pages are robust in coding...quite complex why this weird behavior? maybe is there an ideal limit to number of products inside each category? can be also related to mysql config? my server has 16GB of Ram... thanks Edited October 7, 2014 by mmsh (see edit history) Link to comment Share on other sites More sharing options...
musicmaster Posted October 7, 2014 Share Posted October 7, 2014 Do you use layered navigation? That might take a lot of time with so much product. You can switch on DEBUG_PROFILING in your defines.inc.php file to see which query takes so much time. Link to comment Share on other sites More sharing options...
mmsh Posted October 8, 2014 Author Share Posted October 8, 2014 (edited) thank you for your reply... no, i don't use layered.... and not only, in the product page there isn't neither a block categories....anyway i will do this Profiling soon... in a nutshell.... i would like to let customers view a separate section where there are all the products shown on my site over time and up to the last year...because this means to have so many more visible links in splitted sitemaps... obviously they will have available_for_order = 0 so customers can't add them to cart and i will dynamically append to the product title something like "NOT AVAILABLE FOR ORDER ATM" but what's the best method to do it? is possible to copy something like new-products.php and use it for old products? and how to do it if they are deactivated (active = 0 )... ? i know mysql but it's difficult to connect it to prestashop for something like this... 1) something like new-products.php BUT for all deactivated products 2) how to show products pages even if deactivated ? 3) check if deactivated, then enable to let it be shown and then immediately deactivate again? 4) activate ALL old products (indeed not possible IF they remain on their own original categories 'cause it would be a mess) but set them not available_for_order? 5) could be an issue on the ps_database about indexes ? i have ps 1.4.3/4 and mysql 5.5... can i copy some queries from version 1.4.11 and what queries ? OR is there an easy way? Edited October 8, 2014 by mmsh (see edit history) Link to comment Share on other sites More sharing options...
musicmaster Posted October 8, 2014 Share Posted October 8, 2014 If you want to have the display similar to New Products you could make a copy of that module and rename is something like Old Products. But that would include making some changes in the files too so you will need to learn a little bit about modules. The next step is finding out how the query is made. This basically means following how the code runs. You will see that newproducts calls Product::getNewProducts. You can find that function back in the file classes\Product.php. That function contains a sql statement. So you should copy that function and name the new version something like getOldProducts and change its sql. You could make it nicer by using overrides. Link to comment Share on other sites More sharing options...
Recommended Posts