Skip to content

Commit 98045b3

Browse files
committed
MC-33705: Guest can not checkout if customer address attributes of different types
1 parent 1990aec commit 98045b3

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

app/code/Magento/Checkout/view/frontend/web/js/view/billing-address.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,8 @@ function (
283283
label = _.map(attribute.value, function (value) {
284284
return this.getCustomAttributeOptionLabel(attribute['attribute_code'], value) || value;
285285
}, this).join(', ');
286+
} else if (typeof attribute.value === 'object') {
287+
label = _.map(Object.values(attribute.value)).join(', ');
286288
} else {
287289
label = this.getCustomAttributeOptionLabel(attribute['attribute_code'], attribute.value);
288290
}
@@ -310,6 +312,8 @@ function (
310312
if (option) {
311313
label = option.label;
312314
}
315+
} else if (value.file !== null) {
316+
label = value.file;
313317
}
314318

315319
return label;

app/code/Magento/Checkout/view/frontend/web/js/view/shipping-address/address-renderer/default.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ define([
6969
label = _.map(attribute.value, function (value) {
7070
return this.getCustomAttributeOptionLabel(attribute['attribute_code'], value) || value;
7171
}, this).join(', ');
72+
} else if (typeof attribute.value === 'object') {
73+
label = _.map(Object.values(attribute.value)).join(', ');
7274
} else {
7375
label = this.getCustomAttributeOptionLabel(attribute['attribute_code'], attribute.value);
7476
}
@@ -96,6 +98,8 @@ define([
9698
if (option) {
9799
label = option.label;
98100
}
101+
} else if (value.file !== null) {
102+
label = value.file;
99103
}
100104

101105
return label;

app/code/Magento/Checkout/view/frontend/web/js/view/shipping-information/address-renderer/default.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ define([
4646
label = _.map(attribute.value, function (value) {
4747
return this.getCustomAttributeOptionLabel(attribute['attribute_code'], value) || value;
4848
}, this).join(', ');
49+
} else if (typeof attribute.value === 'object') {
50+
label = _.map(Object.values(attribute.value)).join(', ');
4951
} else {
5052
label = this.getCustomAttributeOptionLabel(attribute['attribute_code'], attribute.value);
5153
}
@@ -73,6 +75,8 @@ define([
7375
if (option) {
7476
label = option.label;
7577
}
78+
} else if (value.file !== null) {
79+
label = value.file;
7680
}
7781

7882
return label;

0 commit comments

Comments
 (0)