3.1.1

Quick Search

Optimizes search results by allowing you to search by category, brand and product features, thereby increasing conversion rates on the site

Add-on installation

After downloading the module, its installation is performed using standard CS-Cart tools on the page Admin Panel → Modules → Module Management → Download and install the module (+).

For CS-Cart version 4.16.1 and higher Admin Panel → Modules → Downloaded add-ons→ Gear button → Manual installation.

Image

Add-on setting

Adding a block

For the search to work, you need to add the MS: Quick Search block to the layout.

  1. Go to the Website → Themes → section Layouts;
    1. Image
  2. Disable or delete the main search block;
    1. Image
  3. Press “+” to add a new block to the section;
    1. Image
  4. Open the “Create a new block” tab, select the “MS: Quick Search” block from the list;
    1. Image
  5. Fill in the ”Name“ field, go to the ”Content“ tab, select the ”All“ option for the ”Fill in" field;
    1. Image
  6. Click “Create".

Product cache generation

To ensure high speed and accuracy of the search, it is necessary to maintain an up-to-date cache of products.

In the General tab, you will find a link leading to the "Cache for search field" section in the Modules menu. Follow this link to configure the caching settings.

Image
💡
After installing the module, in order for it to work correctly, you must first delete the existing cache tables, and then start the cache generation process again. This ensures that up-to-date data is stored in the cache, which ensures the correct functioning of the module.

The "Cache for search field" section provides the following tools for working with product tables:

  • Optimize table: This button starts the process of optimizing the existing cache. Use it to improve search performance after significant changes in the product catalog.
  • Delete table: If you encounter problems with the search or want to completely clear the cache, use this function. It will delete the current cache table, allowing you to create it again.
  • Cache for search field: Click on this button to start the process of creating a cache of goods. This is necessary for the initial configuration of the module, as well as for updating the cache when adding new products or changing existing ones.

Cron commands to start scheduled generation: To automatically update the cache on a schedule, use the provided cron commands. They will allow you to set up regular cache updates without having to manually run this process.

Image

In the section “Cache for search field” there are three different cron commands, each of which updates the search cache, but does it in different ways:

  • The command using PHP directly runs the script on the server. This is suitable for systems where it is preferable to use PHP to perform tasks.
  • The Curl command sends an HTTP request to your site to initiate a cache update. This is convenient when you need to call a script via the web.
  • The command using Wget also sends an HTTP request, but uses a different program. This method is suitable if Wget is installed on the server.

The choice of the team depends on your server settings and personal preferences in managing tasks on the server side.

Display Settings

Let's go back to the module settings.

In the Settings tab, you will find the following options to customize the display:

Image
  • Display code: Enable it to display the item number in the search results;
    • Image
  • Display price: Enable it to display the regular price of the product and the recommended price in the search results;
    • Image
  • Show category: Enable it to display product categories in the search results;
    • Image
  • Show 'Add to cart' button: Enable the Add to Cart button to be displayed next to each product in the search results;
    • Image
  • Show 'Add to Compare' button: Enable it so that the add to comparison list button is displayed next to each product;
    • Image
  • Show 'Add to Wishlist' button: Enable it so that the Add to wishlist button is displayed next to each product;
    • Image
  • Count of products: Specify how many products to display on one search results page;
    • Image
  • Count of categories: Specify how many categories to display in the search results list;
    • Image
  • Search Box style: Select the style of the search box;
    • Round:
      • Image
    • Square:
      • Image
  • Display thumbnail: Enable it to display product images in the search results;
    • Image
  • Thumbnail size: Specify the width and height of the thumbnails of the product images in the search results. By default: width 40, height 40, size is specified in pixels;
    • Image

In the Settings tab, you will find the following options for configuring the search operation:

  • Advice grammar corrections: Enable this option so that the module offers corrections for possible grammatical errors in search queries.;
    • Image
  • Grammar advices limit: Set the maximum number of sentences for correcting grammatical errors;
    • Image
  • Sorting logic: Select the principle by which the products will be sorted in the search results;
    • 💡
      Sorting by popularity is currently available. In the settings of each product there is a "Popularity" field where you can set the value manually. The number indicated here determines the priority of the product in the list of results: the higher the value, the higher the product will be placed in the list. The popularity of the product is calculated automatically based on the number of views in the store, additions to the cart and purchases made, which allows you to reflect the current preferences of customers.
      Image
  • Timeout (ms): Set the delay in milliseconds between the first letter entered and sending the request to the server;
  • Min characters for start searching: Set the minimum number of characters required to start the search;
    • Image
  • Items per one process of generating the cache: Set the number of products to be processed at a time;
    • 💡
      If you have 10,000 products in your store and you set the value "Number of products processed in one process" to 1000, then the module will need at least 10 processing cycles to fully process all products. This helps to optimize the load on the server and ensures a smoother operation of the "Quick Search" module in your online store.
  • Search in descriptions: Enable it so that the search is also carried out by product descriptions;
    • Image
  • Search in product features: Enable it so that the search takes into account the characteristics of the goods;
    • Image
  • Search by brands: Enable it so that the search takes into account product brands;
    • Image

In the “Information” tab you will find information for API search:

Image
  • The entry point for the search
    • The URL for sending search queries can be found in the module settings. It is automatically configured for your domain.

  • Passing the search parameter
    • Use the q parameter to pass the desired phrase.