From 7109998c3ca3b64bed6ba52665dabae42e3e9db4 Mon Sep 17 00:00:00 2001 From: "shubhammehrotra.symfony@webkul.com" Date: Thu, 13 Feb 2020 20:23:36 +0530 Subject: [PATCH 1/2] updates --- .../views/shop/checkout/onepage.blade.php | 10 +++++++--- .../checkout/onepage/customer-info.blade.php | 20 ++++++------------- .../customers/account/profile/index.blade.php | 2 +- 3 files changed, 14 insertions(+), 18 deletions(-) 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 65cb172e1..d6e83d6ea 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 @@ -204,7 +204,7 @@ isManualValidationFail = this.validateAddressForm(); } - if (!isManualValidationFail) { + if (! isManualValidationFail) { this.$validator.validateAll(scope) .then(result => { if (result) { @@ -482,13 +482,17 @@ }, backToSavedBillingAddress: function() { - this.isPlaceOrderEnabled = true; this.new_billing_address = false; + setTimeout(() => { + this.validateForm('address-form'); + }, 0); }, backToSavedShippingAddress: function() { - this.isPlaceOrderEnabled = true; this.new_shipping_address = false; + setTimeout(() => { + this.validateForm('address-form'); + }, 0); }, } }); diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/checkout/onepage/customer-info.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/checkout/onepage/customer-info.blade.php index 00181df37..87ca1c3ef 100644 --- a/packages/Webkul/Velocity/src/Resources/views/shop/checkout/onepage/customer-info.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/checkout/onepage/customer-info.blade.php @@ -67,12 +67,7 @@ -
- -
- +
@@ -88,7 +83,7 @@ class="ml0" id="billing[use_for_shipping]" name="billing[use_for_shipping]" - @change="validateForm('address-form')" + @change="setTimeout(() => validateForm('address-form'), 0)" v-model="address.billing.use_for_shipping" /> @@ -147,14 +142,13 @@
-
+
-
-
+
@@ -200,9 +194,7 @@
-
- -
+
@{{ errors.first('address-form.shipping[address_id]') }} diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/profile/index.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/profile/index.blade.php index 4afbe13ae..8a18b58a1 100644 --- a/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/profile/index.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/profile/index.blade.php @@ -92,7 +92,7 @@ From 1eb2aaf447b22ab241a3d9023023a8cc26860c29 Mon Sep 17 00:00:00 2001 From: "shubhammehrotra.symfony@webkul.com" Date: Thu, 13 Feb 2020 20:37:21 +0530 Subject: [PATCH 2/2] payment method update issue fixed --- .../views/shop/checkout/onepage.blade.php | 34 +++++++++++-------- 1 file changed, 20 insertions(+), 14 deletions(-) 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 d6e83d6ea..f7b563ddd 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 @@ -116,6 +116,7 @@ allAddress: {}, current_step: 1, completed_step: 0, + isCheckPayment: true, is_customer_exist: 0, disable_button: false, reviewComponentKey: 0, @@ -403,24 +404,29 @@ savePayment: function() { this.disable_button = true; - this.$http.post("{{ route('shop.checkout.save-payment') }}", {'payment': this.selected_payment_method}) - .then(response => { - this.disable_button = false; + if (this.isCheckPayment) { + this.isCheckPayment = false; - this.showSummarySection = true; + this.$http.post("{{ route('shop.checkout.save-payment') }}", {'payment': this.selected_payment_method}) + .then(response => { + this.isCheckPayment = true; + this.disable_button = false; - reviewHtml = Vue.compile(response.data.html) - this.completed_step = this.step_numbers[response.data.jump_to_section] + 1; - this.current_step = this.step_numbers[response.data.jump_to_section]; + this.showSummarySection = true; - document.body.style.cursor = 'auto'; + reviewHtml = Vue.compile(response.data.html) + this.completed_step = this.step_numbers[response.data.jump_to_section] + 1; + this.current_step = this.step_numbers[response.data.jump_to_section]; - this.getOrderSummary(); - }) - .catch(error => { - this.disable_button = false; - this.handleErrorResponse(error.response, 'payment-form') - }); + document.body.style.cursor = 'auto'; + + this.getOrderSummary(); + }) + .catch(error => { + this.disable_button = false; + this.handleErrorResponse(error.response, 'payment-form') + }); + } }, placeOrder: function() {