PHPackages                             brandung/factfinder-magento2 - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. brandung/factfinder-magento2

ActiveMagento2-module[Utility &amp; Helpers](/categories/utility)

brandung/factfinder-magento2
============================

FACTFinder Webcomponents SDK

v1.3.2(6y ago)04091proprietaryPHPPHP ^7.1

Since Oct 31Pushed 6y agoCompare

[ Source](https://github.com/brandung/magento2-module)[ Packagist](https://packagist.org/packages/brandung/factfinder-magento2)[ RSS](/packages/brandung-factfinder-magento2/feed)WikiDiscussions develop Synced yesterday

READMEChangelogDependencies (9)Versions (25)Used By (0)

FACT-Finder® Web Components for Magento 2
=========================================

[](#fact-finder-web-components-for-magento-2)

This document helps you integrate the FACT-Finder Web Components SDK into your Magento 2 Shop. In addition, it gives a concise overview of its primary functions. The first chapter *Installation* walks you through the suggested installation processes. The second chapter “Backend Configuration” explains the customisation options in the Magento 2 backend. The final chapter *Web Component Integration* describes how the web components interface with the shop system and how to customise them.

Requirements
------------

[](#requirements)

This module supports:

- Magento 2 version 2.2 and higher
- PHP version 7.1 and higher
    **Warning**: PHP 7.0 is not supported

Installation
------------

[](#installation)

To install module, open your terminal and run the command:

```
composer require omikron/magento2-factfinder

```

Alternatively, you may want to add module reference to `composer.json` file:

```
"require": {
    "omikron/magento2-factfinder": "VERSION YOU WANT TO INSTALL"
}

```

and run command:

```
composer update

```

If, for some reason, `composer` is not available globally, proceed to install it following the instructions available on the [project website](https://getcomposer.org/doc/00-intro.md).

Activating the Module
---------------------

[](#activating-the-module)

From the root of your Magento 2 installation, enter these commands in sequence:

```
php bin/magento module:enable Omikron_Factfinder
php bin/magento setup:upgrade

```

As a final step, check the module activation by running:

```
php bin/magento module:status

```

The module should now appear in the upper list *List of enabled modules*.

Also, check in the Magento 2 backend "Stores → Configuration → Advanced → Advanced" if the module output is activated.

[![Module configuration](docs/assets/admin-section.png "Module configuration")](docs/assets/admin-section.png)

Backend Configuration
---------------------

[](#backend-configuration)

Once the FACT-Finder module is activated, you can find the configurations page under "Stores → Configuration → Catalog → FACT-Finder". Here you can customise the connection to the FACT-Finder service. You can also activate and deactivate single web components, as well as access many additional settings.

### General Settings

[](#general-settings)

At the top of the configurations page are the general settings. The information with which the shop connects to and authorises itself to the FACT-Finder Service are entered here. In the first line, activate your FACT-Finder integration. Before any changes become active, save them by clicking “Save Config”. In some cases, you need to manually empty the cache (*Configuration* and *Page Cache*).

Click the button “Test Connection” to check the connection to the FACT-Finder service. Please note the channel name needs to be entered correctly to establish a connection.

At the end of the general settings section is an option *Show 'Add to Cart' Button in Search Results*. Activate this option to add a button to the products displayed on the search result page, which directly adds that product to the shopping cart. Warning: The product added to the cart is identified by the variable "MasterProductNumber". To allow this function to work correctly, the field "MasterProductNumber" must be imported to the FACT-Finder backend (on fact-finder.de).

[![General Settings](docs/assets/general-settings.jpg "General Settings")](docs/assets/general-settings.jpg)

### Activate Web Components

[](#activate-web-components)

Here you can decide which web components are activated. Only active web components can be used and displayed in the shop.

- **Suggestions** activates loading and displaying suggestions while search terms are entered into the search bar.
- **Filter / ASN** activates the functions to narrow down and refine search results.
- **Paging** activates paging through the returned search results.
- **Sorting** activates a sorting function for returned search results.
- **Breadcrumb** activates displaying the current position during a search. Can be refined with the **Filter / ASN** component.
- **Products per Page** activates an option to limit the number of displayed search results per page.
- **Campaigns** displays your active FACT-Finder campaigns, e.g. advisor and feedback campaigns.
- **Pushed Products** displays your pushed products campaigns.

### Advanced Settings

[](#advanced-settings)

Advanced Settings contains additional parameters used for the `ff-communication` web component. Each setting is set to a default value and has a short explanatory text attached.

### Product Data Export

[](#product-data-export)

This option configures the connection with the FACT-Finder system via FTP. Shop data can be generated and transferred to FACT-Finder using FTP. FACT-Finder needs to be up to date on the product data, to ensure that components like the search work as intended.

Enter an FTP-server to which the CSV file is uploaded automatically. The URL needs to be entered without the protocol prefix (ftp://) and without the slash at the end.

The CSV file uses double quotes `"` for field enclosure and a semi-colon `;` as field delimiter.

The *Select additional Attributes* option offers a multiple-choice list of attributes. Select all of those you want added to the CSV file.

Before starting the export by clicking *Generate Export File(s) now*, you need to commit all changes by clicking "Save Config". The exception from that rule is `Test Connection` function which always takes the actual values from the corresponding fields.

[![Product Data Export](docs/assets/export-settings.png "Product Data Export")](docs/assets/export-settings.png)

### Updating Field Roles

[](#updating-field-roles)

Field roles are assigned while creating new channel in FACT-Finder application, however they can be changed anytime. In this situations, You need to update field roles which are being kept in Magento database for tracking purposes. To updates field roles, use the button `Update Field Roles`

#### Http Export

[](#http-export)

Feed export is also available to trigger by visiting specific URL, which is also able to be secured by Basic Auth (username and password configured at section Http Export). You can configure Your FACT-Finder application to download the feed directly from this location.

Exports are available under following locations:

- `https://YOUR_SHOP_URL/factfinder/export/product/store/YOUR_STORE_ID` - for exporting product feed (or combined feed if You have cms export enabled and You've chosen to export product and cms data in one file)
- `https://YOUR_SHOP_URL/factfinder/export/cms/store/YOUR_STORE_ID`- for CMS export

If there's no `store id` provided, feed will be generated with the default store (by default with id = 1)

### Cron configuration

[](#cron-configuration)

You can set the program to generate the product data export automatically. Activate the option *Generate Export Files(s) automatically* and the export is generated every day at 01:00 server time.

`0 1 * * *` is a default value however You can define your own cron expression in the module configuration at `Cron Schedule` section.

[![Cron Configuration](docs/assets/cron-configuration_en.jpg "Cron Configuration")](docs/assets/cron-configuration_en.jpg)

CMS Export
----------

[](#cms-export)

You can export Your cms pages to FACT-Finder to present them in suggest results. You can specify whether You want to export cms pages content to separate channel, or using single channel, which You are using for standard products information export. Both ways offer same functionality but in different ways and are described below.

[![CMS Configuration](docs/assets/cms-configuration.png "CMS Configuration - using single channel")](docs/assets/cms-configuration.png)

- **Export Enabled** - determine if CMS content should be exported or not
- **Use separate channel** - determine if exported CMS content should be exported to standard channel, or to the different one. If this option is set to "Yes", additional field "Channel" appears where You need provide the name of channel which will serve CMS suggest results.
- **Channel** - Channel name used for CMS export. This field appears only if *Use separate channel* is turned on.
- **Generate CMS Feed** - On button click all CMS data is exported and uploaded to configured FTP server
- **Pages Blacklist** - allow user to filter out pages, which should not be exported, for example "404 Not Found page" should not be visible at suggested records

Before You start exporting Your CMS content to FACT-Finder You need to prepare it for correctly serving this data to Your Magento application.

### Create new suggest type

[](#create-new-suggest-type)

At first You need to create a new suggest type named **cms**. I'ts because the new was added with type attribute equals to"cms"

```

```

[![New Suggest Type](docs/assets/cms-suggest-type.png "FACT-Finder backend - new suggest type")](docs/assets/cms-suggest-type.png)

It's also required to configure the return data of newly created suggest type. It's recommended to set return data as it's shown on screen, however You can also choose more fields to be returned. You should add page url to returned data to allow users directly reaching them from suggest component. If You want to present also page images, it's also worth adding them to returned data

[![Suggest Type Return Data](docs/assets/cms-type-return-data.png "FACT-Finder cms suggest return")](docs/assets/cms-type-return-data.png)

Please note that each field needs to be correctly bind to html tag using access path same as in the FACT-Finder JSON object. The example below shows how to render page url

```
