diff --git a/admin/themes/default/template/controllers/orders/form.tpl b/admin/themes/default/template/controllers/orders/form.tpl index 67e7ed00b..006dc6d77 100644 --- a/admin/themes/default/template/controllers/orders/form.tpl +++ b/admin/themes/default/template/controllers/orders/form.tpl @@ -885,9 +885,11 @@ }); } + let customerSearchAjax = ''; function searchCustomers() { - $.ajax({ + abortRunningAjax(customerSearchAjax);Add commentMore actions + customerSearchAjax = $.ajax({ type:"POST", url : "{$link->getAdminLink('AdminCustomers')}", async: true, @@ -927,6 +929,12 @@ }); } + function abortRunningAjax(ajaxVar) { + if (ajaxVar) { + ajaxVar.abort(); + } + } + function setupCustomer(idCustomer) { //$('#carts').show();// by webkul