shop.balmet.com

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

cod.twig (801B)


      1 <div class="buttons">
      2   <div class="pull-right">
      3     <input type="button" value="{{ button_confirm }}" id="button-confirm" data-loading-text="{{ text_loading }}" class="btn btn-primary" />
      4   </div>
      5 </div>
      6 <script type="text/javascript"><!--
      7 $('#button-confirm').on('click', function() {
      8 	$.ajax({
      9 		url: 'index.php?route=extension/payment/cod/confirm',
     10 		dataType: 'json',
     11 		beforeSend: function() {
     12 			$('#button-confirm').button('loading');
     13 		},
     14 		complete: function() {
     15 			$('#button-confirm').button('reset');
     16 		},
     17 		success: function(json) {
     18 			if (json['redirect']) {
     19 				location = json['redirect'];	
     20 			}
     21 		},
     22 		error: function(xhr, ajaxOptions, thrownError) {
     23 			alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
     24 		}
     25 	});
     26 });
     27 //--></script>