EmicoEcommerce / Magento2AttributeLandingTweakwise

Use Magento 2 landing pages with Tweakwise navigator
Other
0 stars 2 forks source link

Duplicate facets in listing in admin #30

Closed bramstroker closed 5 months ago

bramstroker commented 6 months ago

For one of our clients the new facet selecting is not working correctly.

Ajax endpoint /tweakwise/ajax/facets/category/5?isAjax=true Is returning:

{
    "data": [
        {
            "value": "ae-hoofdmaat",
            "label": "Maat"
        },
        {
            "value": "color_group",
            "label": "Kleur"
        },
        {
            "value": "full_size",
            "label": "Boordmaat"
        },
        {
            "value": "dessin",
            "label": "Dessin"
        },
        {
            "value": "sublabel",
            "label": "Label"
        },
        {
            "value": "full_size",
            "label": "Size"
        },
        {
            "value": "ae-hoofdmaat",
            "label": "Gr\u00f6\u00dfe"
        },
        {
            "value": "color_group",
            "label": "Farbe"
        },
        {
            "value": "full_size",
            "label": "Gr\u00f6\u00dfe"
        },
        {
            "value": "tw_other",
            "label": "Other (text field)"
        }
    ]
}

For example color_group is returned twice in two languages.

Because of this the select options are not unique and Farbe is shown, when the client selected Kleur.

Functionality wise the landingpage works, because the option value is persisted in the database.

I'm not sure how to resolve as the facets seem to return all possible facets for all stores, and an attribute landing page can be configured for one or more stores. Seems feasible to me to only return facets for the default store of the webshop.

ah-net commented 6 months ago

@bramstroker The problem with that is that stores in different languages can have different filter templates. And some people configure an ALP for an specific language for an specific store view.

I think an check on if it's the same template. And in that case skip it is an better solution.

ah-net commented 5 months ago

Wil be released today in the Magento2Tweakwise extension