Skip to content

Commit

Permalink
#68 - moved commit save customer addresss to customer email field
Browse files Browse the repository at this point in the history
  • Loading branch information
szafran89 committed Dec 20, 2018
1 parent 3de1e2f commit a0cf09f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
7 changes: 7 additions & 0 deletions view/frontend/web/js/components/CustomerEmailField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,13 @@ export default {
.catch(error => {
console.error('Looks like there was a problem: \n', error)
})
this.$store.commit('setItem', {
item: 'customer',
value: {
email: this.customer.email
}
})
}
}
}
Expand Down
10 changes: 0 additions & 10 deletions view/frontend/web/js/components/steps/TheShippingStep.vue
Original file line number Diff line number Diff line change
Expand Up @@ -241,16 +241,6 @@ export default {
// enable loader
this.loader = true
// save email addres if non logged in
if (!this.isCustomerLoggedIn) {
this.$store.commit('setItem', {
item: 'customer',
value: {
email: this.customer.email
}
})
}
// save shipping address
this.$store.commit(
'setAddress',
Expand Down
2 changes: 1 addition & 1 deletion view/frontend/web/js/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ const store = new Vuex.Store({
state: {
config: window.config,
baseUrl: window.baseUrl,
customer: window.config.customerData,
regions,
customer: null,
step: 'shipping',
orderId: null,
shippingMethods: [],
Expand Down

0 comments on commit a0cf09f

Please sign in to comment.