I’m having trouble getting the Instant Search results to display on the homepage, although it’s working perfectly on the search results pages and within the category pages. I found an earlier question and answer here: Algolia instant search results with home page of magento 2 - #3 by nicholas.riabets On Magento 2 but no actual answer was posted. Although the person who asked the question did manage to find a solution.
Can you provide a link to a public website so I can have look? Did Jan’s answer in the other thread helped?
Yes sure, http://dev.giftism.co.uk/live/
I don’t think so unfortunately and I’m trying to work that out now, little explanation was given so it’s hard for me to integrate the solution.
No- that hasn’t worked, as far as I can tell the Instant Results section just isn’t being fired on the homepage and if I can do that manually maybe it would show but I have no idea how Algolia works.
I’ve just checked your website and I’m not able to search at all on your homepage.
When I click the search icon in the header nothing happens, no search bar appears so I’m not able to search at all.
Does that happen for you as well? Does it happen even when you disable Algolia plugin?
That button links to the footer area which is currently just a 100vh div ready to embed the instant results section. If you click into a category under popular gifts you’ll see that the instant results section works correctly there. What I need is to simple have the instant results section ready for a user to input a term in the footer.
Hope that helps.
IS runs on homepage, but results are hidden by this code: algoliasearch-magento/instantsearch.js at master · algolia/algoliasearch-magento · GitHub
You can rewrite it to show empty query results on homepage.
Thanks I’ll try it and feedback for the community.
An update for the community: Whilst I believe that @jan.petr direct is probably correct I couldn’t find a way by amending this on its own to get the instant search to display on the homepage, so at this stage I’m still using the hacked solution with an iFrame. If anyone is able to find a solution to trigger IS on the homepage and can provide perhaps an example of it running that would be really useful for me and I’m sure many people who want to trigger IS on the homepage too.
I have long suffered from how to do this and eventually paid a lot of money to professional developers who did it. They do not want to tell But I can give a file system of my site and you can see for yourself. I’m not a programmer