Skip to content

Commit a75bf23

Browse files
Merge forwardport of #12738 to 2.3-develop branch
Applied pull request patch https://github.com/magento/magento2/pull/12738.patch (created by @xpoback) based on commit(s): 1. 6b9c39c Fixed GitHub Issues in 2.3-develop branch: - #12719: Welcome message is shown with customer's first and last names after confirming account (reported by @alena-marchenko)
2 parents b857c02 + 3837f27 commit a75bf23

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

app/code/Magento/Theme/view/frontend/templates/html/header.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ $welcomeMessage = $block->getWelcome();
1515
case 'welcome': ?>
1616
<li class="greet welcome" data-bind="scope: 'customer'">
1717
<!-- ko if: customer().fullname -->
18-
<span data-bind="text: new String('<?= $block->escapeHtml(__('Welcome, %1!', '%1')) ?>').replace('%1', customer().firstname)">
18+
<span data-bind="text: new String('<?= $block->escapeHtml(__('Welcome, %1!', '%1')) ?>').replace('%1', customer().fullname)">
1919
</span>
2020
<!-- /ko -->
2121
<!-- ko ifnot: customer().fullname -->

dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertCartPerCustomer.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ public function processAssert(
5353
['customer' => $customer]
5454
)->run();
5555
\PHPUnit_Framework_Assert::assertEquals(
56-
sprintf(self::WELCOME_MESSAGE, $customer->getFirstname()),
56+
sprintf(
57+
self::WELCOME_MESSAGE,
58+
$customer->getFirstname() . ' ' . $customer->getLastname()
59+
),
5760
$cmsIndex->getLinksBlock()->getWelcomeText(),
5861
'Customer welcome message is wrong.'
5962
);

0 commit comments

Comments
 (0)