If you would like to have the Search block within the navigation menu , Follow These Simple steps
Method 1
Method 2
The Default code of magento search bar which is used to call the magento search in header is
Method 3
Move to line no 32 of app/design/frontend///layout/catalog.xml. Here look for this code
Modify the above code with the following code
One Important Thing first remove the .form-search { position: absolute; right: 10px; top: 100px; }
from Css
and Change it with .form-search { position: relative; } and stylize it with you own css
Method 1
- Navigate to app/design/frontend/hamjjaa/default/template/catalog/navigation (Here hamjjaa is the template name )
Open top.phtml
- Enter the following Code
<form id="search_mini_form" action="<?php echo $this->helper('catalogSearch')->getResultUrl() ?>" method="get">
<fieldset class="mini-search">
<legend><?php echo $this->__('Search Site') ?></legend>
<input id="search" type="text" class="input-text" name="<?php echo $this->helper('catalogSearch')->getQueryParamName() ?>" value="<?php echo $this->helper('catalogSearch')->getEscapedQueryText() ?>"/>
<input type="image" src="<?php echo $this->getSkinUrl('images/btn_mini_search.gif') ?>" alt="<?php echo $this->__('Search') ?>"/>
<div id="search_autocomplete" class="search-autocomplete"></div>
<script type="text/javascript">
var searchForm = new Varien.searchForm('search_mini_form', 'search', '<?php echo $this->helper('catalogSearch')->__('Search entire store here...') ?>');
searchForm.initAutocomplete('<?php echo $this->helper('catalogSearch')->getSuggestUrl() ?>', 'search_autocomplete');
</script>
</fieldset>
</form>
Method 2
The Default code of magento search bar which is used to call the magento search in header is
<?=$this->getLayout()->getBlock('top.search')->toHtml()?>
try to call the following code instead of above code
<?=$this->getChildHtml('topSearch')?>
so you’ll be able to put the search bar anywhere in your template.Method 3
Move to line no 32 of app/design/frontend///layout/catalog.xml. Here look for this code
<reference name="header">
<block type="core/template" name="top.search" as="topSearch" template="catalogsearch/form.mini.phtml"/>
</reference>
Modify the above code with the following code
<reference name="left">
<block type="core/template" name="top.search" as="topSearch" template="catalogsearch/form.mini.phtml"/>
</reference>
Check if you got it or not. If not then check either you have disabled your Cache or not, by going to system->cache management . Disable Cache and clean the cache. and Check again ( You are done ).One Important Thing first remove the .form-search { position: absolute; right: 10px; top: 100px; }
from Css
and Change it with .form-search { position: relative; } and stylize it with you own css
7 comments
Excellent post! I must thank you for this informative read. I hope you will post again soon.
web development melbourne | website development company melbourne
I read your whole blog. Your work is really good and inseparable .Thanks for sharing.
Magento Development Company
custom website design services
very nice blogs!!! i have to learning for lot of information for this sites...Sharing for wonderful information.Thanks for sharing this valuable information to our vision. You have posted a trust worthy blog keep sharing.Website Designing Company | Web Development Company Bangalore
That's wonderful stuff you've written up here. Been searching for it all around. Great blogWeb Designing Companies Bangalore | Website Designing Company Bangalore
mobile app development company chennai
responsive website development company chennai
Software Application Development Company Chennai
Post a Comment