Fórum OpenCart Brasil

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

Suporte geral sobre problemas técnicos para OpenCart v1.x.
#47821
Queridos amigos do Fórum bom dia!

Uma Cliente me ligou hj dizendo que nao estava conseguindo cadastrar, aparecia um erro na tela!

Aparece isto assim que finaliza o cadastro:

Warning: Cannot modify header information -
headers already sent by (output started at /home/louva601/public_html/catalog/language/portuguese-br/account/register.php:1)
in /home/louva601/public_html/vqmod/vqcache/vq2-system_engine_controller.php on line 28
Warning: Cannot modify header information -
headers already sent by (output started at /home/louva601/public_html/catalog/language/portuguese-br/account/register.php:1)
in /home/louva601/public_html/vqmod/vqcache/vq2-system_engine_controller.php on line 29

==================
Mesmo aparecendo isso quando a pessoa atualiza a pagina ou volta ao site o cadastro foi feito e a pessoa ja aparece logada!

Quem souber o que posso alterar ou se fiz alguma alteração que derrepente esta causando isso, por favor me ajude pois estou perdendo vendas, percebi muitos casdastros sem venda de um tempo pra cá!

Att, Luciano Ferrer
#47832
Olá,

Você deve ter alterado diretamente os arquivos de tradução da loja e deixou um espaço antes da tag <?php, neste caso remova o espaço que o erro não será mais exibido.

Espero ter ajudado. :D
#47833
Manoel obrigado pela prontidão de sempre!

O Problema que a ultima alteração que lembro foi no campo "Empresa" eu coloquei para não ser obrigatório, olhei a linha do erro e realmente parece ser isso mas não sei em qual arquivo esta este erro!

se puder me ajudar agradeço muito!

Att, Luciano Ferrer
#47835
Isso é o que esta aparecendo nos logs de erros:

2014-01-29 17:08:29 - PHP Notice: Undefined variable: entry_account in /home/louva601/public_html/catalog/view/theme/megastore/template/account/register.tpl on line 87
2014-01-29 17:20:00 - PHP Notice: Undefined variable: entry_account in /home/louva601/public_html/catalog/view/theme/megastore/template/account/register.tpl on line 81
2014-01-29 17:21:31 - PHP Warning: Cannot modify header information - headers already sent by (output started at /home/louva601/public_html/catalog/language/portuguese-br/account/register.php:1) in /home/louva601/public_html/vqmod/vqcache/vq2-system_engine_controller.php on line 28
2014-01-29 17:21:31 - PHP Warning: Cannot modify header information - headers already sent by (output started at /home/louva601/public_html/catalog/language/portuguese-br/account/register.php:1) in /home/louva601/public_html/vqmod/vqcache/vq2-system_engine_controller.php on line 29
#47839
Sim meu amigo, veja esse erro que você postou

public_html/catalog/view/theme/megastore/template/account/register.tpl on line 87

Cada palavra antes da " / " significa uma pasta ou seja: pasta public_html (depois) catalog (depois ) assim por diante

até voce chegar no arquivo register.tpl na linha 87, para verificar a linha com o erro, coloca o código no Notepad ++, um programa gratuito

para edição de CSS, PHP etc etv
#47840
Querido eu coloquei um backup deste codigo que tenho salvo de 6 meses atraz, acho que nessa epoca esse erro nao aparecia!

Aqui esta o codigo que nao acho o erro:

=======================================================================================

<?php echo $header; ?>
<?php $grid = 12; if($column_left != '') { $grid = $grid-3; } if($column_right != '') { $grid = $grid-3; } ?>

<div class="page-title">

<div class="set-size">

<div class="grid-12">

<div class="breadcrumb">
<?php foreach ($breadcrumbs as $breadcrumb) { ?>
<?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
<?php } ?>
</div>
<h3><?php echo $heading_title; ?></h3>

</div>

</div>

<p class="border"></p>

</div>

<div id="content" class="set-size"><?php if ($error_warning) { ?>
<div class="warning"><?php echo $error_warning; ?></div>
<?php } ?><?php echo $content_top; ?><?php if($column_left != '') { echo '<div class="grid-3 float-left">'.$column_left.'</div>'; } ?>

<div class="grid-<?php echo $grid; ?> float-left">

<p class="clear" style="height:20px;"></p>


