diff --git a/admin/themes/default/template/controllers/orders/form.tpl b/admin/themes/default/template/controllers/orders/form.tpl index 006dc6d77..1f3bd2ad1 100644 --- a/admin/themes/default/template/controllers/orders/form.tpl +++ b/admin/themes/default/template/controllers/orders/form.tpl @@ -635,7 +635,10 @@ 'width': '90%', 'height': '90%', 'afterClose' : function () { - searchCustomers(); + let customer = $('#customer').val(); + if (customer != '' && customer.length > 3) { + searchCustomers(); + } } }); /*$("#new_address").fancybox({ @@ -888,7 +891,7 @@ let customerSearchAjax = ''; function searchCustomers() { - abortRunningAjax(customerSearchAjax);Add commentMore actions + abortRunningAjax(customerSearchAjax); customerSearchAjax = $.ajax({ type:"POST", url : "{$link->getAdminLink('AdminCustomers')}",