integration_documentation:shopware
This is an old revision of the document!
Integration with Shopware Plugin
General
The Findologic Shopware plugin needs to be implemented in the shop to export products and the relevant data for successful implementation of Findologic search. Besides product export, the plugin also injects the main Findologic snippet and automatically handles the implementation of the API or the Direct Integration.
The plugin is going through all the shop's data, finding valid products to export. In order to be exported, following conditions must be met:
- product must be set to active
- active category must be set
- product is visible in standard search and on product detail site
Installation
The Findologic plugin installation procedure is basically the same as for any other Shopware 5 plugin. It can be summed up in a few simple steps:
- The Findologic plugin needs to be downloaded and installed via the Shopware store (see link above) or the Plugin Manager in the Shopware backend.
- In the left side menu, click on “Installed”.
- The plugin should be listed in the uninstalled plugins.
- Click on the green circle to install it.
- Then you will be prompted to clear the cache. Click “Yes”.
- Then click on the “Activate” button.
- In the “Configuration” tab you have to:
- Enter the shopkey provided by Findologic.
- Enter the CSS classes, which specify the containers where the content of Findologic is loaded into. Find more information about this topic here.
- After you fill in this form, click “Save”.
- In order for the category and the vendor block of the Findologic Smart Suggest to work properly it is necessary to set the minimal allowed length of the search word to 0.
- Finally, the cache of the shop must be cleared.
Running export
The export is called via URL. For example: <SHOP_URL>/findologic?shopkey=<SHOPKEY>&start=<NUMBER>&count=<NUMBER>
Three parameters are necessary for successfully running an export:
- shopkey → <SHOPKEY> provided by Findologic
- start → <NUMBER> that should not be lower than zero
- count → <NUMBER> that should not be lower than zero
The generated XML is validated against our predefined XSD scheme and built with our export library libflexport.
Additional templates
To be able to provide all the Findologic features which are not support by Shopware out of the box, you need to implement additional templates within the search template of the shop.
Promotions
The promotion template will be provided by the plugin if there is a match with the query and can be added via the following smarty-plugin:
{include file='frontend/fin_search_unified/promotion.tpl'}
This will add the following block of HTML to template:
{block name="frontend_listing_promotion"} {if $finPromotion} <div id="fl-promotion" class="panel has--border is--rounded"> <div class="panel--body is--wide"> <a href="{$finPromotion.link}"><img class="image" src="{$finPromotion.image}"></a> </div> </div> {/if} {/block}
Implementing Smart Did-You-Mean
In order to implement Smart Did-You-Mean please have a look at the following documentation.
Export customization
The plugin can be extended by following the Shopware plugin system standard. All important classes are registerd as services. Findologic provides a boilerplate plugin on Github which can be copied and used as a quickstart to customize the export.
Troubleshooting
- Filters / Facets
- In the Findologic customer account you can set and configure the filters which should be displayed in the shop.
- The order of the filters is specified by Findologic and the visualization is handled by the Shopware template.
- Upgrading from earlier versions
- If there were no customizations made to the FinSearchAPI plugin, there is nothing todo.
- If there were customizations (do this in a dev environment if possible):
- Backup old plugin
- Upgrade plugin
- Reimplement old logic if needed by using another plugin as mentioned in the customization part of this documentation.