SyliusElasticsearchPlugin icon indicating copy to clipboard operation
SyliusElasticsearchPlugin copied to clipboard

Same Attributes on multiple taxons brings to many filter values per taxon

Open TELLO0815 opened this issue 6 years ago • 2 comments

We use same attributes for multiple taxons. Like for fixtures... Im sure if you sell t-shirts it is o.k. to see all the time all values from the attributes (Like Size S, M, L). And if you filter by S you may get "not items". But in our case is this a problem. We want to show only the attribute values from this taxon im in. I think there must be a option about this behavior.

TELLO0815 avatar Aug 25 '19 07:08 TELLO0815

This problem is very actual. Maybe you have any decision?

shurco avatar Apr 15 '20 19:04 shurco

I solved it by:

\Repository\ProductAttributeValueRepository.php \RepositoryProductAttributeValueRepositoryInterface

added getUniqueAttributeValuesByTaxon function to filter attributes that only in current taxon (including sub taxon)

\Form\Type\ChoiceMapper\ProductAttributesMapper.php

call getUniqueAttributeValuesByTaxon instead

\Form\Type\ProductAttributesFilterType.php

due to the changes on ProductAttributesMapper, ProductAttributesFilterType required to update

jcgdjob avatar Jun 30 '20 08:06 jcgdjob