<p><?php echo $text_account_already; ?></p>
<form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data">
<h2><?php echo $text_your_details; ?></h2>
<div class="content">
<table class="form">
<tr>
<td><span class="required">*</span><?php echo $entry_firstname; ?></td>
<td><input type="text" name="firstname" value="<?php echo $firstname; ?>" />
<?php if ($error_firstname) { ?>
<span class="error"><?php echo $error_firstname; ?></span>
<?php } ?></td>
</tr>
<tr>
<td><span class="required">*</span><?php echo $entry_lastname; ?></td>
<td><input type="text" name="lastname" value="<?php echo $lastname; ?>" />
<?php if ($error_lastname) { ?>
<span class="error"><?php echo $error_lastname; ?></span>
<?php } ?></td>
</tr>
<tr>
<td><span class="required">*</span><?php echo $entry_email; ?></td>
<td><input type="text" name="email" value="<?php echo $email; ?>" />
<?php if ($error_email) { ?>
<span class="error"><?php echo $error_email; ?></span>
<?php } ?></td>
</tr>
<tr>
<td><span class="required">*</span><?php echo $entry_telephone; ?></td>
<td><input type="text" name="telephone" value="<?php echo $telephone; ?>" />
<?php if ($error_telephone) { ?>
<span class="error"><?php echo $error_telephone; ?></span>
<?php } ?></td>
</tr>
<tr>
<td><?php echo $entry_fax; ?></td>
<td><input type="text" name="fax" value="<?php echo $fax; ?>" /></td>
</tr>
</table>
</div>
<h2><?php echo $text_your_address; ?></h2>
<div class="content">
<table class="form">
<tr>
<td><?php echo $entry_company; ?></td>
<td><input type="text" name="company" value="<?php echo $company; ?>" /></td>
</tr>
<tr style="display:<?php echo (count($customer_groups) > 1 ? 'table-row' : 'none'); ?>;">
<td><?php echo $entry_account; ?></td>
<td><select name="customer_group_id">
<?php foreach ($customer_groups as $customer_group) { ?>
<?php if ($customer_group['customer_group_id'] == $customer_group_id) { ?>
<option value="<?php echo $customer_group['customer_group_id']; ?>" selected="selected"><?php echo $customer_group['name']; ?></option>
<?php } else { ?>
<option value="<?php echo $customer_group['customer_group_id']; ?>"><?php echo $customer_group['name']; ?></option>
<?php } ?>
<?php } ?>
</select></td>
</tr>
<tr id="company-id-display">
<td><span id="company-id-required" class="required">*</span><?php echo $entry_company_id; ?></td>
<td><input type="text" name="company_id" value="<?php echo $company_id; ?>" />
<?php if ($error_company_id) { ?>
<span class="error"><?php echo $error_company_id; ?></span>
<?php } ?></td>
</tr>
<tr id="tax-id-display">
<td><span id="tax-id-required" class="required">*</span><?php echo $entry_tax_id; ?></td>
<td><input type="text" name="tax_id" value="<?php echo $tax_id; ?>" />
<?php if ($error_tax_id) { ?>
<span class="error"><?php echo $error_tax_id; ?></span>
<?php } ?></td>
</tr>
<tr>
<td><span class="required">*</span><?php echo $entry_address_1; ?></td>
<td><input type="text" name="address_1" value="<?php echo $address_1; ?>" />
<?php if ($error_address_1) { ?>
<span class="error"><?php echo $error_address_1; ?></span>
<?php } ?></td>
</tr>
<tr>
<td><span class="required">*</span><?php echo $entry_address_2; ?></td>
<td><input type="text" name="address_2" value="<?php echo $address_2; ?>" /></td>
</tr>
<tr>
<td><span class="required">*</span><?php echo $entry_city; ?></td>
<td><input type="text" name="city" value="<?php echo $city; ?>" />
<?php if ($error_city) { ?>
<span class="error"><?php echo $error_city; ?></span>
<?php } ?></td>
</tr>
<tr>
<td><span id="postcode-required" class="required">*</span><?php echo $entry_postcode; ?></td>
<td><input type="text" name="postcode" value="<?php echo $postcode; ?>" />
<?php if ($error_postcode) { ?>
<span class="error"><?php echo $error_postcode; ?></span>
<?php } ?></td>
</tr>
<tr>
<td><span class="required">*</span><?php echo $entry_country; ?></td>
<td><select name="country_id">
<option value=""><?php echo $text_select; ?></option>
<?php foreach ($countries as $country) { ?>
<?php if ($country['country_id'] == $country_id) { ?>
<option value="<?php echo $country['country_id']; ?>" selected="selected"><?php echo $country['name']; ?></option>
<?php } else { ?>
<option value="<?php echo $country['country_id']; ?>"><?php echo $country['name']; ?></option>
<?php } ?>
<?php } ?>
</select>
<?php if ($error_country) { ?>
<span class="error"><?php echo $error_country; ?></span>
<?php } ?></td>
</tr>
<tr>
<td><span class="required">*</span><?php echo $entry_zone; ?></td>
<td><select name="zone_id">
</select>
<?php if ($error_zone) { ?>
<span class="error"><?php echo $error_zone; ?></span>
<?php } ?></td>
</tr>
</table>
</div>
<h2><?php echo $text_your_password; ?></h2>
<div class="content">
<table class="form">
<tr>
<td><span class="required">*</span><?php echo $entry_password; ?></td>
<td><input type="password" name="password" value="<?php echo $password; ?>" />
<?php if ($error_password) { ?>
<span class="error"><?php echo $error_password; ?></span>
<?php } ?></td>
</tr>
<tr>
<td><span class="required">*</span><?php echo $entry_confirm; ?></td>
<td><input type="password" name="confirm" value="<?php echo $confirm; ?>" />
<?php if ($error_confirm) { ?>
<span class="error"><?php echo $error_confirm; ?></span>
<?php } ?></td>
</tr>
</table>
</div>
<h2><?php echo $text_newsletter; ?></h2>
<div class="content">
<table class="form">
<tr>
<td><?php echo $entry_newsletter; ?></td>
<td><?php if ($newsletter) { ?>
<input type="radio" name="newsletter" value="1" checked="checked" />
<?php echo $text_yes; ?>
<input type="radio" name="newsletter" value="0" />
<?php echo $text_no; ?>
<?php } else { ?>
<input type="radio" name="newsletter" value="1" />
<?php echo $text_yes; ?>
<input type="radio" name="newsletter" value="0" checked="checked" />
<?php echo $text_no; ?>
<?php } ?></td>
</tr>
</table>
</div>
<?php if ($text_agree) { ?>
<div class="buttons">
<div class="right"><?php echo $text_agree; ?>
<?php if ($agree) { ?>
<input type="checkbox" name="agree" value="1" checked="checked" />
<?php } else { ?>
<input type="checkbox" name="agree" value="1" />
<?php } ?>
<input type="submit" value="<?php echo $button_continue; ?>" class="button" />
</div>
</div>
<?php } else { ?>
<div class="buttons">
<div class="right">
<input type="submit" value="<?php echo $button_continue; ?>" class="button" />
</div>
</div>
<?php } ?>
</form>
<script type="text/javascript"><!--
$('select[name=\'customer_group_id\']').live('change', function() {
var customer_group = [];<?php foreach ($customer_groups as $customer_group) { ?>
customer_group[<?php echo $customer_group['customer_group_id']; ?>] = [];
customer_group[<?php echo $customer_group['customer_group_id']; ?>]['company_id_display'] = '<?php echo $customer_group['company_id_display']; ?>';
customer_group[<?php echo $customer_group['customer_group_id']; ?>]['company_id_required'] = '<?php echo $customer_group['company_id_required']; ?>';
customer_group[<?php echo $customer_group['customer_group_id']; ?>]['tax_id_display'] = '<?php echo $customer_group['tax_id_display']; ?>';
customer_group[<?php echo $customer_group['customer_group_id']; ?>]['tax_id_required'] = '<?php echo $customer_group['tax_id_required']; ?>';
<?php } ?>

if (customer_group[this.value]) {
if (customer_group[this.value]['company_id_display'] == '1') {
$('#company-id-display').show();
} else {
$('#company-id-display').hide();
}

if (customer_group[this.value]['company_id_required'] == '1') {
$('#company-id-required').show();
} else {
$('#company-id-required').hide();
}

if (customer_group[this.value]['tax_id_display'] == '1') {
$('#tax-id-display').show();
} else {
$('#tax-id-display').hide();
}

if (customer_group[this.value]['tax_id_required'] == '1') {
$('#tax-id-required').show();
} else {
$('#tax-id-required').hide();
}
}
});

