Autocomplete for search bar is made which will be displaying image and product name in a dropdown to give a perfact search.
Make sure you have a VQMOD enable.
Put the file inside xml folder under vqmod.
/vqmod/xml/autocomplete_search.xml
This will work for default theme search easily.
If you have any trouble follow below instructions.
1. search for the below code.
<div id="search" class="input-group">
<input type="text" name="search" value="<?php echo $search; ?>" placeholder="<?php echo $text_search; ?>" class="form-control input-lg" />
<span class="input-group-btn">
<button type="button" class="btn btn-default btn-lg"><i class="fa fa-search"></i></button>
</span>
</div>
2. Replace the code with [autocompleteSearch]
3. Remove the second occurrence of code also.
4. Now if you know how does xml file works.. you can alter the file.
Place the code [autocompleteSearch] at the file
catalog/view/theme/*/template/common/search.tpl
Check the ajax trigger at
$('input[name=\'search\']').autocomplete
Also check the query
(
PD.name LIKE '%".$data['filter_name']."%'
OR P.model LIKE '%".$data['filter_name']."%'
OR P.sku LIKE '%".$data['filter_name']."%'
OR CD.name LIKE '%".$data['filter_name']."%'
)
Login and write down your comment.
Login my OpenCart Account