0

To display the result of the searched products(CatalogSearch), which phtml template is getting called.

I need to place that phtml file in my custom theme for overriding the same.

I belv it is result.phtml

3 Answers 3

1

The file is vendor/magento/module-catalog-search/view/frontend/templates/result.phtml

There are a few ways you can find out which file creates a page.

  1. Turn on path hints (Store > Configuration > Advanced > Developer > Debug > Enabled Template Path Hints for Storefront > Yes)
  2. Look at the class of <body> to get the controller file. By reading the code you can easily figure out the template. enter image description here As you can see from the image above, the body of the result page has a class of catalogsearch-result-index. Which tells us that the module catalog-search is responsible for the page.
0

It is indeed

/vendor/magento/module-catalog-search/view/frontend/templates/result.phtml

However for the actual product listing this then uses the same template as the standard catalog.

0

This phtml template is used for displaying the results of searched products:

vendor\magento\module-catalog-search\view\frontend\templates\result.phtml

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.