Secondary Search - flagbit/Magento-FACTFinder GitHub Wiki
With the extension it is possible to use additional FACT-Finder databases besides the main product database. This can be necessary if there is another system or another source that provides information around your product, like a shop in another language, a blog, service pages or magento cms pages etc. This content can be searched and displayed with the extension as well. It is possible to search several content channels at once.
As a precondition all the necessary content must be exported from that system and imported into a separate channel of the the same FACT-Finder service. Afterwards you just need to specify the secondary channel names at the configuration and customize the result templates (see below).
This are key-features of the "secondary search" feature:
- all search requests to the shop are done parallel to two or more FACT-Finder channels
- suggest can show suggestions from multiple sources
- the secondary result is completely passed through to the templates / outside the extension, so everything could be implemented with it
The template for secondary search results is very basic and should be customized before usage. The default template can be found at app/design/frontend/base/default/template/factfinder/suggest/advancedsuggest.phtml with a rudimentary implementation of the given object.
Having a look on the used model class "Suggest.php" shows you that it's possible to get the complete search-result-adapter from the underlying library which can be used to show the ASN, sorting etc. Normally it will just necessary to show the top results and that's it.
Of course it's a bigger effort to get the wished search-result layout and design, but actually there is no standard way.
Version >= 4.1.14
To add a new block to the search result page to show results of the secondary channel, just follow this example
Inside the block you've got to set the "name" attribute to the channel name you want to use
<action method="setChannel"><name>{secondary_channel_name}</name></action>
The example code of core.xml adds a channel.phtml template to your search result page. Your channel block template will now retrieve the secondary result set to display its result in a separate block on page.
Enabling the suggestions for secondary channels is pretty simple. You just need to activate [the suggest proxy (https://github.com/Flagbit/Magento-FACTFinder/wiki/Configuration#use-proxy-for-suggest). If there are any (valid) secondary channels in the configuration, the results from them will be displayed.