Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /uploads/assets/js/ drwxr-xr-x | |
| Viewing file: Select action/file-type: (function ($) {
"use strict";
$('.type').on('change',()=>{
var type=$('.type').val();
if (type==1) {
$('.location').show();
}
else{
$('.location').hide();
}
});
$('#location').on('change',()=>{
var location_id=$('#location').val();
var shipping_url=$('#shipping').val();
var url=shipping_url+'/'+location_id;
$.ajax({
type: 'get',
url: url,
dataType: 'json',
success: function(response){
$('.shipping_method').remove();
$.each(response, function(index, row){
var html='<div class="custom-control custom-radio shipping_method "><input id="'+row.id+'" name="shipping_method" data-amount="'+row.slug+'" value="'+row.id+'" type="radio" class="custom-control-input method'+row.id+'" onclick="calculateShipping('+row.id+')" required><label class="custom-control-label" for="'+row.id+'">'+row.name+'</label></div>';
$('#method_area').append(html);
});
},
});
$('.location').show()
});
})(jQuery);
function calculateShipping(id) {
var amount= $('.method'+id).attr('data-amount');
var shipping_amount=parseFloat(amount);
var TotalAmount=parseFloat($('#TotalAmount').val());
var weight_amount= calculateWeight(shipping_amount);
$('.total_shipping_area').show();
$('#total_shipping_amount').html(weight_amount);
var total=TotalAmount+weight_amount;
$('#total_cart_amount').html(total)
}
function calculateWeight(amount) {
return amount;
}
function success(argument) {
location.reload()
} |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0046 ]-- |