Skip to content

Commit a58cb7e

Browse files
author
Serhiy Shkolyarenko
committed
MAGETWO-44336: Unable to place order with virtual quote using customer without default shipping address
1 parent 0c5934e commit a58cb7e

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

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

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,14 @@ define(
8282
});
8383

8484
quote.billingAddress.subscribe(function (newAddress) {
85-
this.isAddressSameAsShipping(
86-
newAddress != null &&
87-
newAddress.getCacheKey() == quote.shippingAddress().getCacheKey() &&
88-
!quote.isVirtual()
89-
);
85+
if (quote.isVirtual()) {
86+
this.isAddressSameAsShipping(false);
87+
} else {
88+
this.isAddressSameAsShipping(
89+
newAddress != null &&
90+
newAddress.getCacheKey() == quote.shippingAddress().getCacheKey()
91+
);
92+
}
9093

9194
if (newAddress != null && newAddress.saveInAddressBook !== undefined) {
9295
this.saveInAddressBook(newAddress.saveInAddressBook);

0 commit comments

Comments
 (0)