Book Image

Learning Magento Theme Development

By : Richard Carter
Book Image

Learning Magento Theme Development

By: Richard Carter

Overview of this book

Table of Contents (15 chapters)
Learning Magento Theme Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Customizing Magento's search box


You can also customize Magento's search feature through the Magento templates. The search feature is especially important for stores with a large number of products, so ensuring that it is in a prominent place and looks like a search feature is very important.

Firstly, to overwrite the template used for the search form in the header, copy the search.mini.phtml file at /app/design/frontend/base/default/template/catalogsearch/ into the /app/design/frontend/default/m18/template/catalogsearch directory, and find the following lines that constitute the Search button:

<button type="submit" title="<?php echo $this->__('Search') ?>" class="button">
<span><span>
<?php echo $this->__('Search') ?>
</span></span>
</button>

Remove the <span> elements highlighted in the preceding code, as these are no longer required in the new theme. Open your theme's styles.css file to provide some basic styling for the search...