Столкнулся с этой же проблемой. Нашел решение, помог код:
"<script type="text/javascript"><!--$('#search input').keydown(function(e) {
if (e.keyCode == 13) {
moduleSearch();
}
});
function moduleSearch() {
pathArray = location.pathname.split( '/' );
url = '<?php echo HTTP_SERVER; ?>';
url += 'index.php?route=product/search';
var filter_keyword = $('#filter_keyword').attr('value')
if (filter_keyword) {
url += '&keyword=' + encodeURIComponent(filter_keyword);
}
var filter_category_id = $('#filter_category_id').attr('value');
if (filter_category_id) {
url += '&category_id=' + filter_category_id;
}
location = url;
}
//--></script>"
Но проблема в том, что просто срабатывает редирект по нажатию на "ентер", но никакого поиска не случается, просто редиректит на /index.php?route=product/search и всё. Помогите пожалуйста вылечить, горит :(
Чуть выше, код выглядит так:
<div id="menu-search">
<div id="search">
<?php if ($filter_name) { ?>
<input type="text" name="filter_name" value="<?php echo $filter_name; ?>" />
<?php } else { ?>
<input type="text" name="filter_name" value="<?php echo $text_search; ?>" onclick="this.value = '';" onkeydown="this.style.color = '#000000';" />
<?php } ?>
<div class="button-search"></div>
</div>