What is the purpose of this issue? Explain the background context.
A client of ours want to use a product attribute "derived property" which is a visual swatch and uses replace. The attribute code that is used is a visual swatch that has been translated in the backend of magento.
When using a derived property with a swatch it will look at the value that is configured in Tweakwise. This could for example be a color like "Niebieski" (polish) which means "Blauw". Once i go to the polish website this swatch does not work. The reason why is because in the function \Emico\Tweakwise\Model\Swatches\SwatchAttributeResolver::getSwatchData it compares the labels from default store which is for our client dutch to the ones that are translated in polish (which comes from tweakwise). After it shows the results which are less or 0 which should have been more according to the demo shop in tweakwise.
The other way around you could also try to use the dutch default language for the polish website and than also get the same error, because at \Emico\Tweakwise\Block\LayeredNavigation\RenderLayered\SwatchRenderer::getSwatchData you get less or 0 values of filters since the $attribute->getOptions() returns the store labels in the store you are visiting in this case polish.
I have tried to resolve a few options, but since swatches make use of the \Emico\Tweakwise\Model\Catalog\Layer\Filter class to get the option values. I either fix the ones that are in tweakwise "derived property" and than break the ones that are just filters without derived property.
It looks to me that emico tweakwise only supports the default language of options for swatches and not the store languages of options for swatches.
Environment
PHP Version: 7.4
Magento Version: 2.4.3-p1
Tweakwise Version: 4.1.1
Tweakwise Export Version: 4.0.3
Magento Deploy Mode: (production|development) both
Steps to reproduce
Create a visual swatch in magento with multiple languages that is assigned to multiple products in the same category.
Create a "derived property" of that attribute in Tweakwise using replaced
Translate a few of those values in tweakwise
Check your demo if you filter works
Check if it works in the store view that does not have the same language as default shop. For example Dutch is default store and Polish is other Store.
Actual result
On dutch you do see filter options for swatches and in polish you don't see a swatch.
Issue Brief
What is the purpose of this issue? Explain the background context. A client of ours want to use a product attribute "derived property" which is a visual swatch and uses replace. The attribute code that is used is a visual swatch that has been translated in the backend of magento.
When using a derived property with a swatch it will look at the value that is configured in Tweakwise. This could for example be a color like "Niebieski" (polish) which means "Blauw". Once i go to the polish website this swatch does not work. The reason why is because in the function \Emico\Tweakwise\Model\Swatches\SwatchAttributeResolver::getSwatchData it compares the labels from default store which is for our client dutch to the ones that are translated in polish (which comes from tweakwise). After it shows the results which are less or 0 which should have been more according to the demo shop in tweakwise.
The other way around you could also try to use the dutch default language for the polish website and than also get the same error, because at \Emico\Tweakwise\Block\LayeredNavigation\RenderLayered\SwatchRenderer::getSwatchData you get less or 0 values of filters since the $attribute->getOptions() returns the store labels in the store you are visiting in this case polish.
I have tried to resolve a few options, but since swatches make use of the \Emico\Tweakwise\Model\Catalog\Layer\Filter class to get the option values. I either fix the ones that are in tweakwise "derived property" and than break the ones that are just filters without derived property.
It looks to me that emico tweakwise only supports the default language of options for swatches and not the store languages of options for swatches.
Environment
Steps to reproduce
Actual result
Expected result