-
Notifications
You must be signed in to change notification settings - Fork 340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using this module with a custom theme does not display autocomplete as expected #79
Comments
Hi @phronesis, We are not using the standard autocomplete template since we have to render several area into the autocomplete (popular terms, products, ...). The standard template does not have such an option. As a result, we ship our own template into the module <body>
<referenceContainer name="header-wrapper">
<block class="Smile\ElasticsuiteCore\Block\Search\Form\Autocomplete" name="top.search" as="topSearch" template="Smile_ElasticsuiteCore::search/form.mini.phtml"/>
</referenceContainer>
</body> As you can see it override the standard search module search form. Overriding this into a custom theme should be done into a custom If it is ok for you I will close this one as it is more a support than a real bug. Feel free to ask me to reopen if you think there is a bug here. |
Ok Thanks. I had done that, but it was not working. I realised in the custom theme we were using, there was a layout defining that set the Block to Magento's default search. When I took that out, it worked as expected. Thanks for an excellent extension. Our site search is now fast and behaves as expected. |
Very happy to see you have found how to fix the problem and very glad that the module fits with your expectations. Don't hesitate to contribute and to promote it around you. We are trying to get the widest community we can. BR, |
@afoucret Can you please provide full details on overriding the standard search module search form & how to have it done using a custom Smile_ElasticsuiteCoredirectory in your template. @phronesis David Can you possibly explain the steps used to fix your autocomplete with a custom theme. The theme I'm using is the Porto Theme. I been struggling to track down how there theme is defining the Default set block and how to make it point to the elasticsuite autocomeplete. Sorry for opening up a closed topic that's 29 days old but i think this information could be good to be added to the Wiki for users like my self with limited knowledge of Magento 2 theme development. |
Within My theme folder, at the same level with folders like Magento_Catalog, Magento_Customer, Magento_Checkout, etc. I created a folder with the name: Smile_ElasticsuiteCore and within the folder, created the following subfolder: templates/search and copied the file form.mini.phtml from smile/elasticsuite/src/module-elasticsuite-core/view/frontend/templates/search/form.mini.phtml to the search folder. |
[Performance Sort] Disabled Optimizer #ESP-273
Can we use smile elasticsuite extesnion with custom search form in magento 2 |
This module works perfectly with Magento Custom Luma theme. However for a custom theme, the structure of autocomplete differs from what is obtainable with the Luma theme. I have removed the custom theme's implementation of Search but I can see that it picks the Magento's Default implementation of item.phtml which uses
<li>
tags.Any suggestions as to extra steps to take to make a custom theme display Autocomplete like Luma does?
The text was updated successfully, but these errors were encountered: