EmicoEcommerce / Magento2Tweakwise-archived

Magento 2 module for Tweakwise integration
Other
9 stars 25 forks source link

Visibility filter missing #40

Closed jasperzeinstra closed 5 years ago

jasperzeinstra commented 6 years ago

Issue Brief

Magento has the attribute visibility, but the extension doesn't do anything with this feature. What would like to see is the following. For all the API requests to Tweakwise we would like the extension to always add the attribute visibility as an active filter tn_fk_visibility=\Magento\Catalog\Model\Product\Visibility::VISIBILITY_BOTH. If the request is for search we would like to also have the filter tn_fk_visibility=\Magento\Catalog\Model\Product\Visibility::VISIBILITY_IN_SEARCH and for all other requests it would be tn_fk_visibility=\Magento\Catalog\Model\Product\Visibility::VISIBILITY_IN_CATALOG. When this is added to the API request we can add the attribute visibility to our filter template in the Tweakwise Navigator backend. We'll set it to checkbox and hidden. Now on category pages only the products will be shown that are either visible in both catalog and search or only in catalog. And during a search request only products with visibility both or search will be visible. When someone doesn't add the attribute visibility to tweakwise filter template in navigator products with every visibility will be shown.

Environment

Steps to reproduce

  1. Install Magento from 1.1.0 tag.
  2. Create a product and set visibility to search and connect to a category
  3. Create a product and set visibility to catalog and connect to a category
  4. Visit the category and see if product with visibility search isn't shown
  5. Search for the product with visibility catalog and see if product isn't shown.

Actual result

Expected result

Fgruntjes commented 6 years ago

Thank you for your clarification, we agree that this is a bug to be resolved. As written with the merge request #41 that would break certain current use cases.

We are working on a different way of solving this issue. Unfortunately filteren the autocomplete suggestions is not possible. In this case you should disable the product suggestions completely or accept that there will be less products in the suggestion as expected.

Fgruntjes commented 6 years ago

Just a small reminder for myself.

With the current changes the catalog query will be filtered based on the correct visibility in search / catalog. However the query to Tweakwise is not changed yet. This still needs to be done but only if the Emico\Tweakwise\Model\Config::getLayeredFilterVisibility() or for the search requests Emico\Tweakwise\Model\Config::getSearchFilterVisibility() is enabled.

Also filtering for auto complete can only be done on the Magento side since Tweakwise does not support filtering this result based on attributes.

edwinljacobs commented 5 years ago

This has been fixed in the latest version. see tag v1.4.3 and its release notes.

With kind regards

EduardSelles commented 5 years ago

@jasperzeinstra Hi Jasper. Since this issue is solved, can you close it? Thank you in advance.