File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
view/frontend/templates/html Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -69,11 +69,22 @@ public function __construct(
69
69
public function isUserNotAllowSaveCookie ()
70
70
{
71
71
$ acceptedSaveCookiesWebsites = $ this ->_getAcceptedSaveCookiesWebsites ();
72
+ return $ this ->isCookieRestrictionModeEnabled () &&
73
+ empty ($ acceptedSaveCookiesWebsites [$ this ->_website ->getId ()]);
74
+ }
75
+
76
+ /**
77
+ * Check if cookie restriction mode is enabled for this store
78
+ *
79
+ * @return bool
80
+ */
81
+ public function isCookieRestrictionModeEnabled ()
82
+ {
72
83
return $ this ->scopeConfig ->getValue (
73
84
self ::XML_PATH_COOKIE_RESTRICTION ,
74
85
\Magento \Store \Model \ScopeInterface::SCOPE_STORE ,
75
86
$ this ->_currentStore
76
- ) && empty ( $ acceptedSaveCookiesWebsites [ $ this -> _website -> getId ()]) ;
87
+ );
77
88
}
78
89
79
90
/**
Original file line number Diff line number Diff line change 8
8
9
9
?>
10
10
<?php /** @var \Magento\Cookie\Block\Html\Notices $block */ ?>
11
- <?php if ($ this ->helper ('Magento\Cookie\Helper\Cookie ' )->isUserNotAllowSaveCookie ()): ?>
11
+ <?php if ($ this ->helper ('Magento\Cookie\Helper\Cookie ' )->isCookieRestrictionModeEnabled ()): ?>
12
12
<div class="message global cookie" id="notice-cookie-block" style="display: none">
13
13
<div class="content">
14
14
<p>
You can’t perform that action at this time.
0 commit comments