personalized order with customer numer
This commit is contained in:
parent
245c7a820f
commit
79cb86c2e6
File diff suppressed because one or more lines are too long
|
@ -37,22 +37,22 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
userId() {
|
customerNumber() {
|
||||||
return this.$store.state.accountOne.one.id;
|
return this.$store.state.accountOne.customerNumber
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
userId() {
|
customerNumber() {
|
||||||
this.url =
|
this.url =
|
||||||
"https://orderexplorer.crane.com//OrderExplorer/?account=" +
|
"https://orderexplorer.crane.com//OrderExplorer/?account=" +
|
||||||
this.userId;
|
this.customerNumber;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
if (this.userId)
|
if (this.customerNumber)
|
||||||
this.url =
|
this.url =
|
||||||
"https://orderexplorer.crane.com//OrderExplorer/?account=" +
|
"https://orderexplorer.crane.com//OrderExplorer/?account=" +
|
||||||
this.userId;
|
this.customerNumber;
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -59,7 +59,8 @@ export const accountOne = {
|
||||||
wrongPasswordMessage: "",
|
wrongPasswordMessage: "",
|
||||||
shippingInformationsInProgress: false,
|
shippingInformationsInProgress: false,
|
||||||
addressContainPOBox: null,
|
addressContainPOBox: null,
|
||||||
suggestedAddress: {}
|
suggestedAddress: {},
|
||||||
|
customerNumber:""
|
||||||
},
|
},
|
||||||
getters: {
|
getters: {
|
||||||
getField,
|
getField,
|
||||||
|
@ -75,6 +76,11 @@ export const accountOne = {
|
||||||
setOne(state, one) {
|
setOne(state, one) {
|
||||||
criteoUpdateUserEmail(one.email)
|
criteoUpdateUserEmail(one.email)
|
||||||
state.one = Object.assign({}, state.one, defaultAddress, one);
|
state.one = Object.assign({}, state.one, defaultAddress, one);
|
||||||
|
let customerNumber=state.one.customAttributes
|
||||||
|
.filter((customAttribute)=>customAttribute.attributeCode==="customer_number")[0]
|
||||||
|
if(customerNumber)
|
||||||
|
state.customerNumber=customerNumber.value;
|
||||||
|
|
||||||
state.one.defaultShipping = Number(state.one.defaultShipping);
|
state.one.defaultShipping = Number(state.one.defaultShipping);
|
||||||
state.one.defaultBilling = Number(state.one.defaultBilling);
|
state.one.defaultBilling = Number(state.one.defaultBilling);
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue