Fórum OpenCart Brasil

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

#77788
<?xml version="1.0" encoding="utf-8"?>
<modification>
<name>Pular Segunda Etapa checkout ( Endereço Fatura ) v1.0 - LhCode</name>
<code>Pular Segunda Etapa checkout ( Endereço Fatura ) v1.0 - LhCode</code>
<version>1.0</version>
<author>Luiz Henrique P. Ferreira</author>
<link>http://www.lhcode.com.br</link>
<file path="catalog/view/theme/default/template/checkout/checkout.tpl">
<operation>
<search ><![CDATA[$('#collapse-payment-address').parent().find('.panel-heading .panel-title').html('<a href="#collapse-payment-address" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle"><?php echo $text_checkout_payment_address; ?> <i class="fa fa-caret-down"></i></a>');]]></search>
<add position="replace" index="02"><![CDATA[
$('#collapse-payment-address .panel-body').hide();
skippayment();
]]></add>
</operation>
<operation>
<search><![CDATA[$(document).delegate('#button-payment-address', 'click', function() {]]></search>
<add position="replace" offset="90"><![CDATA[
function skippayment(){
$.ajax({
url: 'index.php?route=checkout/payment_address/save',
type: 'post',
data: $('#collapse-payment-address input[type=\'text\'], #collapse-payment-address input[type=\'date\'], #collapse-payment-address input[type=\'datetime-local\'], #collapse-payment-address input[type=\'time\'], #collapse-payment-address input[type=\'password\'], #collapse-payment-address input[type=\'checkbox\']:checked, #collapse-payment-address input[type=\'radio\']:checked, #collapse-payment-address input[type=\'hidden\'], #collapse-payment-address textarea, #collapse-payment-address select'),
dataType: 'json',
beforeSend: function() {
$('#button-payment-address').button('loading');
},
complete: function() {
$('#button-payment-address').button('reset');
},
success: function(json) {
$('.alert, .text-danger').remove();

if (json['redirect']) {
location = json['redirect'];
} else if (json['error']) {
if (json['error']['warning']) {
$('#collapse-payment-address .panel-body').prepend('<div class="alert alert-warning">' + json['error']['warning'] + '<button type="button" class="close" data-dismiss="alert">&times;</button></div>');
}

for (i in json['error']) {
var element = $('#input-payment-' + i.replace('_', '-'));

if ($(element).parent().hasClass('input-group')) {
$(element).parent().after('<div class="text-danger">' + json['error'] + '</div>');
} else {
$(element).after('<div class="text-danger">' + json['error'] + '</div>');
}
}

// Highlight any found errors
$('.text-danger').parent().parent().addClass('has-error');
} else {
<?php if ($shipping_required) { ?>
$.ajax({
url: 'index.php?route=checkout/shipping_address',
dataType: 'html',
success: function(html) {
$('#collapse-shipping-address .panel-body').html(html);

$('#collapse-shipping-address').parent().find('.panel-heading .panel-title').html('<a href="#collapse-shipping-address" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle"><?php echo $text_checkout_shipping_address; ?> <i class="fa fa-caret-down"></i></a>');

$('a[href=\'#collapse-shipping-address\']').trigger('click');

$('#collapse-shipping-method').parent().find('.panel-heading .panel-title').html('<?php echo $text_checkout_shipping_method; ?>');
$('#collapse-payment-method').parent().find('.panel-heading .panel-title').html('<?php echo $text_checkout_payment_method; ?>');
$('#collapse-checkout-confirm').parent().find('.panel-heading .panel-title').html('<?php echo $text_checkout_confirm; ?>');
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
<?php } else { ?>
$.ajax({
url: 'index.php?route=checkout/payment_method',
dataType: 'html',
success: function(html) {
$('#collapse-payment-method .panel-body').html(html);

$('#collapse-payment-method').parent().find('.panel-heading .panel-title').html('<a href="#collapse-payment-method" data-toggle="collapse" data-parent="#accordion" class="accordion-toggle"><?php echo $text_checkout_payment_method; ?> <i class="fa fa-caret-down"></i></a>');

$('a[href=\'#collapse-payment-method\']').trigger('click');

$('#collapse-checkout-confirm').parent().find('.panel-heading .panel-title').html('<?php echo $text_checkout_confirm; ?>');
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
<?php } ?>

$.ajax({
url: 'index.php?route=checkout/payment_address',
dataType: 'html',
success: function(html) {
$('#collapse-payment-address .panel-body').html(html);
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
}
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
}
]]></add>
</operation>

</file>
</modification>
Erro no Banco de Dados

Que tal vc postar o código do arquivo, assi[…]

Ótimo trabalho! Parabéns e obrigado […]

As estrelas de comentário não s&atil[…]

Ajuda com módulos opencart

Alguém consegue me ajudar? Por favor... :|