I'm having trouble getting the Instant Search to display on the homepage of my Magento site. Instant search works perfectly throughout the rest of the site assigned to a custom dom. (I'm actually putting the Instant Search feature in the site footer). Has anyone else experienced this issue placing the Instant Search feature on the homepage (front page) with Magento?
Asked
Active
Viewed 70 times
0
-
You cross posted this on 2 channels, please follow the thread here: https://discourse.algolia.com/t/algolia-instant-search-results-on-home-page-of-magento-1/1066 – rayrutjes Apr 15 '17 at 06:41
1 Answers
1
Try this to call a instant search template in footer section
path :/app/design/frontend/themename/Theme/Magento_Theme/layout/default.xml
<referenceContainer name="footer">
<container name="footer-content" as="footer-content" label="Page Footer Content" htmlTag="div" htmlClass="footer-instant-search">
<block class="Magento\Framework\View\Element\Template" name="instant_search" template="Magento_Theme::html/yourtemlpate.phtml" />
</container>
</referenceContainer>

Abhinav Kumar Singh
- 2,325
- 1
- 10
- 11
-
I'm a little confused by your answer. My theme doesn't have a default.xml so I'm looking at the page.xml I believe I need to replace the block class and the template path inside the container only, is that correct? Also what are both of these components doing, if you could provide me with a little explanation I might be able to come to a solution. Thanks again for your help, very much appreciated. – user3873557 Apr 18 '17 at 09:31
-
If you do not have the default.xml file then create on the bases of default theme or module. – Abhinav Kumar Singh Apr 19 '17 at 06:23
-
Thanks, really appreciate your answer and I've created the default.xml page as a result. However it's still unclear what the block class and template paths are supposed to be and what they are supposed to do. I suspect your answer is right but until I link it up and test I can't validate it. Thanks again for your time assisting me. – user3873557 Apr 19 '17 at 08:51
-
Have you given the correct block class and correct folder instead of
– Abhinav Kumar Singh Apr 20 '17 at 04:44 -
Magento_Theme : this is module html/yourtemlpate.phtml : this is folder and filename – Abhinav Kumar Singh Apr 20 '17 at 04:47
-
Hi thanks for your help- I couldn't get this working so for the mean time I've hacked a solution together using an iFrame to fire it. For some strange reason, the instant search won't run on my homepage no matter what. Thanks again for your help and I hope your answer helps some people. – user3873557 Apr 20 '17 at 08:31