How to Create query filter to hide multiple products by ID #3342
Unanswered
gabriellslvr
asked this question in
Q&A
Replies: 1 comment
-
Hello @gabriellslvr, Your best approach is probably to combine
To build the request filter, you can take inspiration from both the "search blacklist filter" and the way the price navigation filter is applied (since it's also customer-group based). Cheers |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi guys.
I'm working with a module from Amasty, that has some Catalog rules by customer groups. One of the rules is to hide some products from non-logged-in customers.
This works perfectly on the catalog/search page, but in the elasticsearch query doesn't... I want to build a preference in the
\Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection::prepareRequest()
to include a filter in the elastic search query to not search by the products id's that the Amasty module should hide.However, I don't know how to build this query and change the request to get the right ID's from the elastic search excluding the ones from the Amasty module rule.
Can you guys help me to apply this filter in the query before sending the request to the Elasticsearch server?
Beta Was this translation helpful? Give feedback.
All reactions