Let's assume I have a category, Clothing and this category have a sub-category, T-shirts.
Now I add a product to the T-shirts category (by checking the box in the add product screen), but I don't check the Clothing category. So, I assumed this meant that the product would only appear in the T-shirts category on the front end, and not in the parent category Clothing.
However, the product appears in the Clothing and T-shirt categories.
This is a problem because the T-shirt category is an "Include in navigation menu" > No category, i.e. It is supposed to be hidden. All the products in the category have visibility of catalog, so they don't appear in search results.
I've investigated this quite deeply so far and have found that the problem is with the Magento catalog indexing. Running the Category Products indexer from System > Index Management rebuilds the index, running
This function SELECTs various data from several category-related tables and pipes it into the catalog_category_product_index table, which is the table used to generate the products collection for the category pages.
Does anyone have any suggestions as to how to hide/prevent products from sub-categories appearing in their parent categories?
I'm using Magento 18.104.22.168. The Clothing category is set to Anchor and the T-shirts category is not. Use flat category is set to yes.