Hotfix release available: 2017-02-19e "Frusterick Manners". upgrade now! [49.5] (what's this?)
Hotfix release available fixing CVE-2017-12979 and CVE-2017-12980: 2017-02-19d "Frusterick Manners". upgrade now! [49.4] (what's this?)
integration_documentation:direct_integration:shopware

General

The Shopware 5 Direct Integration plugin needs to be implemented in the shop to export products and its data for successful implementation of FINDOLOGIC search. Besides product export, the plugin also injects the main FINDOLOGIC snippet.

This plugin is going through all the shop's data, finding valid products for export. In order to be exported, following conditions must be met:

  • product must be set to active
  • product stock must be grater than zero
  • product category must be set

Download

The plugin can be downloaded here


Installation

The Shopware 5 Direct Integration plugin installation procedure is basically the same as for any other Shopware 5 plugin. It can be summed up in a few simple steps:

Before you install a new FINDOLOGIC plugin, please remove any other old FINDOLOGIC plugins.
  • Plugin content needs to uploaded into “engine/Shopware/Plugins/Community/Frontend” folder.
  • After this, in Admin panel click on Configuration → Plugin Manager.

  • In the left side menu, click on “Installed”.

  • Plugin should be listed in the uninstalled plugins.
  • Click on the plugin green circle to install it.

  • Then you will be prompted to clear cache, click “Yes”.

  • Then click on “Activate” button.

  • In “Configuration” tab enter Shopkey provided by FINDOLOGIC.

  • After you fill this this form, click “Save”.
Shopkey must be entered in valid format or error will be shown
  • Finally, cache of the shop must be cleared.

Running export

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

If any of these parameters is not according to standards, export would not be run, and an error message will be displayed. Generated XML is validated against predefined xsd scheme from https://raw.githubusercontent.com/FINDOLOGIC/xml-export/master/src/main/resources/findologic.xsd


Export customization

If standard export does not export all the data, that is needed, there is a simple way to customize export. In the plugin root folder there is a file called “findologicCustomExport_org.php”, that should be renamed to “findologicCustomExport.php”. That file contains the class “FindologicCustomExport”, that extends the class “Shopware_Controllers_Frontend_XmlBuilder”, which is responsible for the export. In order to change the export, simply override already existing methods in “FindologicItemXml” by writing new methods in “FindologicCustomExport” class. An example code is already placed in “findologicCustomExport_org.php”.