Display the search box in the header only

How to put the search box at the top of the page

There are two sideboxes for search. You can control both through the Admin > Tools > Layout Box Controller.

The search.php sidebox is a conventional sidebox and can be turned on and off as normal. If you want search in the header, you will normally turn this sidebox off, though it does have the advantage of providing a link to the advanced search page.

search.php



The search_header.php sidebox is specifically designed to display a search box in your Zen Cart header and so doesn’t output all the HTML needed for a sidebox. It is recommended therefore that you ensure that its left/right column status is set to OFF. To display it in the header, set the single column status to ON.

search.php




Still have questions? Use the Search box in the upper right, or try the full list of FAQs. If you can't find it there, head over to the Zen Cart support forum and ask there in the appropriate subforum. In your post, please include your Zen Cart and PHP versions, and a link to your site.

Is there an error or omission on this page? Please post to General Questions on the support forum. Or, if you'd like to open a pull request, just review the guidelines and get started. You can even PR right here.
Last modified August 20, 2020 by Scott C Wilson (fa127548).