Skip to content

Commit

Permalink
Fix prefix, middle name and suffix were not prefilled in the checkout
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Evers committed Jun 12, 2017
1 parent f3c7406 commit 5f1b460
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions app/code/Magento/Checkout/Block/Checkout/AttributeMerger.php
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,21 @@ protected function getDefaultValue($attributeCode)
return $this->getCustomer()->getLastname();
}
break;
case 'middlename':
if ($this->getCustomer()) {
return $this->getCustomer()->getMiddlename();
}
break;
case 'prefix':
if ($this->getCustomer()) {
return $this->getCustomer()->getPrefix();
}
break;
case 'suffix':
if ($this->getCustomer()) {
return $this->getCustomer()->getSuffix();
}
break;
case 'country_id':
return $this->directoryHelper->getDefaultCountry();
}
Expand Down

0 comments on commit 5f1b460

Please sign in to comment.