-
Notifications
You must be signed in to change notification settings - Fork 17
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
Fixes ALP facets for multiple stores #116
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@umizoomi Dit you test this in combination with EmicoEcommerce/Magento2AttributeLandingTweakwise#15 That pull request is also necessary to test this because it adds the template id to the request. |
@ah-net Yes I did. In the screenshot posted earlier, you can see the id "8" in the console. Also on the left side in the Tweakwise backend. I can do a double check later on. Are there additional things I can/should check? |
@umizoomi Weird, that's all you should need. I'll test it on my end again. Do you use one TW instance or multiple? (for different stores) |
@ah-net Its 5 different stores on one TW instance. Each store has its own "Root > Store" category within Tweakwise |
@umizoomi Which category did you select? The results are filtered based on the selected category. I'll do an test with your instance and see if i can reproduce the problem. |
@ah-net That is the root category of the store. In the case of the project I tested this on, all the store's use the same root category. Looking at the Attribute Landing admin page. The "Category" select element lists the category tree for the default store. As no store parameter is passed when loading the Attribute Landing admin page. As seen in Then there's a multiselect "Active stores" with all the available store scopes. The root category assignment can differ for each website, and thus store scope. So perhaps this is something that needs attention. |
@umizoomi I think i found the problem. The category does indeed cause problems because there isn't an overlapping root category from magento in TW (only the default TW root). I'll fix this by removing the category filter on the result. The main problem seems to be that 'show filter' is off on the missing filters. The TW api doesn't return those filters. The other missing filters are caused by the filter type. I'll check if we can add support for all filter types. But I'll discuss the problem with 'show filter' internally, because I can't show the filters that are not returned by the api. |
@umizoomi Unfortunately we can't add the filters with "show filter off" to the api response anytime soon (or maybe not at all). So we are going to add an 'other' option to the dropdown that lets you add an filter in an text field. So you can manually add an filter if it's missing from the select. |
I see. So for my clarification. When filling in an attribute to filter on for the attribute landing page, and that filter attribute is marked as "show filter = off" in TW. It will still be used as a filter to retrieve the products for the attribute landing page? And as previously. When an attribute is entered that is not in the filter template. It will have no effect. Is that correct? |
@umizoomi Correct. If the filter is marked as "show filter" is of. It will not be in the dropdown. But you can add it by selecting 'other' and adding it manually. And it wil be used to retrieve the products for the ALP. (if spelled correctly) And if the attribute is not available (or spelled incorrectly) it doesn't do anything. |
When you have multiple tweakwise instances (per store) only the facets of the first instance get returned. This pull request fixes that and returns the facets/facetattributes of all the stores.
It also checks which filtertemplate is selected. So it only returns attributes for that filtertemplate.