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
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityThe 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.
Store > Configuration > Advanced > Developer > Debug > Enabled Template Path Hints for Storefront > Yes
)<body>
to get the controller file. By reading the code you can easily figure out the template.
catalogsearch-result-index
. Which tells us that the module catalog-search
is responsible for the page.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.
This phtml template is used for displaying the results of searched products:
vendor\magento\module-catalog-search\view\frontend\templates\result.phtml