Página 1 de 2

Módulo Fabricantes

Enviado: 28 Mai 2011, 23:24
por m.lirangi
Amigos, socorro!

Mudei o nome do módulo FABRICANTES para NOSSOS CLIENTES.
Instalei um add-on para ficar passando as logos do clientes e está funcionando como quero.
O que não ficou legal é que qdo se clica na logomarca do cliente o sistema acusa que não há registro para este FABRICANTE.

Bom criei no campo INFORMATIVOS uma nova pagina com o nome NOSSOS CLIENTES e queria que independente de qualquer logomarque que se clique seja redirecionada para esta pagina.

Alguem sabe qual arquivo devo alterar e oque devo alterar????

Obrigada!

Re: Módulo Fabricantes

Enviado: 30 Mai 2011, 09:39
por m.lirangi
up

Re: Módulo Fabricantes

Enviado: 30 Mai 2011, 16:33
por juliocesar757
m.lirangi escreveu:up
Não tem o link da loja? Esse tipo de problema é 'bão' a gente ver. Ou você poste o código do novo módulo.

Re: Módulo Fabricantes

Enviado: 30 Mai 2011, 16:51
por m.lirangi
juliocesar757 escreveu:
m.lirangi escreveu:up
Não tem o link da loja? Esse tipo de problema é 'bão' a gente ver. Ou você poste o código do novo módulo.

Julio, acho que vc não entendeu... não deu problema não, tá tudo certo lá, só que por padrão no modulo FABRICANTES qdo clicamos na imagem do fabricante (por exemplo: HP) o sistema inicia uma busca com todos os produtos HP, correto?!

O que eu quero é mudar isso. Qdo clicar sobre qualquer das imagens, ele difecionar para uma nova pagina que criei, a qual dei o nome de NOSSOS CLIENTES.

Tendeu?!!

Re: Módulo Fabricantes

Enviado: 31 Mai 2011, 18:09
por m.lirangi
alguem pode ajudar??

Re: Módulo Fabricantes

Enviado: 02 Jun 2011, 11:14
por rochester
Muda o TPL do seu catalog\view\theme\[tema]\template\module\manufacturer.tpl

No default está como
Código: Selecionar todos
 <div class="middle" style="text-align: center;">
    <select onchange="location = this.value">
      <option value=""><?php echo $text_select; ?></option>
      <?php foreach ($manufacturers as $manufacturer) { ?>
          <?php if ($manufacturer['manufacturer_id'] == $manufacturer_id) { ?>
              <option value="<?php echo str_replace('&', '&', $manufacturer['href']); ?>" selected="selected"><?php echo $manufacturer['name']; ?></option>
          <?php } else { ?>
              <option value="<?php echo str_replace('&', '&', $manufacturer['href']); ?>"><?php echo $manufacturer['name']; ?></option>
          <?php } ?>
      <?php } ?>
    </select>
  </div>
O que vc tem q mudar é o <option value="<?php echo str_replace('&', '&', $manufacturer['href']); ?>"> colocando no value="" a nova url

Re: Módulo Fabricantes

Enviado: 02 Jun 2011, 21:14
por m.lirangi
Rochester, tentei de tudo mas não deu certo...

Meu manufacturer.tpl foi substituido pelo Slide Brands, então foi ele que tentei alterar... veja abaixo:
Código: Selecionar todos
<script type="text/javascript" src="catalog/view/javascript/jquery/innerfade.js"></script>
<script type="text/javascript">
	$(document).ready(
		function(){
			$('ul#brands_slide').innerfade({
				speed: 1000,
				timeout: 5000,
				type: 'random',
				containerheight: '110px'
			});
		});
</script>

<div class="box">
	<div class="top"><img src="catalog/view/theme/default/image/brands.png" alt="" /><?php echo $heading_title; ?></div>
	<div class="middle" style="text-align: center;">
		<div class="brands_logo">
        	<ul id="brands_slide">
  				<?php foreach($manufacturers as $manufacturer): ?>
        		<li><a href="<?php echo str_replace('&', '&', $manufacturer['href']); ?>"><img src="<?php echo $manufacturer['preview']?>" alt="<?php echo $manufacturer['name']; ?>" /></a></li>
        		<?php endforeach; ?>
        	</ul>
		</div>
    <select onchange="location = this.value">
      <option value=""><?php echo $text_select; ?></option>
      <?php foreach ($manufacturers as $manufacturer) { ?>
      <?php if ($manufacturer['manufacturer_id'] == $manufacturer_id) { ?>
      <option value="<?php echo str_replace('&', '&', $manufacturer['href']); ?>" selected="selected"><?php echo $manufacturer['name']; ?></option>
      <?php } else { ?>
      <option value="<?php echo str_replace('&', '&', $manufacturer['href']); ?>"><?php echo $manufacturer['name']; ?></option>
      <?php } ?>
      <?php } ?>
    </select>
	</div>
	<div class="bottom">&nbsp;</div>
</div>

<style type="text/css">
.brands_logo { margin-left:-31px; }
.brands_logo img { border-radius:5px 5px; -moz-border-radius:5px 5px; }
.box .brands_logo { margin-top:5px; margin-left:3px; margim-bottom: 5px;}
.box .brands_logo ol,ul { list-style:none; }
ul#brands_slide li img{ padding: 0px; margin-left:0; }
</style>
<!--[if lte IE 7]>
<style type="text/css"> .brands_logo { margin-left:-195px; } .box .brands_logo { margin-top:-5px; } .box .brands_logo ol,ul { list-style:none; } ul#brands_slide li img { padding: 0px; margin-left:0; } </style>
<![endif]-->
Ocorre que ao clicar na imagem ele faz uma PESQUISA para aqueles FABRICANTES e não REDIRECIONA para alguma url. O que acho na verdade é que tenho q mudar isso, digo, ao invés de fazer pesquisa ele simplesmente tem que ir para a url tal... pode me ajudar?

