0

I am using Magento 2.2.7. From Admin panel product page shows more than 70k records. But when I try to get product count in a block by

$collection = $this->_productFactory->create()->getCollection()->count();

it shows only 10k count. Why the missmatch come?

1 Answer 1

1

Try This :-

$productCount = count($this->_productFactory->create()->getCollection()->getData());
1
  • How I set in _prepareCollection() since only collection doesnot give all the rows. Commented Apr 12, 2019 at 8:42

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.