Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter cleared unexpectedly when adding incompatible criteria #36267

Closed
2 tasks done
kiarashi opened this issue May 29, 2024 · 3 comments
Closed
2 tasks done

Filter cleared unexpectedly when adding incompatible criteria #36267

kiarashi opened this issue May 29, 2024 · 3 comments
Labels
8.1.1 Affects versions Bug Type: Bug Faceted search Module: ps_facetedsearch FO Category: Front Office Module Module

Comments

@kiarashi
Copy link

Prerequisites

Describe the bug and add attachments

When using the Faceted Search module in PrestaShop, I encountered unexpected behavior when selecting filters. Specifically, when selecting both the "Screen Size: 16 inch" and "Screen Size: 17 inch" filters, followed by selecting the "Graphics Card: RTX4050", which is only available in 17-inch (17.3) laptops, the "Screen Size: 16 inch" filter is automatically cleared. This behavior is not desired as I expect both screen size filters to remain active even after selecting the graphics card filter.

url: https://mkshop.nl/12-laptops

Expected behavior

After selecting the 'Graphics Card: RTX4050' filter, I expect both the 'Screen Size: 16 inch' and 'Screen Size: 17 inch' filters to remain active, displaying all products with 16-inch and 17-inch screens, in addition to the selected product with the graphics card.

Steps to reproduce

  1. Navigate to the product page with laptops in the "Laptops" category.
  2. Select the "Screen Size: 16 inch" filter and "Screen Size: 17 inch" filter.
  3. Then, select the "Graphics Card: RTX4050".
  4. Observe that the "Screen Size: 16 inch" filter is automatically cleared.

PrestaShop version(s) where the bug happened

8.1.1

PHP version(s) where the bug happened

8.1.28

If your bug is related to a module, specify its name and its version

faceted search v3.15.1

Your company or customer's name goes here (if applicable).

No response

@kiarashi kiarashi added Bug Type: Bug New New issue not yet processed by QA labels May 29, 2024
@Hlavtox
Copy link
Contributor

Hlavtox commented May 29, 2024

@kiarashi The filter is automatically cleared because there is no product found that has GeForce RTX4050 6GB (15231) and Screen Size: 16 inch.

See if you only select the GPU: https://mkshop.nl/12-laptops?q=videokaart-GeForce+RTX4050+6GB+%2815231%29

Nice website BTW. ;-)

@AureRita
Copy link
Contributor

Hi @kiarashi

Thank you for your report, Currently we can't test issue on website directly, but I think @Hlavtox Find the issue,

Can you tell us if it correct your issue ?

Waiting for feedback

@AureRita AureRita added Waiting for author Status: action required, waiting for author feedback FO Category: Front Office NMI Status: issue needs more information Faceted search Module: ps_facetedsearch Module Module 8.1.1 Affects versions and removed New New issue not yet processed by QA labels May 30, 2024
@kiarashi
Copy link
Author

kiarashi commented Jun 1, 2024

@Hlavtox is right with his answer.

It seems like the AND logic is being used to filter products. Is it possible to change this to OR logic in the future? That way filters aren't automatically removed when there are no products that match all selected criteria.

This change would allow users to see products that match any of the selected filters, providing a more flexible and user-friendly search experience. For example, if both "Screen Size: 16 inch" and "Screen Size: 17 inch" are selected, along with the "Graphics Card: RTX4050" filter, users would see all products with either 16-inch or 17-inch screens, including those with the RTX4050 graphics card.

Could this feature be considered for a future update?

@PrestaShop PrestaShop locked and limited conversation to collaborators Jun 14, 2024
@florine2623 florine2623 converted this issue into discussion #36365 Jun 14, 2024
@florine2623 florine2623 removed Waiting for author Status: action required, waiting for author feedback NMI Status: issue needs more information labels Jun 14, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
8.1.1 Affects versions Bug Type: Bug Faceted search Module: ps_facetedsearch FO Category: Front Office Module Module
Projects
None yet
Development

No branches or pull requests

4 participants