From aac0375e7fd8649860fcdd94d8e6cd691e902ef5 Mon Sep 17 00:00:00 2001 From: mschamp <34092708+mschamp@users.noreply.github.com> Date: Wed, 22 Dec 2021 10:32:50 +0100 Subject: [PATCH] Close #19673 order categories based on count of elements --- htdocs/product/index.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/product/index.php b/htdocs/product/index.php index 082e8a4d8d2..e4c81f9fd8c 100644 --- a/htdocs/product/index.php +++ b/htdocs/product/index.php @@ -225,6 +225,7 @@ if (!empty($conf->categorie->enabled) && !empty($conf->global->CATEGORY_GRAPHSTA $sql .= " WHERE c.type = 0"; $sql .= " AND c.entity IN (".getEntity('category').")"; $sql .= " GROUP BY c.label"; + $sql .= " ORDER BY nb desc"; $total = 0; $result = $db->query($sql); if ($result) {