Página 1 de 1

Modulo de Sedex + Header modificado = Problema

Enviado: 31 Jan 2011, 19:40
por hittokiri
Aew galerinha blz?

Sou novo aqui no forum e no sistema opencart.

É o seguinte, ja criei um layout para o sistema, tudo bonitinho, porem toh com problema no modulo do sedex 1.3 que tem aqui no forum, passei o fds todo quebrando a cabeça e nao consegui resolver o meu problema.
O que esta ocorrendo é o seguinte, depois de instalado o modulo de sedex, ele funciona certinho, porem se eu mudar qualquer coisa no meu header como por exemplo trocar a imagem pelo painel de controle, ou eu editar algum coisa no meu header.tpl, o sistema começa a cobrar o frete dobrado, por exemplo se o frete é 10,00, ele passa a cobrar 20,00 sózinho, e mesmo reinstalando o modulo o mesmo nao volta ao normal, ja nao sei mais o que pode ser, então decidi pedir ajuda para vocês.

Alguem pode me dar uma luz do que pode ser?

Segue abaixo meu header.tpl

Código: Selecionar todos
<?php if (isset($_SERVER['HTTP_USER_AGENT']) && !strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6')) echo '<?xml version="1.0" encoding="UTF-8"?>'. "\n"; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="<?php echo $direction; ?>" lang="<?php echo $lang; ?>" xml:lang="<?php echo $lang; ?>">
<head>
<title><?php echo $title; ?></title>
<?php if ($keywords) { ?>
<meta name="keywords" content="<?php echo $keywords; ?>" />
<?php } ?>
<?php if ($description) { ?>
<meta name="description" content="<?php echo $description; ?>" />
<?php } ?>
<base href="<?php echo $base; ?>" />
<?php if ($icon) { ?>
<link href="<?php echo $icon; ?>" rel="icon" />
<?php } ?>
<?php foreach ($links as $link) { ?>
<link href="<?php echo str_replace('&', '&', $link['href']); ?>" rel="<?php echo $link['rel']; ?>" />
<?php } ?>
<link rel="stylesheet" type="text/css" href="catalog/view/theme/<?php echo $template; ?>/stylesheet/stylesheet.css" />
<!--[if gte IE 7]>
<link rel="stylesheet" type="text/css" href="catalog/view/theme/simplecart-black/stylesheet/ie.css" />
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="catalog/view/theme/simplecart-black/stylesheet/ie6.css" />
<script type="text/javascript" src="catalog/view/javascript/DD_belatedPNG_0.0.8a-min.js"></script>
<script>
DD_belatedPNG.fix('img, #header .div3 a, #content .left, #content .right, .box .top');
</script>
<![endif]-->
<?php foreach ($styles as $style) { ?>
<link rel="<?php echo $style['rel']; ?>" type="text/css" href="<?php echo $style['href']; ?>" media="<?php echo $style['media']; ?>" />
<?php } ?>
<script type="text/javascript" src="catalog/view/javascript/jquery/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="catalog/view/javascript/jquery/thickbox/thickbox-compressed.js"></script>
<link rel="stylesheet" type="text/css" href="catalog/view/javascript/jquery/thickbox/thickbox.css" />
<script type="text/javascript" src="catalog/view/javascript/jquery/tab.js"></script>
<?php foreach ($scripts as $script) { ?>
<script type="text/javascript" src="<?php echo $script; ?>"></script>
<?php } ?>
<script type="text/javascript"><!--
function bookmark(url, title) {
	if (window.sidebar) { // firefox
    window.sidebar.addPanel(title, url, "");
	} else if(window.opera && window.print) { // opera
		var elem = document.createElement('a');
		elem.setAttribute('href',url);
		elem.setAttribute('title',title);
		elem.setAttribute('rel','sidebar');
		elem.click();
	} else if(document.all) {// ie
   		window.external.AddFavorite(url, title);
	}
}
//--></script>
</head>
<body>
<!-- Wrapper Starts -->
	<div id="wrapper">
	<!-- Header Starts -->
		<div id="header" class="clearfix">
		<!-- Logo Starts -->
			<?php if ($logo) { ?>
				<h1><a href="<?php echo str_replace('&', '&', $home); ?>"><img src="<?php echo $logo; ?>" title="<?php echo $store; ?>" alt="<?php echo $store; ?>" /></a></h1>
			<?php } ?>
		<!-- Logo Ends -->			
		<!-- Search Starts -->
			<div id="search" class="search clearfix">
			<!-- Form Starts -->
				 <?php if ($keyword) { ?>
					<input type="text" value="<?php echo $keyword; ?>" id="filter_keyword" class="search-input" />
				<?php } else { ?>
					<input type="text" value="<?php echo $text_keyword; ?>" id="filter_keyword" onclick="this.value = '';" onkeydown="this.style.color = '#000000'" style="color: #999;" class="search-input" />
				<?php } ?>
                <select id="filter_category_id" class="search-input1">                
	                <option value="0"><?php echo $text_category; ?></option>                
                    <?php foreach ($categories as $category) { ?>                
                        <?php if ($category['category_id'] == $category_id) { ?>                
							<option value="<?php echo $category['category_id']; ?>" selected="selected"><?php echo $category['name']; ?></option>                
                        <?php } else { ?>                
	                  		<option value="<?php echo $category['category_id']; ?>"><?php echo $category['name']; ?></option>                
                        <?php } ?>                
                    <?php } ?>                
                </select>
                <a onclick="moduleSearch();" class="search-button">Search</span></a>
			<!-- Form Ends -->
			</div>
		<!-- Search Ends -->
		</div>
	<!-- Header Ends -->
	<!-- Menu Starts -->	
		<div id="menu" class="clearfix">
		<!-- Menu Items Starts -->
			<ul>
				<li><a href="<?php echo str_replace('&', '&', $home); ?>" id="tab_home"><?php echo $text_home; ?></a></li>					
				<?php if (!$logged) { ?>
					<li><a href="<?php echo str_replace('&', '&', $login); ?>" id="tab_login"><?php echo $text_login; ?></a></li>
				<?php } else { ?>
					<li><a href="<?php echo str_replace('&', '&', $logout); ?>" id="tab_logout"><?php echo $text_logout; ?></a></li>
				<?php } ?>
				<li><a href="<?php echo str_replace('&', '&', $account); ?>" id="tab_account"><?php echo $text_account; ?></a></li>	
				<li><a href="<?php echo str_replace('&', '&', $cart); ?>" id="tab_cart"><?php echo $text_cart; ?></a></li>	
				<li><a href="<?php echo str_replace('&', '&', $checkout); ?>" id="tab_checkout"><?php echo $text_checkout; ?></a></li>	
				<li><a href="<?php echo str_replace('&', '&', $special); ?>"><?php echo $text_special; ?></a></li>	
				<li><a href="<?php echo str_replace('&', '&', $contact); ?>"><?php echo $text_contact; ?></a></li>	
			</ul>
		<!-- Menu Items Ends -->
		<!-- Currency and Languages Starts -->
			<div class="floatright">
			<!-- Currency Starts -->
				<?php if ($currencies) { ?>
					<form action="<?php echo str_replace('&', '&', $action); ?>" method="post" enctype="multipart/form-data" id="currency_form">
					  <div class="switcher">
						<?php foreach ($currencies as $currency) { ?>
						<?php if ($currency['code'] == $currency_code) { ?>
						<div class="selected"><a><?php echo $currency['title']; ?></a></div>
						<?php } ?>
						<?php } ?>
						<div class="option">
						  <?php foreach ($currencies as $currency) { ?>
						  <a onclick="$('input[name=\'currency_code\']').attr('value', '<?php echo $currency['code']; ?>'); $('#currency_form').submit();"><?php echo $currency['title']; ?></a>
						  <?php } ?>
						</div>
					  </div>
					  <div style="display: inline;">
						<input type="hidden" name="currency_code" value="" />
						<input type="hidden" name="redirect" value="<?php echo $redirect; ?>" />
					  </div>
					</form>
				<?php } ?>
			<!-- Currency Ends -->				
			<!-- Language Starts -->            
				<?php if ($languages) { ?>
					<form action="<?php echo str_replace('&', '&', $action); ?>" method="post" enctype="multipart/form-data" id="language_form">
					  <div class="switcher">
						<?php foreach ($languages as $language) { ?>
						<?php if ($language['code'] == $language_code) { ?>
						<div class="selected"><a><img src="image/flags/<?php echo $language['image']; ?>" alt="<?php echo $language['name']; ?>" />&nbsp;&nbsp;<?php echo $language['name']; ?></a></div>
						<?php } ?>
						<?php } ?>
						<div class="option">
						  <?php foreach ($languages as $language) { ?>
						  <a onclick="$('input[name=\'language_code\']').attr('value', '<?php echo $language['code']; ?>'); $('#language_form').submit();"><img src="image/flags/<?php echo $language['image']; ?>" alt="<?php echo $language['name']; ?>" />&nbsp;&nbsp;<?php echo $language['name']; ?></a>
						  <?php } ?>
						</div>
					  </div>
					  <div>
						<input type="hidden" name="language_code" value="" />
						<input type="hidden" name="redirect" value="<?php echo $redirect; ?>" />
					  </div>
					</form>
					<?php } ?>
			<!-- Language Ends --> 
			</div>
		<!-- Currency and Languages Ends -->
		</div>
	<!-- Menu Ends -->
	<!-- Breadcrumb Starts -->
		<?php if (isset($common_error)) { ?>
			<div class="warning clearfix"><?php echo $common_error; ?></div>
		<?php } ?>
		<?php if (isset($breadcrumbs)) { ?>
			<div id="breadcrumb" class="clearfix">
				<?php foreach ($breadcrumbs as $breadcrumb) { ?>
					<?php echo $breadcrumb['separator']; ?><a href="<?php echo str_replace('&', '&', $breadcrumb['href']); ?>"><?php echo $breadcrumb['text']; ?></a>
				<?php } ?>
			</div>
		<?php } ?>
	<!-- Breadcrumb Ends -->
	<!-- Container Starts -->
		<div id="container" class="clearfix">
		
<script type="text/javascript"><!-- 
function getURLVar(urlVarName) {
	var urlHalves = String(document.location).toLowerCase().split('?');
	var urlVarValue = '';
	
	if (urlHalves[1]) {
		var urlVars = urlHalves[1].split('&');

		for (var i = 0; i <= (urlVars.length); i++) {
			if (urlVars[i]) {
				var urlVarPair = urlVars[i].split('=');
				
				if (urlVarPair[0] && urlVarPair[0] == urlVarName.toLowerCase()) {
					urlVarValue = urlVarPair[1];
				}
			}
		}
	}
	
	return urlVarValue;
} 

$(document).ready(function() {
	route = getURLVar('route');
	
	if (!route) {
		$('#tab_home').addClass('selected');
	} else {
		part = route.split('/');
		
		if (route == 'common/home') {
			$('#tab_home').addClass('selected');
		} else if (route == 'account/login') {
			$('#tab_login').addClass('selected');	
		} else if (part[0] == 'account') {
			$('#tab_account').addClass('selected');
		} else if (route == 'checkout/cart') {
			$('#tab_cart').addClass('selected');
		} else if (part[0] == 'checkout') {
			$('#tab_checkout').addClass('selected');
		} else {
			$('#tab_home').addClass('selected');
		}
	}
});
//--></script>
<script type="text/javascript"><!--
$('#search input').keydown(function(e) {
	if (e.keyCode == 13) {
		moduleSearch();
	}
});

function moduleSearch() {
	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>
<script type="text/javascript"><!--
$('.switcher').bind('click', function() {
	$(this).find('.option').slideToggle('fast');
});
$('.switcher').bind('mouseleave', function() {
	$(this).find('.option').slideUp('fast');
}); 
//--></script>

Re: Modulo de Sedex + Header modificado = Problema

Enviado: 02 Fev 2011, 23:52
por Manoel Vidal
Olá hittokiri,

Conseguiu resolver o problema? Dei uma olhada superficial mas não vida nada anormal.