Подтверждение заказа (opencart 1.5.6)

Тема в разделе "OpenCart", создана пользователем Dionis, 7 ноя 2014.

  1. Dionis

    Dionis

    Регистрация:
    2 окт 2014
    Сообщения:
    1
    Симпатии:
    0
    Ребят, подскажите, пожалуйста, как прописать в файле checkout.tpl гифку после нажатия кнопки "Подтвердить заказ". У меня пауза секунд в 3-4 и не понятно то ли заказ обрабатывается то ли нет. На предыдущих этапах крутится значок. Когда жмешь "Подтвердить заказ", то нет. Уже уискался, найти не могу. Это конец скрипта, где я думаю должно прописываться. Выделенный текст это то что ставит значок на предыдущих этапах.

    $('#button-payment-method').live('click', function() {
    $.ajax({
    url: 'index.php?route=checkout/payment_method/validate',
    type: 'post',
    data: $('#payment-method input[type=\'radio\']:checked, #payment-method input[type=\'checkbox\']:checked, #payment-method textarea'),
    dataType: 'json',
    beforeSend: function() {
    $('#button-payment-method').attr('disabled', true);
    $('#button-payment-method').after('<span class="wait">&nbsp;<img src="catalog/view/theme/default/image/loading.gif" alt="" /></span>');
    },
    complete: function() {
    $('#button-payment-method').attr('disabled', false);
    $('.wait').remove();
    },
    success: function(json) {
    $('.warning, .error').remove();

    if (json['redirect']) {
    location = json['redirect'];
    } else if (json['error']) {
    if (json['error']['warning']) {
    $('#payment-method .checkout-content').prepend('<div class="warning" style="display: none;">' + json['error']['warning'] + '<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>');

    $('.warning').fadeIn('slow');
    }
    } else {
    $.ajax({
    url: 'index.php?route=checkout/confirm',
    dataType: 'html',
    success: function(html) {
    $('#confirm .checkout-content').html(html);

    $('#payment-method .checkout-content').slideUp('slow');

    $('#confirm .checkout-content').slideDown('slow');

    $('#payment-method .checkout-heading a').remove();

    $('#payment-method .checkout-heading').append('<a><?php echo $text_modify; ?></a>');
    },
    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);
    }
    });
    });

    function quickConfirm(module){
    $.ajax({
    url: 'index.php?route=checkout/confirm',
    dataType: 'html',


    success: function(html) {
    $('#confirm .checkout-content').html(html);
    $('#confirm .checkout-content').slideDown('slow');


    $('.checkout-heading a').remove();

    $('#checkout .checkout-heading a').remove();
    $('#checkout .checkout-heading').append('<a><?php echo $text_modify; ?></a>');

    $('#shipping-address .checkout-heading a').remove();
    $('#shipping-address .checkout-heading').append('<a><?php echo $text_modify; ?></a>');

    $('#shipping-method .checkout-heading a').remove();
    $('#shipping-method .checkout-heading').append('<a><?php echo $text_modify; ?></a>');

    $('#payment-address .checkout-heading a').remove();
    $('#payment-address .checkout-heading').append('<a><?php echo $text_modify; ?></a>');

    $('#payment-method .checkout-heading a').remove();
    $('#payment-method .checkout-heading').append('<a><?php echo $text_modify; ?></a>');

    },
    error: function(xhr, ajaxOptions, thrownError) {
    alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
    }
    });
    }