Skip to content

Commit 97b2e80

Browse files
author
Oleksii Korshenko
committed
MAGETWO-44084: There is no block/message on frontend for "accept cookies" if Cookie Restriction Mode = Yes
1 parent b081872 commit 97b2e80

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

app/code/Magento/Cookie/view/frontend/web/js/notices.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ define([
88
"jquery/ui",
99
"mage/cookies"
1010
], function($){
11+
"use strict";
1112

1213
$.widget('mage.cookieNotices', {
1314
_create: function() {
@@ -18,6 +19,7 @@ define([
1819
}
1920
$(this.options.cookieAllowButtonSelector).on('click', $.proxy(function() {
2021
var cookieExpires = new Date(new Date().getTime() + this.options.cookieLifetime * 1000);
22+
2123
$.mage.cookies.set(this.options.cookieName, this.options.cookieValue, {expires: cookieExpires});
2224
if ($.mage.cookies.get(this.options.cookieName)) {
2325
window.location.reload();
@@ -29,4 +31,4 @@ define([
2931
});
3032

3133
return $.mage.cookieNotices;
32-
});
34+
});

app/code/Magento/Cookie/view/frontend/web/js/require-cookie.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ define([
3030
*/
3131
_bind: function() {
3232
var events = {};
33+
3334
$.each(this.options.triggers, function(index, value) {
3435
events['click ' + value] = '_checkCookie';
3536
});
@@ -50,4 +51,4 @@ define([
5051
});
5152

5253
return $.mage.requireCookie;
53-
});
54+
});

0 commit comments

Comments
 (0)