Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

Problem with filtering by various attributes #333

Open
2 tasks
alinadivante opened this issue Apr 22, 2020 · 3 comments
Open
2 tasks

Problem with filtering by various attributes #333

alinadivante opened this issue Apr 22, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@alinadivante
Copy link

alinadivante commented Apr 22, 2020

Current behavior

When the user tries to filter the results with another attribute, he gets more results instead of limiting them to the selected parameters.

filter

And color tiles in the filter are not visible ..
image

Expected behavior

User should receive results consistent with the selected attributes in the filter (yellow, size xxx, price 50-100).

Steps to reproduce the issue

  1. Go to e.g Women category
  2. Open filter
  3. Choose color
  4. Choose size
  5. Choose price

Can you handle fixing this bug by yourself?

  • YES
  • NO

Environment details

  • Browser:
  • OS:
  • Code Version:

Additional information

@alinadivante alinadivante added the bug Something isn't working label Apr 22, 2020
@psmyrek
Copy link
Contributor

psmyrek commented Apr 23, 2020

Regarding the first problem in this issue with number of products matching selected filters: Capybara uses product_count property from received response from Magento - each category in Magento has assigned a number of products that belongs to them - but it looks like this number is not related with "real" number of products. Using product_count seems to be the only way we have to show number of products in Filter sidebar and this invalid number can't be fixed in Capybara.

Regarding the second problem with colors: unfortunately the color codes we are receiving from Magento for some example category are as follows:

[
  {"id":"51","label":"51","type":"color","count":"","color":"51"},
  {"id":"52","label":"52","type":"color","count":"","color":"52"},
  {"id":"53","label":"53","type":"color","count":"","color":"53"},
  {"id":"56","label":"56","type":"color","count":"","color":"56"},
  {"id":"57","label":"57","type":"color","count":"","color":"57"},
  {"id":"59","label":"59","type":"color","count":"","color":"59"},
  {"id":"60","label":"60","type":"color","count":"","color":"60"},
  {"id":"49","label":"Black","type":"color","count":"","color":"Black"},
  {"id":"50","label":"Blue","type":"color","count":"","color":"Blue"},
  {"id":"58","label":"Red","type":"color","count":"","color":"Red"}
]

For some of them there are meaningless numbers rather than strings (color names), and these numbers can't be converted to equivalent color names, because they are configured in Magento in that way. I'm not sure how to fix/improve this issue.

It would be nice to hear a second opinion from @qiqqq or @gibkigonzo 😏

@fveracoechea
Copy link

fveracoechea commented Jul 2, 2020

@psmyrek regarding to the color codes I fixed it by setting this config entities.attribute.loadByAttributeMetadata to false on the local.json

@enzo-vezzaro-eleva
Copy link

enzo-vezzaro-eleva commented Apr 6, 2021

Hi guys, do you have any news about this? I'm having the same issue. I've tried to set entities.attribute.loadByAttributeMetadata to false on the local.json, but I'm still getting only the ID's of the filter.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants