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: {
|
||||
userId() {
|
||||
return this.$store.state.accountOne.one.id;
|
||||
customerNumber() {
|
||||
return this.$store.state.accountOne.customerNumber
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
userId() {
|
||||
customerNumber() {
|
||||
this.url =
|
||||
"https://orderexplorer.crane.com//OrderExplorer/?account=" +
|
||||
this.userId;
|
||||
this.customerNumber;
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
if (this.userId)
|
||||
if (this.customerNumber)
|
||||
this.url =
|
||||
"https://orderexplorer.crane.com//OrderExplorer/?account=" +
|
||||
this.userId;
|
||||
this.customerNumber;
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -59,7 +59,8 @@ export const accountOne = {
|
|||
wrongPasswordMessage: "",
|
||||
shippingInformationsInProgress: false,
|
||||
addressContainPOBox: null,
|
||||
suggestedAddress: {}
|
||||
suggestedAddress: {},
|
||||
customerNumber:""
|
||||
},
|
||||
getters: {
|
||||
getField,
|
||||
|
@ -75,6 +76,11 @@ export const accountOne = {
|
|||
setOne(state, one) {
|
||||
criteoUpdateUserEmail(one.email)
|
||||
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.defaultBilling = Number(state.one.defaultBilling);
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue