integration_documentation:plugins:shopware_smart_did_you_mean
This is an old revision of the document!
Shopware Unified - Smart Did You Mean (SDYM)
General
For Smart Did You Mean (SDYM) to work porperly with the FINDOLOGIC Shopware Unified Plugin. Three conditions have to be met:
- FINDOLOGIC Shopware Unified Plugin has to be installed
- SDYM has to be activated in the customer login for the specific service
- SDYM-Recomendations have to be provided by the API
The SDYM 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 SDYM output must be tested before the feature is released, due to the fact, that the default implementation does not fit the design of individual themes To adapted a template, create a file of the same name and folder structure in the theme
Available variables in the template:
- $finSmartDidYouMean ⇒ Only available if SDYM 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, the original search word is included.
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