Display image based on selected refinement - Magento

Hello all,

My question is a bit two-fold.

  1. I would like to display a few specific images when a few different refinements are selected. (1 facet group, 6 different refinements within that facet.) The image would likely be displayed within the instantsearch wrapper. Possible?

  2. Tough time finding developers who can build out little jobs such as this that are familiar with Algolia. Any help of that front or anywhere I could turn to?

Many thanks

Hello Joshua,

ad 1 - the extension doesn’t support such a feature out of the box. To handle it, you’ll need to tweak the extension. First you probably need to index all image URLs you have associated with the product. That you can do by hooking your code to the custom event: https://github.com/algolia/algoliasearch-magento-2/blob/master/Helper/Entity/ProductHelper.php#L816
Then you’ll have to modify the front end. Most probably just write a transformData method to set the correct image URL to hits: https://github.com/algolia/algoliasearch-magento-2/blob/master/view/frontend/web/instantsearch.js#L168

That’d be the easiest way on how to do it.

ad 2 - In here I could point you to our partner agencies which are listed on our community page: https://community.algolia.com/magento/