Fórum OpenCart Brasil

Por um e-commerce livre, confiável e profissional

Suporte geral sobre problemas técnicos para OpenCart v1.x.
#19423
adicione essas linhas no arquivo catalog -> view -> theme -> SEU_TEMA -> stylesheet -> stylesheet.css
Código: Selecionar todos
#footer #search {
	position: relative;
	z-index: 15;
}
#footer .button-search {
	background: url('../image/button-search.png') center center no-repeat;
	width: 28px;
	height: 24px;
	border-right: 1px solid #CCCCCC;
	cursor: pointer;
	float:left;
	position:relative;
	left:30px;
}
#footer #search input {
	background: #FFF;
	padding: 1px 1px 1px 33px;
	width: 262px;
	height: 21px;
	border: 1px solid #CCCCCC;
	-webkit-border-radius: 3px 3px 3px 3px;
	-moz-border-radius: 3px 3px 3px 3px;
	-khtml-border-radius: 3px 3px 3px 3px;
	border-radius: 3px 3px 3px 3px;
	-webkit-box-shadow: 0px 2px 0px #F0F0F0;
	-moz-box-shadow: 0px 2px 0px #F0F0F0;
	box-shadow: 0px 2px 0px #F0F0F0;
}
no arquivo catalog/view/javascript/common.js substitua:
Código: Selecionar todos
$('#header input[name=\'filter_name\']').bind('keydown', function(e) {
por
Código: Selecionar todos
$('input[name=\'filter_name\']').bind('keydown', function(e) {

adicione essas linhas no arquivo catalog -> view -> theme -> SEU_TEMA -> template -> common -> footer.tpl
Código: Selecionar todos

<div id="search">
    <div class="button-search"></div>
    <?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>


e por fim, adicione essas linhas no arquivo catalog/controller/common/footer.php
Código: Selecionar todos

$this->language->load('common/header');
		$this->data['text_search'] = $this->language->get('text_search');
		if (isset($this->request->get['filter_name'])) {
			$this->data['filter_name'] = $this->request->get['filter_name'];
		} else {
			$this->data['filter_name'] = '';
		}

#19574
Blz Valdeir? Valeu pela ajuda, apareceu certinho, mas acontece um erro, bem na frente do botão: Notice: Undefined variable: filter_name e, e text_name (esta dentro do botão de busca, clicando desaparece a mensagem. O que será? Ah, o buscador não funciona, digo, digito o nome de um produto e ele vai para a página de busca somente.
#25876
Fiz aqui, e não consegui fazer funcionar tambem..pois quando você digita algo para buscar ele vai para a página de busca só que faz a busca com o que esta na barra : Digite%20o%20nome%20do%20produto

ou seja ele não busca o que eu digitei e sim o que já estava preenchido por padrão na barra de busca... muito estranho!!