diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/checkout/onepage.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/checkout/onepage.blade.php index 61461d85b..769fb1bd2 100644 --- a/packages/Webkul/Velocity/src/Resources/views/shop/checkout/onepage.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/checkout/onepage.blade.php @@ -286,26 +286,25 @@ return isManualValidationFail; }, - isCustomerExist: function () { - this.$validator.attach('email', 'required|email'); + isCustomerExist: function() { + this.$validator.attach('address-form.billing[email]', 'required|email'); - var this_this = this; + this.$validator.validate('address-form.billing[email]', this.address.billing.email) + .then(isValid => { + if (! isValid) + return; - this.$validator.validate('email', this.address.billing.email) - .then(function(isValid) { - if (! isValid) - return; - - this_this.$http.post("{{ route('customer.checkout.exist') }}", {email: this_this.address.billing.email}) - .then(function(response) { - this_this.is_customer_exist = response.data ? 1 : 0; - - if (response.data) - document.body.style.cursor = 'default'; - }) - .catch(function (error) {}) + this.$http.post("{{ route('customer.checkout.exist') }}", {email: this.address.billing.email}) + .then(response => { + this.is_customer_exist = response.data ? 1 : 0; + console.log(this.is_customer_exist); + if (response.data) + document.body.style.cursor = 'default'; }) + .catch(function (error) {}) + }) + .catch(error => {}) }, loginCustomer: function () { diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/checkout/onepage/customer-checkout.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/checkout/onepage/customer-checkout.blade.php index d7beef848..89c9a00aa 100644 --- a/packages/Webkul/Velocity/src/Resources/views/shop/checkout/onepage/customer-checkout.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/checkout/onepage/customer-checkout.blade.php @@ -8,7 +8,7 @@ name="password" v-model="address.billing.password" /> -