search

The search.twig view is used to display the results of a search using the product search form.


In most circumstances, the search results page will extend the collection.twig template because it's format will follow the usual display of collection pages on your theme.

The search results page has access to the product object to display details about each product within the category.

In most circumstances, the search results page will include the items partial to display the details of products.


Search variables

The variable {{ keywords }} will return the search phrase entered by the user.

The variable {{ total_products }} will return the number of products found by the search engine.