Warning: You are browsing the documentation for PrestaShop 8, which is outdated.

You might want to read an updated version of this page for the current version, PrestaShop 9. Read the updated version of this page

Learn how to update to the latest version.

Hook actionSearch

Informations

Hook actionSearch
Locations
FO
Type action
Origin core
Aliases
Description

Located in

Origin File
core src/Adapter/Search/SearchProductSearchProvider.php

Parameters details

    <?php
    array(
      'expr' => (string) Search query,
      'total' => (int) Amount of search results
    );

Call of the Hook in the origin file

Hook::exec('actionSearch', [
                'searched_query' => $queryString,
                'total' => $count,

                // deprecated since 1.7.x
                'expr' => $queryString,
            ])