Skip to content

Commit

Permalink
MAGETWO-69733: add middle name to checkout address html templates #8878
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksii Korshenko authored Jun 13, 2017
2 parents 5261393 + d09f112 commit c4f000b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions app/code/Magento/Checkout/Block/Checkout/AttributeMerger.php
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,11 @@ protected function getDefaultValue($attributeCode)
return $this->getCustomer()->getFirstname();
}
break;
case 'middlename':
if ($this->getCustomer()) {
return $this->getCustomer()->getMiddlename();
}
break;
case 'lastname':
if ($this->getCustomer()) {
return $this->getCustomer()->getLastname();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
-->
<div class="billing-address-details" data-bind="if: isAddressDetailsVisible() && currentBillingAddress()">
<!-- ko text: currentBillingAddress().prefix --><!-- /ko --> <!-- ko text: currentBillingAddress().firstname --><!-- /ko -->
<!-- ko text: currentBillingAddress().prefix --><!-- /ko --> <!-- ko text: currentBillingAddress().firstname --><!-- /ko --> <!-- ko text: currentBillingAddress().middlename --><!-- /ko -->
<!-- ko text: currentBillingAddress().lastname --><!-- /ko --> <!-- ko text: currentBillingAddress().suffix --><!-- /ko --><br/>
<!-- ko text: currentBillingAddress().street --><!-- /ko --><br/>
<!-- ko text: currentBillingAddress().city --><!-- /ko -->, <span data-bind="html: currentBillingAddress().region"></span> <!-- ko text: currentBillingAddress().postcode --><!-- /ko --><br/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
-->
<div class="shipping-address-item" data-bind="css: isSelected() ? 'selected-item' : 'not-selected-item'">
<!-- ko text: address().prefix --><!-- /ko --> <!-- ko text: address().firstname --><!-- /ko -->
<!-- ko text: address().prefix --><!-- /ko --> <!-- ko text: address().firstname --><!-- /ko --> <!-- ko text: address().middlename --><!-- /ko -->
<!-- ko text: address().lastname --><!-- /ko --> <!-- ko text: address().suffix --><!-- /ko --><br/>
<!-- ko text: address().street --><!-- /ko --><br/>
<!-- ko text: address().city --><!-- /ko -->, <span data-bind="html: address().region"></span> <!-- ko text: address().postcode --><!-- /ko --><br/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
-->
<!-- ko if: (visible()) -->
<!-- ko text: address().prefix --><!-- /ko --> <!-- ko text: address().firstname --><!-- /ko -->
<!-- ko text: address().prefix --><!-- /ko --> <!-- ko text: address().firstname --><!-- /ko --> <!-- ko text: address().middlename --><!-- /ko -->
<!-- ko text: address().lastname --><!-- /ko --> <!-- ko text: address().suffix --><!-- /ko --><br/>
<!-- ko text: address().street --><!-- /ko --><br/>
<!-- ko text: address().city --><!-- /ko -->, <span data-bind="html: address().region"></span> <!-- ko text: address().postcode --><!-- /ko --><br/>
Expand Down

0 comments on commit c4f000b

Please sign in to comment.