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 @@ -70,11 +70,22 @@ public function __construct(
70
70
public function isUserNotAllowSaveCookie ()
71
71
{
72
72
$ acceptedSaveCookiesWebsites = $ this ->_getAcceptedSaveCookiesWebsites ();
73
+ return $ this ->isCookieRestrictionModeEnabled () &&
74
+ empty ($ acceptedSaveCookiesWebsites [$ this ->_website ->getId ()]);
75
+ }
76
+
77
+ /**
78
+ * Check if cookie restriction mode is enabled for this store
79
+ *
80
+ * @return bool
81
+ */
82
+ public function isCookieRestrictionModeEnabled ()
83
+ {
73
84
return $ this ->scopeConfig ->getValue (
74
85
self ::XML_PATH_COOKIE_RESTRICTION ,
75
86
\Magento \Store \Model \ScopeInterface::SCOPE_STORE ,
76
87
$ this ->_currentStore
77
- ) && empty ( $ acceptedSaveCookiesWebsites [ $ this -> _website -> getId ()]) ;
88
+ );
78
89
}
79
90
80
91
/**
Original file line number Diff line number Diff line change 8
8
9
9
/** @var \Magento\Cookie\Block\Html\Notices $block */
10
10
?>
11
- <?php if ($ this ->helper (\Magento \Cookie \Helper \Cookie::class)->isUserNotAllowSaveCookie ()): ?>
11
+ <?php if ($ this ->helper (\Magento \Cookie \Helper \Cookie::class)->isCookieRestrictionModeEnabled ()): ?>
12
12
<div role="alertdialog"
13
13
tabindex="-1"
14
14
class="message global cookie"
You can’t perform that action at this time.
0 commit comments