Добрый вечер! Недавно возникла проблема с поиском при вводе товара, товар нахоидт, показывает, всё хорошо. Но когда нажимаешь "Найти" в адерсную страку после домен.ру/ подставляется > сивол и поиск выдает ошибку.
Из файла /catalog/view/theme/тема/template/common/header.tpl
var selector = '#search';
var total = 0;
var show_image = 'true';
var show_price = 'true';
var search_sub_category = true;
var search_description = false;
var width = 62;
var height = 62;
$(selector).find('input[name=\'search\']').autocomplete({
delay: 500,
source: function(request, response) {
var limit = 5;
var search_sub_category = search_sub_category?'&sub_category=true':'';
var search_description = search_description?'&description=true':'';
$.ajax({
url: 'index.php?route=module/pavautosearch/autocomplete&width='+width+'&height='+height+'&limit='+limit+search_sub_category+search_description+'&filter_name='+encodeURIComponent(request.term),
dataType: 'json',
success: function(json) {
response($.map(json, function(item) {
if($('.pavautosearch_result')){
$('.pavautosearch_result').first().html("");
}
total = 0;
if(item.total){
total = item.total;
}
return {
price: item.price,
label: item.name,
image: item.image,
link: item.link,
value: item.product_id
}
}));
}
});
},
select: function(event, ui) {
return false;
},
focus: function(event, ui) {
return false;
}
})
<div id="search">
<!--<div class="button-search"></div>-->
<!--<div class="button-search2"></div>-->
<input class="search-field" type="text" name="search" placeholder="Поиск по сайту" value="<?php echo $search; ?>" id="mysearch">
<button class="button-search-delete"></button>
<button class="button-search2">Найти</button>
<script>
function DeleteRender(){
if($('.search-field').val()==''){
$('.button-search-delete').css('display', 'none')
}
else{
$('.button-search-delete').css('display', 'block')
}
}
window.onload = function(){
DeleteRender()
}
$('.search-field').on('keyup', function(){
DeleteRender()
})
$('.button-search-delete').on('click', function(){
$('.search-field').val('')
$('.search-field').focus()
$('.button-search-delete').css('display', 'none')
})
</script>
</div>
</div>
Лишних символов > не нашел. Где еще можно поискать проблему или как решить?