PrestaShop stores that have been adding and removing categories or running modules for automatic and mass editing of categories and products often have a messed up structure describing category depth (category depth).
Incorrect category and subcategory depth manifests itself in incorrect breadcrumb display and mixed category display in external modules. It happens, among other things, through incorrect data import, errors in modules for mass editing of products and categories or moving subcategories between categories.
To fix the structure of categories and their depth, log in to the PrestaShop 1.6 database using, for example, phpMyAdmin and execute the following query:
UPDATE `ps_category` c1
INNER JOIN `ps_category` c2 ON (c2.`id_category` = c1.`id_parent`)
SET c1.`level_depth` = c2.`level_depth`+1;
The effect will be visible immediately. Categories and subcategories will display correctly.
If you need help with the development and operation of your PrestaShop - contact us. We will help you :-)