Magento2: Wrong count on category page with out-of-stock products

Created on 30 Nov 2016  路  9Comments  路  Source: magento/magento2


Preconditions


  1. Magento EE 2.1.2
  2. PHP 5.6.26
  3. MySQL 5.0.11

Steps to reproduce

  1. Set a product as out-of-stock
  2. Go to a category page where that product usually shows up

Expected result

  1. The result count should be equal to the number of products listed in that category.

Actual result

  1. The result count (Magento_Catalog/templates/product/list/toolbar/amount.phtml) is one larger than the true count -- it counts the out-of-stock product even though this product is not listed.

Catalog Cannot Reproduce Clear Description Format is valid bug report

All 9 comments

5670

Same issue but with disabled products. If disabled product is in sub category, it is counted in the shop by sub category listing (all non anchor) when viewing parent category. Temporary workaround for me is to remove all disabled products from all categories.

Seeing this in 2.1.3. It's causing additional pages to be shown which then say that no products can be found in them.

@thdoan Is this issue still actual? We were not able to reproduce it on ver. 2.1.7.

Magento 2.1.7 CE the issue is still exist.

This is marked as needing update. What more do you need to be able to reproduce this on 2.1.7? Have you tried with out of stock and disabled products?

The situation where we see this most is when there is one page worth of products visible but an out of stock product in the category - this will then display two pages, but clicking on the second page shows an empty page. This is confusing customers.

Please add screenshots of the problem.

@thdoan, thank you for your report.
We were not able to reproduce this issue by following the steps you provided. If you'd like to update it, please reopen the issue.
We tested the issue on 2.1.9

Can anyone confirm if this is fixed in 2.1.9?

Was this page helpful?
0 / 5 - 0 ratings