User Tools

Site Tools


Sidebar

magento_2:advanced_search

For more details see the Advanced Search for Magento 2 extension page.

Guide for Advanced Search for Magento 2

Allow your customers to find necessary products in a few clicks. Optimize quick search window according to users’ needs and customize autocomplete popup display to make searching easy-to-follow.

  • Enhance search results popup
  • Add handy tabs to navigate the results
  • Display popular and recent searches
  • Customize search window design
  • Show ‘View All’ link and ‘Add to Cart’ button
  • Analyze customers’ activity via Search Analytics dashboard

Configuration

To configure the extension settings, go to Admin Panel → Stores → Configuration → Amasty Extensions → Advanced Search.

General Settings

Expand the General tab.

Popup width (px) - indicate the width of the autocomplete popup window to make it fit in with other page elements. Recommended value for horizontal view is 900. To get vertical view, please enter 700 and lower.

Min characters - specify the minimal number of characters that customers should type in to trigger the search process. By default, the number is three.

Enable Redirect from 404 to Search Results - if the option is enabled, customer will be redirected to the store search results of the broken URL text instead of the '404 Not Found' page.

Custom URL Key for Default Search Results Page - enable to set SEO-friendly short URLs. URL will look 'search/yellow' instead of 'catalogsearch/results/q=yellow'.

Search Results Page URL Key - specify the URL alias for the search results' page.Please do not use 'catalogsearch' as URL Key value.

Enable Indexation for Autocomplete popup - Set 'Yes' to speed up autocomplete popup performance. The autocomplete popup indexation also covers the products indexation. Please note, the reindex will take longer. This feature comes with Amasty Elastic Search extension only.

If you are using Varnish cache when utilizing the custom URL, than to reduce the system load you should include this URL into the Varnish cache exceptions. Please, go to vendor/magento/module-page-cache/etc and select the file with the .vcl extension (depending on your Varnish cache version) and find the following code:
if (req.url ~ "/checkout" || req.url ~ "/catalogsearch") {
return (pass);
}

Here you need to add the custom URL to exceptions in the IF clause. For example, for the search URL the code will be the following:

if (req.url ~ "/checkout" || req.url ~ "/catalogsearch" || req.url ~ "/search") {
return (pass);
}

Enable Tabs on the Search Result Page - set to Yes to enable the tabs that sort search results by Category, CMS, and Landing on the search results page.

Search Attributes

You can include any available product attributes in search algorithm. For each attribute, you can set a priority (weight).

Click Add to create a new attribute. Use the bin icon in the Action column to delete attributes in one click.

For example, if there is a color attribute with weight 10 and description attribute with weight 5, and the query is red, search results will be more visually relevant, because the algorithm will choose color attribute prior to the words in description.

See our Elastic Search for Magento 2 extension that offers a flexible work with a search query and extensive configuration of product attributes.

Products

Expand this tab to configure products display in a popup window.

Enabled - set to Yes to enable search in products and display search results in the autocomplete popup.

Title - customize the title for the products block.

Position - specify products block position in the popup. This setting is ignored for the horizontal popup window.

Max Results - set the max number of displayed results.

Name Length - indicate the max number of characters of a product name that will be displayed in a popup window.

Short Description Length - set the number of characters for a product short description to be shown in a search window.

Show Reviews - enable reviews display in the autocomplete popup to help customers make the purchase decision much faster.

Enable 'Add to Cart' button - set to Yes to show Add to cart button in the popup to let customers purchase necessary products right away.

Redirect to Product Page - enable this option to redirect in case there is only one search result available. Show 'Out of Stock' Products Last - enable a feature to place the out-of-stock items last in the search results.

To make this feature works properly with out-of-stock items being displayed correctly, please make sure that out-of-stock items' visibility is enabled.
  • Go to Admin Panel > Stores > Configuration > Catalog > Inventory > Stock Options.
  • Navigate to a Display Out of Stock Products field > Uncheck Use system value and set to Yes.

Additional Blocks

Extend the search popup with additional sections.

Enabled - enable the display of the Popular Searches block.

Show on First Click - set the option to Yes to let customers see the Popular Searches block in the autocomplete popup once they click on the quick search field.

