maestrobo Posted September 22, 2020 Share Posted September 22, 2020 (edited) Hi there, Just wanted to share my findings. PS 1.7 is very slow on the categories Page. Tested on 1.7.6.7 I have found it why. It is because of the little info about the "TOP CATEGORIES". I found the culprit, it was a SQL query that was taking too much time. It is in controllers/admin/AdminStatsController.php Look for top_category and comment the section. You will speed really fast your categories page. case 'top_category': /* if (!($id_category = AdminStatsController::getBestCategory( date('Y-m-d', strtotime('-1 month')), date('Y-m-d') ))) { $value = $this->trans('No category', array(), 'Admin.Stats.Feature'); } else { $category = new Category($id_category, $this->context->language->id); $value = $category->name; } ConfigurationKPI::updateValue('TOP_CATEGORY', array($this->context->language->id => $value)); ConfigurationKPI::updateValue( 'TOP_CATEGORY_EXPIRE', array($this->context->language->id => strtotime('+1 day')) ); */ break; I have reported the bug: https://github.com/PrestaShop/PrestaShop/issues/21106 Edited September 22, 2020 by maestrobo (see edit history) 1 Link to comment Share on other sites More sharing options...
cristic Posted November 15, 2022 Share Posted November 15, 2022 I had the same problem and this fixed the issue. Having a lot of orders in the DB, AdminStatsController::getBestCategory would run for a very long time. 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