Smile-SA / magento2-module-retailer-offer

Retailer Offer Module for Retailer Suite
6 stars 24 forks source link

The getProductCount method on category may return a wrong number #59

Closed delyriand closed 3 years ago

delyriand commented 3 years ago

Preconditions

Magento Version : 2.4.2 CE

Module Retailer Offer Version : 1.7.0

Environment : Developer

Third party modules : retailer suite + retailer inventory

Steps to reproduce

  1. Create a custom block with a list of categories and in your foreach call the getProductCount method
  2. Add your custom block in the category view page
  3. Display the category page

Expected result

  1. Your custom block with the right number of products in the categories
  2. The list of products with the products attached to the displayed category

Actual result

  1. The list of products displays products which are not attached to the category

The problem comes from the CategoryPlugin the collection is retrieved via the layer