From f7657c296ebf63ed5ba174e3046b0aebab8b58da Mon Sep 17 00:00:00 2001 From: bach Date: Tue, 22 Feb 2022 11:02:48 +0100 Subject: [PATCH] fixed pricing new registered user redirection to checkout --- .../materiotheme/vuejs/components/productsMixins.js | 2 +- .../custom/materiotheme/vuejs/store/modules/user.js | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/web/themes/custom/materiotheme/vuejs/components/productsMixins.js b/web/themes/custom/materiotheme/vuejs/components/productsMixins.js index f6c2043..21f0830 100644 --- a/web/themes/custom/materiotheme/vuejs/components/productsMixins.js +++ b/web/themes/custom/materiotheme/vuejs/components/productsMixins.js @@ -131,7 +131,7 @@ export default { this.closeModal() // redirect to /cart // window.location.href = "/cart" - // TODO: redirect to checkout instead of cart + // redirect to checkout instead of cart window.location.href = `/checkout/${data[0].order_id}/order_information` }) .catch((error) => { diff --git a/web/themes/custom/materiotheme/vuejs/store/modules/user.js b/web/themes/custom/materiotheme/vuejs/store/modules/user.js index 6dfacfe..09a4316 100644 --- a/web/themes/custom/materiotheme/vuejs/store/modules/user.js +++ b/web/themes/custom/materiotheme/vuejs/store/modules/user.js @@ -187,9 +187,9 @@ export default { dispatch('getUser').then(userdata => { console.log('User Loggedin', state.isAdmin, state.isAdherent) // have to reload systematicly because of autologout library not loaded if not logged in the begining - // if (state.isAdmin) { - // window.location.reload() - // } + if (state.isAdmin) { + window.location.reload() + } if (state.isAdherent) { // router.push({ // name: 'base' @@ -197,9 +197,10 @@ export default { // // TODO: openCloseHamMenu(false) // dispatch('Common/openCloseHamMenu', false) window.location = '/base' - } else { - window.location.reload() } + // else { + // // * window.location.reload() + // } resolve() }) } else {