I have a problem with the product count inside frontend category view.

The amount of products shown here are different then the ones in the backend.
enter image description here

I was wondering what the problem could be.

Any help would be appreciated.

So I've tried to turn the anchor off as suggested in the comments below

If i change anchor from yes to no the backend still shows 411 items but the frontend suddenly shows only 284 instead of 411. I've looked into this and it seems it looks to if the product is active or not and if product is in stock.

Further searching and debugging, I found out that indeed the anchor is taking the sub-category products that are in stock and active will be shown in the category view.

  • Did you try reindexing? Also refresh your cache. Commented May 17, 2017 at 15:26
  • I did, multiple times, the index runs every 2 hours. And cache is emptied more times then I can count.
    – Myron
    Commented May 17, 2017 at 16:29
  • 1
    Is the frontend also including products from sub-categories? This is the behaviour if the category is set as an "Anchor" category.
    – BlueC
    Commented May 17, 2017 at 19:31
  • Thank you @BlueC, the anchor option (and sub-categories) is indeed the reason why the product count is larger then the original category.
    – Myron
    Commented May 18, 2017 at 7:56

3 Answers 3


If the category is set as an "Anchor" category then the frontend count will include all products within that category and its subcategories. The backend count will only include products directly within that category.

This explains why the frontend count is larger.


It might be because some of the products are not visible on the front end, perhaps out of stock, etc.

The backend count just means that there are 487 products assigned to a particular category.

The frontend count means that there are 411 products that can be displayed on the frontend.

Perhaps check a product that you can't see on the frontend - is the qty 0? is it set to out of stock, or not visible? Perhaps it's disabled?


I have faced the problem after migration from magento 1.9 to 2.1, i have showed only 499 products from the 35000 products.

Solution : Step 1: I have take the backup of the url_rewrite table. Step 2: run the query , update url_rewrite set store_id='0' Step 3: run redindex command step 4: again run the query 'update url_rewrite set store_id='1' After this all products show with correct counting. ITs help me to resolve the issue.

  • The only step that mattered here might be Step 3: run redindex command step. Commented Feb 21, 2018 at 10:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.