Re: Módulo Fabricantes

Enviado: 03 Jun 2011, 10:03
por rochester
O innerfade não tem essa ação de pesquisa, isso deve estar no ul#brands_slide, deve ter algum link por aí.. posta o conteudo dele pra gente.

Re: Módulo Fabricantes

Enviado: 03 Jun 2011, 16:03
por m.lirangi
o Brands_slide é o composto por 3 arquivos, basicamente.
O manufacturer.tpl (código q postei acima)
O manufacturer.php abaixo, e o innerfade (a seguir)
Código: Selecionar todos
<?php  
class ControllerModuleManufacturer extends Controller {
	protected function index() {
		$this->language->load('module/manufacturer');	
		
		$this->data['heading_title'] = $this->language->get('heading_title');
		$this->data['text_select'] = $this->language->get('text_select');
		
		if (isset($this->request->get['manufacturer_id'])) {
			$this->data['manufacturer_id'] = $this->request->get['manufacturer_id'];
		} else {
			$this->data['manufacturer_id'] = 0;
		}
		
		$this->load->model('catalog/manufacturer');
		$this->load->model('tool/seo_url');
		//Marka Logolari
		$this->load->model('tool/image'); 
		 
		$this->data['manufacturers'] = array();
		
		$results = $this->model_catalog_manufacturer->getManufacturers();
		
		foreach ($results as $result) {
			$this->data['manufacturers'][] = array(
				'manufacturer_id' => $result['manufacturer_id'],
				'name'            => $result['name'],
				//Marka logoları resim boyutu
				'preview'         => $this->model_tool_image->resize($result['image'], 150, 100),
				'href'            => $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/manufacturer&manufacturer_id=' . $result['manufacturer_id'])
			);
		}
		
		$this->id = 'manufacturer';
		
		if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/module/manufacturer.tpl')) {
			$this->template = $this->config->get('config_template') . '/template/module/manufacturer.tpl';
		} else {
			$this->template = 'default/template/module/manufacturer.tpl';
		}
		
		$this->render(); 
	}
}
?>
Código: Selecionar todos
(function($) {

    $.fn.innerfade = function(options) {
        return this.each(function() {   
            $.innerfade(this, options);
        });
    };

    $.innerfade = function(container, options) {
        var settings = {
        	'animationtype':    'fade',
            'speed':            'normal',
            'type':             'sequence',
            'timeout':          2000,
            'containerheight':  'auto',
            'runningclass':     'innerfade',
            'children':         null
        };
        if (options)
            $.extend(settings, options);
        if (settings.children === null)
            var elements = $(container).children();
        else
            var elements = $(container).children(settings.children);
        if (elements.length > 1) {
            $(container).css('position', 'relative').css('height', settings.containerheight).addClass(settings.runningclass);
            for (var i = 0; i < elements.length; i++) {
                $(elements[i]).css('z-index', String(elements.length-i)).css('position', 'absolute').hide();
            };
            if (settings.type == "sequence") {
                setTimeout(function() {
                    $.innerfade.next(elements, settings, 1, 0);
                }, settings.timeout);
                $(elements[0]).show();
            } else if (settings.type == "random") {
            		var last = Math.floor ( Math.random () * ( elements.length ) );
                setTimeout(function() {
                    do { 
												current = Math.floor ( Math.random ( ) * ( elements.length ) );
										} while (last == current );             
										$.innerfade.next(elements, settings, current, last);
                }, settings.timeout);
                $(elements[last]).show();
						} else if ( settings.type == 'random_start' ) {
								settings.type = 'sequence';
								var current = Math.floor ( Math.random () * ( elements.length ) );
								setTimeout(function(){
									$.innerfade.next(elements, settings, (current + 1) %  elements.length, current);
								}, settings.timeout);
								$(elements[current]).show();
						}	else {
							alert('Innerfade-Type must either be \'sequence\', \'random\' or \'random_start\'');
						}
				}
    };

    $.innerfade.next = function(elements, settings, current, last) {
        if (settings.animationtype == 'slide') {
            $(elements[last]).slideUp(settings.speed);
            $(elements[current]).slideDown(settings.speed);
        } else if (settings.animationtype == 'fade') {
            $(elements[last]).fadeOut(settings.speed);
            $(elements[current]).fadeIn(settings.speed, function() {
							removeFilter($(this)[0]);
						});
        } else
            alert('Innerfade-animationtype must either be \'slide\' or \'fade\'');
        if (settings.type == "sequence") {
            if ((current + 1) < elements.length) {
                current = current + 1;
                last = current - 1;
            } else {
                current = 0;
                last = elements.length - 1;
            }
        } else if (settings.type == "random") {
            last = current;
            while (current == last)
                current = Math.floor(Math.random() * elements.length);
        } else
            alert('Innerfade-Type must either be \'sequence\', \'random\' or \'random_start\'');
        setTimeout((function() {
            $.innerfade.next(elements, settings, current, last);
        }), settings.timeout);
    };

})(jQuery);

// **** remove Opacity-Filter in ie ****
function removeFilter(element) {
	if(element.style.removeAttribute){
		element.style.removeAttribute('filter');
	}
}
Se puder ajudar, agradeço!

Re: Módulo Fabricantes

Enviado: 03 Jun 2011, 16:08
por rochester
tá faltando arquivo ainda... nao tem nada de ação nesses, só dos slides.. essa ul#brands_slide vem de onde?