PrestaShop stores, in which categories were added or removed or modules were enabled for automatic and mass edition of categories and products, have often corrupted structure which describes the depth of categories (category depth).
An incorrect category and subcategory depth is manifested through an incorrect display of a breadcrumb and mixed display of categories in external modules. Such situation occurs due to, among others, an incorrect data import, module errors for mass edition of products and categories or due to moving subcategories between categories.
In order to fix the structure of categories and their depths you have to log in to PrestaShop 1.6 database by using e.g. phpMyAdmin and to perform the following request:
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 be correctly displayed.
Get in touch if you need help with expanding and handling your PrestaShop. We’ll help :-)