integration_documentation:plugins:shopware_smart_did_you_mean
This is an old revision of the document!
Shopware Unified - Smart Did You Mean (SDYM)
General
Three conditions have to be met, to be able to activate Smart Did You Mean with the FINDOLOGIC Shopware Unified Plugin.
- The FINDOLOGIC Shopware Unified Plugin has to be installed.
- Smart Did-You-Mean has to be activated for the specific service.
- Smart Did-You-Mean recommendations have to be provided by the API.
The Smart Did-You-Mean output can be customized by themes and text modules in the Shopware backend.
SDYM-Template
The plugin provides the file FinSearchUnified/Resources/views/frontend/search/fuzzy.tpl.
The Smart Did-You-Mean output must be tested before the feature is released, because the default implementation does not fit the design of individual themes. Create a file of the same name and folder structure in the theme to adapt a template.
Available variables in the template:
- $finSmartDidYouMean ⇒ Only available if Smart Did-You-Mean suggestions exist.
- $finSmartDidYouMean.type ⇒ Has one of the following values: did-you-mean, improved, corrected, forced.
- $finSmartDidYouMean.alternative_query ⇒ Contains the alternative search term proposed by FINDOLOGIC.
- $finSmartDidYouMean.original_query ⇒ If the type is “did-you-mean”, this variable is empty. In any other case, it is the original query.
Snippets
The texts of the SDYM suggestions are stored by the plugin in the Shopware backend as snippets and can be adapted there as well.
Open Configuration ⇒ Snippets
Select Namespaces ⇒ frontend ⇒ search ⇒ fuzzy on the left side of the window.
The available snippets are displayed on the right.
All the building blocks which names begin with “frontend / search / fuzzy” are provided by FINDOLOGIC.
Here you are also able to find the template variables mentioned above.
Clear cache
Select Einstellungen ⇒ Caches/Performance ⇒ Caches/performance
Select the “Cache” tab
After updating or installing the plugin, we recommend to empty the following sections:
- Shopware configuration
- template cache
- Compile themes
If the tempaltes are changed later empty the following section:
- Compile themes
If the text modules are changed later empty the following sections:
- Shopware configuration
- emplate cache