$('select[name=\'customer_group_id\']').trigger('change');
//--></script>
<script type="text/javascript"><!--
$('select[name=\'country_id\']').bind('change', function() {
$.ajax({
url: 'index.php?route=account/register/country&country_id=' + this.value,
dataType: 'json',
beforeSend: function() {
$('select[name=\'country_id\']').after('<span class="wait">&nbsp;<img src="catalog/view/theme/default/image/loading.gif" alt="" /></span>');
},
complete: function() {
$('.wait').remove();
},
success: function(json) {
if (json['postcode_required'] == '1') {
$('#postcode-required').show();
} else {
$('#postcode-required').hide();
}

html = '<option value=""><?php echo $text_select; ?></option>';

if (json['zone'] != '') {
for (i = 0; i < json['zone'].length; i++) {
html += '<option value="' + json['zone']['zone_id'] + '"';

if (json['zone']['zone_id'] == '<?php echo $zone_id; ?>') {
html += ' selected="selected"';
}

html += '>' + json['zone']['name'] + '</option>';
}
} else {
html += '<option value="0" selected="selected"><?php echo $text_none; ?></option>';
}

$('select[name=\'zone_id\']').html(html);
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
});

$('select[name=\'country_id\']').trigger('change');
//--></script>
<script type="text/javascript"><!--
$('.colorbox').colorbox({
width: 640,
height: 480
});
//--></script>

</div><?php if($column_right != '') { echo '<div class="grid-3 float-left">'.$column_right.'</div>'; } ?><?php echo $content_bottom; ?>

</div><?php echo $footer; ?>