See the example here.

Title - specify the title of the block.

Position - set the position for Popular searches block.

Max Results - set the maximal number of popular search results that will be displayed in the search autocomplete popup.

Recent Searches

Enabled - select Yes to display the Recent Searches block.

Show on First Click - set the option to Yes to let customers see the Recent Searches block in the autocomplete popup once they click on the quick search field.

Specify the Title, Position and Max Results to be displayed.

Blog

Enabled - set to Yes to enable search by blog pages and to display a blog section in the search window popup to help store visitors find the required content throughout your corporate blog.

Allows to search by blog pages created with Amasty Blog extension.

Title - input a name for the section in the search popup, where the blog results will be displayed.

Also specify the Position, Max Results.

Set Content Heading Length and Content Length to be displayed to make your search autocomplete window look informative and clear.

Brands

Enable to display a Brand section in the search window popup.

The option allows to search by brand pages created with Amasty Improved Layered Navigation and Shop by Brand extensions.

Specify the Title, Position, Max Results, Content Heading Length and Content Length for Brands block.

Categories

Enable the option to let the extension search among category attributes and display the results in the autocomplete popup.

Specify Categories block Title, Position and the max number of displayed Results.

Name Length - indicate the number of characters of a category title that will be displayed in a popup window.

Description Length - set the number of characters for a product short description to be shown.

Display Full Category Path - set to Yes to show full path to the results displayed in the popup.

CMS Pages

Enable search on CMS pages to provide customers with detailed search results.

Specify the Title, Position and the Max Results.

Also set the maximal number of characters for Content Heading and Content that will be shown.

Landing Pages

Enable search landing pages in the popup, specify the Title, Position and the Max Results. Set the maximal number of characters for Content Heading and Content that will be shown is the search popup.

Allows to search by landing pages created with Amasty Landing Pages extension.
Search Landing Pages

To display Landing Pages instead of the search results page, go to Admin Panel > Marketing > SEO & Search > Search Terms > Press Add New Search Term.

  • Input expected Search Query;
  • Specify the Store;
  • Redirect URL - input the URL of the landing page.

Custom Layout

Enable this option to customize popup design.

Set colors for a Border, Hover, Highlight, Background, Text and Hover Text using convenient color picker tool.

Analytical Dashboard

The Advanced Search extension allows to maximize profits by analyzing visitors' searching activity and the data gained.

To see the Search Analytics dashboards, go to Admin Panel → Reports → Search Analytics.

Here you can see the next values: total searches, unique searches, the number of users and users’ engagement. The Engagement statistics includes the page jumps to Brands, Categories, Blog, CMS & Landing pages.

Easily check customers’ demand in the Most Wanted Search Terms and Recent Activity blocks.

To see more details on Most Wanted Search Terms, go to Admin Panel → Reports → Most Wanted.

To see more details on customers' Recent Activities, go to Admin Panel → Reports → Recent Activity.

NOINDEX

To prevent search engines (Google, Bing, Yahoo, etc.) from needlessly indexing Magento catalog search results page(s) and advanced search results page(s) we added the code to app/design/frontend/YOUR_PACKAGE/YOUR_THEME/layout/local.xml.

  • If this file does not yet exist in your custom theme you can create it and Magento will automatically include it.
  • If this file already exists in your custom theme then copy everything except the first line XML declaration and elements into your copy of local.xml.

Reindex Categories

To reindex categories for correct search results, go to System → Tools → Index Management

Frontend Samples

Enhance search results pop-up with additional sections.

Display ‘Add to Cart’ button and ‘View All’ link.

Customize the pop-up design to fit your website style.

Add handy search tabs to sort and easily navigate the results.

Display the most popular and recent search results right on the first click by the customer.

Advanced Search for Magento 2 extension is compatible with the built-in Magento EE Sorl & Elastic Search.
Advanced Search for Magento 2 extension is compatible with AJAX Shopping Cart for Magento 2.

Find out how to install the Advanced Search extension for Magento 2 via Composer.

Rate the user guide
 stars  from 1 votes (Details)
magento_2/advanced_search.txt · Last modified: 2019/09/18 14:16 by nahiyeva