0

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.
Frontend:
Frontend
Backend:
enter image description here

I was wondering what the problem could be.

Any help would be appreciated.

Edit:
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. – Jaimin Sutariya May 17 '17 at 15:26
  • I did, multiple times, the index runs every 2 hours. And cache is emptied more times then I can count. – Myron May 17 '17 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 May 17 '17 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 May 18 '17 at 7:56
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.

|improve this answer|||||
3

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?

|improve this answer|||||
0

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.

|improve this answer|||||
  • The only step that mattered here might be Step 3: run redindex command step. – Binod Kalathil Feb 21 '18 at 10:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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