Skip to content

Commit 00e13dc

Browse files
committed
Merge remote-tracking branch 'origin/AC-14361' into spartans_pr_21042025
2 parents 27217d0 + cc5f6b3 commit 00e13dc

File tree

3 files changed

+2
-40
lines changed

3 files changed

+2
-40
lines changed

app/code/Magento/LoginAsCustomerFrontendUi/ViewModel/Configuration.php

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
use Magento\Framework\App\ObjectManager;
1313
use Magento\LoginAsCustomerApi\Api\ConfigInterface;
1414
use Magento\LoginAsCustomerApi\Api\GetLoggedAsCustomerAdminIdInterface;
15-
use Magento\Framework\App\Config\ScopeConfigInterface;
16-
use Magento\Store\Model\StoreManagerInterface;
1715

1816
/**
1917
* View model to get extension configuration in the template
@@ -35,36 +33,20 @@ class Configuration implements \Magento\Framework\View\Element\Block\ArgumentInt
3533
*/
3634
private $getLoggedAsCustomerAdminId;
3735

38-
/**
39-
* @var ScopeConfigInterface
40-
*/
41-
private $scopeConfig;
42-
43-
/**
44-
* @var StoreManagerInterface
45-
*/
46-
private $storeManager;
47-
4836
/**
4937
* @param ConfigInterface $config
5038
* @param HttpContext $httpContext
51-
* @param ScopeConfigInterface $scopeConfig
52-
* @param StoreManagerInterface $storeManager
5339
* @param GetLoggedAsCustomerAdminIdInterface $getLoggedAsCustomerAdminId
5440
*/
5541
public function __construct(
5642
ConfigInterface $config,
5743
HttpContext $httpContext,
58-
ScopeConfigInterface $scopeConfig,
59-
StoreManagerInterface $storeManager,
6044
?GetLoggedAsCustomerAdminIdInterface $getLoggedAsCustomerAdminId = null
6145
) {
6246
$this->config = $config;
6347
$this->httpContext = $httpContext;
6448
$this->getLoggedAsCustomerAdminId = $getLoggedAsCustomerAdminId
6549
?? ObjectManager::getInstance()->get(GetLoggedAsCustomerAdminIdInterface::class);
66-
$this->scopeConfig = $scopeConfig;
67-
$this->storeManager = $storeManager;
6850
}
6951

7052
/**
@@ -86,19 +68,4 @@ private function isLoggedIn(): bool
8668
{
8769
return (bool)$this->httpContext->getValue(Context::CONTEXT_AUTH);
8870
}
89-
90-
/**
91-
* Is B2b enabled
92-
*
93-
* @return bool
94-
* @throws \Magento\Framework\Exception\NoSuchEntityException
95-
*/
96-
public function isB2bEnabled(): bool
97-
{
98-
return (bool)$this->scopeConfig->getValue(
99-
"btob/website_configuration/company_active",
100-
\Magento\Store\Model\ScopeInterface::SCOPE_WEBSITE,
101-
$this->storeManager->getStore()->getWebsiteId()
102-
);
103-
}
10471
}

app/code/Magento/LoginAsCustomerFrontendUi/view/frontend/templates/html/notices.phtml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,7 @@
88
* @var \Magento\Framework\View\Element\Template $block
99
* @var \Magento\Framework\Escaper $escaper
1010
*/
11-
if ($block->getConfig()->isB2bEnabled()) {
12-
$adobeFileUrl = $block->getViewFileUrl('Magento_LoginAsCustomerFrontendUi::images/adobe-icon.svg');
13-
} else {
14-
$adobeFileUrl = $block->getViewFileUrl('Magento_LoginAsCustomerFrontendUi::images/magento-icon.svg');
15-
}
11+
$viewFileUrl = $block->getViewFileUrl('Magento_LoginAsCustomerFrontendUi::images/magento-icon.svg');
1612
?>
1713
<?php if ($block->getConfig()->isEnabled()): ?>
1814
<div class="lac-notification-sticky"
@@ -21,7 +17,7 @@ if ($block->getConfig()->isB2bEnabled()) {
2117
<div class="lac-notification clearfix" data-bind="visible: isVisible" style="display: none">
2218
<div class="top-container">
2319
<div class="lac-notification-icon wrapper">
24-
<img class="logo-img" src="<?= $escaper->escapeUrl($adobeFileUrl) ?>" alt="Magento" />
20+
<img class="logo-img" src="<?= $escaper->escapeUrl($viewFileUrl) ?>" alt="Magento" />
2521
</div>
2622
<div class="lac-notification-text wrapper">
2723
<span data-bind="html: notificationText"></span>

app/code/Magento/LoginAsCustomerFrontendUi/view/frontend/web/images/adobe-icon.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)