Prestashop: faceted search 2.2.1 doesn't show results with color/ patterns of Attributes 0 Stock. PS 1.7.5

Created on 14 Jan 2019  路  5Comments  路  Source: PrestaShop/PrestaShop

When you filter color/pattern attributes, the module doesn't show results of combinations out of stock.

Reproduce

  • PS 1.7.5 clean or old installation
  • faceted search update from 2.2.0 to 2.2.1
  • sample products change a combination to stock 0
Bug FO Faceted search Fixed Major

Most helpful comment

I think we can edit the code for this issue:
ps_facetedsearch/ps_facetedsearch.php (approx line 1423)

ON (sa.id_product_attribute= pac.id_product_attributeAND sa.quantity> 0)

Replace it with:
ON (sa.id_product_attribute= pac.id_product_attributeAND sa.quantity>= 0)

All 5 comments

Hi @pdkey,

Thanks for your report.
I manage to reproduce the issue with PS1.7.5.0 & ps_facetedsearch v2.2.1.
Before the upgrade with Color "Yellow" => it is displayed ( ps_facetedsearch v2.2.0)
image
After the upgrade, the "Attribute filter "Yellow" is displayed with a wrong result ( ps_facetedsearch v2.2.1)
image
This issue is related to this ticket: https://github.com/PrestaShop/PrestaShop/issues/10018
It is caused by this PR: https://github.com/PrestaShop/ps_facetedsearch/pull/43
We will see how to fix it.
Thanks!

I think we can edit the code for this issue:
ps_facetedsearch/ps_facetedsearch.php (approx line 1423)

ON (sa.id_product_attribute= pac.id_product_attributeAND sa.quantity> 0)

Replace it with:
ON (sa.id_product_attribute= pac.id_product_attributeAND sa.quantity>= 0)

Hi @dineshbadrukhiya,

Would you be willing to make a pull request on GitHub with your code suggestion?
https://github.com/PrestaShop/ps_facetedsearch
Thank you!

@khouloudbelguith I will open PR for this fix.

This issue is fixed with the 3.0.0 version of the module Faceted search.

Was this page helpful?
0 / 5 - 0 ratings