Skip to content

Commit 4c78f61

Browse files
author
Olexii Korshenko
committed
MAGETWO-39051: Wrong behavior for required "Customer Address Attributes" during checkout
1 parent bcfb579 commit 4c78f61

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

app/code/Magento/Checkout/Block/Checkout/LayoutProcessor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function process($jsLayout)
4848
/** @var \Magento\Eav\Api\Data\AttributeInterface[] $attributes */
4949
$attributes = $this->attributeMetadataDataProvider->loadAttributesCollection(
5050
'customer_address',
51-
'customer_register_address'
51+
'customer_address_edit'
5252
);
5353

5454
$elements = [];

app/code/Magento/Checkout/Controller/Onepage.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,14 +180,14 @@ protected function _expireAjax()
180180
{
181181
$quote = $this->getOnepage()->getQuote();
182182
if (!$quote->hasItems() || $quote->getHasError() || !$quote->validateMinimumAmount()) {
183-
return false;
183+
return true;
184184
}
185185
$action = $this->getRequest()->getActionName();
186186
if ($this->_objectManager->get('Magento\Checkout\Model\Session')->getCartWasUpdated(true)
187187
&&
188188
!in_array($action, ['index', 'progress'])
189189
) {
190-
return false;
190+
return true;
191191
}
192192

193193
return false;

app/code/Magento/Checkout/view/frontend/web/js/action/select-shipping-address.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ define(
1414
});
1515
return function(shippingAddress) {
1616
quote.shippingAddress(shippingAddress);
17-
//set billing address same as shipping by default
18-
if (shippingAddress.canUseForBilling()) {
17+
//set billing address same as shipping by default if it is not empty
18+
if (shippingAddress.countryId != undefined && shippingAddress.canUseForBilling()) {
1919
quote.billingAddress(shippingAddress);
2020
}
2121
};

0 commit comments

Comments
 (0)