Skip to content

Commit 70d3636

Browse files
author
Oleksii Korshenko
authored
MAGETWO-85785: #12719: Use full name in welcome message #12738
2 parents 3f98b8d + 7ccbedf commit 70d3636

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)