3

I have assigned more than 30k products to one category in my website, but when i visit that category on frontend it is shwoing only 10000 products on the category list page.

In admin panel the count is 32500 for that category. Why it is not showing accurate count? Is there any setting to for setting the limit.?

Please someone advise me.

4 Answers 4

2

By Default magento2 show 10,000 Products in category. if you have more than 10k products in your category then you have to change the size in search_request.xml file :

Creating custom module to override the search_request.xml file. i have attached custom module Download

1
0

Magento\Catalog\Model\Indexer\Category\Product\AbstractAction

RANGE_CATEGORY_STEP constant from 500 to 5000;

now run the indexers. Now it should show the correct count.

4
  • Please update me full code, we need to override this file is it? can you update me code for plugin or something else Oct 1, 2018 at 11:54
  • first check directly. is this working or not ?
    – Divyesh
    Oct 1, 2018 at 11:55
  • I changed directly and reinndex also i done but its same again Oct 1, 2018 at 12:02
  • okay this is not working code..sorry
    – Divyesh
    Oct 1, 2018 at 12:14
0

Try the following:

File: /vendor/magento/module-catalog/Model/Indexer/Category/Product/AbstractAction.php

Line number approx: 379

Change this code:

protected function isRangingNeeded()
{
    return true;
}

to:

protected function isRangingNeeded()
{
    return false;
}

Then do the reindexing and check the frontend again.

1
  • yes tried it, but no effect after reindex also Oct 1, 2018 at 13:28
0

This is Magento's core bug and it's already fixed in magento2.2 version

if you are using below 2.2 version then follow this link

Hope this will help you, to increase count into Magento\Catalog\Model\Indexer\Category\Product\AbstractAction class is not the proper solution at all.

Here is also posted same question

3

Your Answer

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

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