Installation & Configuration
Installation
Make sure you are running Shopware version 5.2.0 or later.
The plugin can be installed via the plugin manager.
Note for Shopware versions < 5.2.15Prior to version 5.2.15 Shopware 5.2 was unable to automatically install cronjobs.
This can be manually remedied by going to "Configuration > Basic settings > System > Cronjobs" in Shopware's backend.
There you can create a new cronjob by clicking on "Add entry". Name the new cronjob "Update aiPhilos databases" or something similar.
It is mandatory to enter "Shopware_CronJob_AiphilosSearchSyncDatabase" as the action.
Set this new cronjob to run at least once per day but do not activate it before you haven't correctly configured the plugin (see below).
Configuration
Shopware configuration
To not use up your search requests unnecessarily it is highly recommended that you increase the minimum search term length from Shopware's default 3 to at least 5. This is especially important because of the AJAX live search that starts searching as soon as the user starts typing, which will use up your search requests quickly while not producing sensible results with just 3 characters as the input.
Plugin configuration
Open the plugin configuration in Shopware's plugin manager. You will find the following options.
- Use AI search for this shop?
Determines whether or not aiPhilos search is enabled for the current sub-shop. - aiPhilos Username
The username as set in the aiPhilos account dashboard. Shared between all sub-shops. - aiPhilos Password
the password for the selected user. - aiPhilos Database Name
The name of the aiPhilos database used by the given sub-shop. This must be a unique name comprised of only upper and lower case letters from the English alphabet, numbers and underscores.
No two sub-shops must share the same database. The database will be created on demand. - Number of months for bestsellers
To accurately judge search queries for popular and bestselling items aiPhilos needs to be provided a measurement for that, this plugin uses sales over a given period of time. Enter the number of months that should be considered for this measurement here.
- Attribute Columns
You can optionally also provide a semicolon separated list of article attributes (free text fields) that should also be send to the aiPhilos database. To add columns, enter them here exactly as they appear under column name in Shopware's free text field management for the table "s_articles_attributes".
Only use columns here that contain human readable text in the language that your sub-shop uses. It is sufficient to use Shopware's translation feature for free text fields for this but if you use one column per translation you can also simply configure each sub-shop with the appropriate column.
- Excluded Category-IDs
With this option you can exclude articloes from within some categories from being sent to the aiPhilos database.
Enter the desired IDs as a semicolon separated list.
You can find the category-ID by clicking the desired category in Shopware's category manager and using the number that says "System-ID" next to it.
It is not necessary to exclude categories from different subshops or blog categories manually, as they are excluded automatically.
- Fallback Mode
This option let's you configure if and under what conditions the search should fall back to Shopware's default search. Note: Due to bugs in older Shopware versions these options might be displayed in German even when using the backend with the English language. The order of options here reflects the order of options in the backend.
"Never (not recommended)":
Never fall back to Shopware's default search under any circumstances. Only recommended for development, don't use this in production Shops.
"Errors and no results (Default)":
Fall back to the default search if no results are found by aiPhilos or an error occurs. This is the default setting.
"Only on errors (minimal recommended)":
Only fall back when an error occurs during the attempted aiPhilos search. This is the recommended minimum setting and especially useful once aiPhilos has fully learned your article data and the results have become good enough that you can be certain that if aiPhilos finds nothing, nothing is the correct result.
"Only when no results returned":
Only fall back if aiPhilos returns no results. This option exists mostly for the sake of completeness.
"Learning Mode":
Learning mode is best used when introducing aiPhilos search to an already existing Shopware shop. If it is activated search queries will not be sent to aiPhilos and instead, the default search is used. The rest of the plugin remains active for that subshop so the aiPhilos article database will be updated with your article data so aiPhilos can start learning your data. You can "peek" into what result aiPhilos would return while in Learning Mode by adding "&forceAi" to your search queries manually.
For example your shop is hosted on "example.com" and you want to search for "apple" then going to the URL "example.com/search?sSearch=apple&forceAi" would force the aiPhilos search to be used.
Cronjob configuration
Once you have configured the plugin to your liking and your article data is in a reasonable shape - meaning your descriptions do not contain nonsensical or blind text like "Lorem Ipsum" - it is time to activate and execute the "Update aiPhilos databases" cronjob.
This cronjob should run at least once a day but it might be advisable to run it more often if your article data is changing more frequently so the aiPhilos database mimics the Shopware database more closely.
Troubleshooting
This plugin makes extensive use of Shopware's logging system. If you are encountering issues while operating it make sure to first check the log files under "Configuration > Logfile > System Log". There you can select the file starting with "aiphilos_search" and the appropriate date. Make sure to click the magnification glass to see the most the detailed information provided in the context field.