How to manage the preference options for the search function in PrestaShop 1.5-1.6
PrestaShop has a built-in search function which visitors and customers on the frontend of the site can use to search for products in your catalog.
In the admin panel there are some options related to the search function. To configure them go to Preferences menu>Search sub-menu. In this article we'll go over these options. For screenshots and a more detailed description check out the tutorial on how to manage the search function in PrestaShop 1.5-1.6.
At the top of the page that opens when you go to Preferences menu>Search sub-menu there's a table with aliases for keywords used for searching the catalog. You can add any word as an alias, but usually misspelled words are added as aliases for correctly spelled words. It often happens that the keyword that a customer types in the search field on the frontend is misspelled. In such cases the search will return no results. However, if the misspelled word is added as an alias, the search function will look for the correctly spelled word. For instance, if you have associated the misspelled bloose with the correctly spelled blouse, and a customer performs a search with the word bloose, then the search function will actually look for products matching with the word blouse.
To add an alias, click on the button Add new alias that's above the table with the existing aliases (in PrestaShop 1.5 the button is labeled Add new). On the page that opens there are two fields. One is for the alias and the other for the word for which it stands. If you want to add more than one alias, in the field for the alias separate the aliases with commas. After you type them click on the Save button.
In the table with the existing aliases, for each alias there's a button with which you can edit it, and another one with which you can delete it.
If you want to check the keywords which customers have used to perform searches, go to Stats menu>Stats sub-menu>Shop search tab. This will help you decide what aliases to add.
On the page with the options for the search function there's a panel labeled Indexing (in PrestaShop 1.5 it's labeled Indexation). This panel contains an option called Indexing which is enabled by default. This means that every product that you add is indexed. When a customer performs a search on the frontend, the search function looks through the indexed products for matches.
If for some reason there are products that are not indexed, you can click on the button Add missing products to the index that's in the panel. In case you want to re-index all products you can click on the button Re-build the entire index.
Ajax Search, Instant Search, Minimum Word Length and Blacklisted Words
Under the indexing options there are a few options for the search type, the minimum length of the search keywords and for blacklisted words. If the option Ajax Search is enabled and a customer types a word(s) in the search field, a drop-down menu with the first ten matching products will appear right under the field. The customer can select one of these products or they can execute the search to see all matching products.
If the option Instant Search is enabled and a customer types a word(s) in the search field on the frontend, this will automatically display on the page some of the matching products. This will be done automatically before the customer actually executes the search (by pressing the Enter button on their keyboard). Note that the instant search will work only if the Ajax search is enabled too.
With the option Minimum word length you can specify the minimum length of keywords that can be used with the search function. If the customer performs a search with a shorter word, no results will be displayed. If you want certain words to be excluded from searches, meaning they will return no results, list them in the field for Blacklisted words.
If you make any changes don't forget to click on the Save button.
Another panel with options that's available when you go to Preferences menu>Search sub-menu is Weight. With the options in this panel you can specify which product elements should be more important in determining the order in which matching products are listed on search result pages. Each product element (e.g. name, description, manufacturer, etc.) has a number. If one element has a greater number than another one, this means that it has more weight. For example, the product name is configured to have more weight than the description. This means that if the keyword used by the customer is contained in the name of a product and in the description of another product, then the one with the matching name will be listed first.
If you want to, you can modify the weight of the different elements. If you do, don't forget to click on the Save button.
For screenshots and some more details you can also read the tutorial on how to manage the search preferences in PrestaShop 1.5-1.6.
Was this answer helpful?
- How to make fields on the customer registration form in PrestaShop required
- How to create product packs in PrestaShop 1.5-1.6
- How to fix the error "Warning some translations files are missing for that ISO code" in PrestaShop
- How to create and manage categories in PrestaShop 1.5-1.6
- How to allow customers to register without providing phone numbers and an address in PrestaShop