File tree Expand file tree Collapse file tree 1 file changed +12
-17
lines changed
app/code/Magento/Cookie/View/frontend/templates/html Expand file tree Collapse file tree 1 file changed +12
-17
lines changed Original file line number Diff line number Diff line change 22
22
</div>
23
23
</div>
24
24
</div>
25
- <script>
26
- require([
27
- "jquery",
28
- "mage/mage"
29
- ], function($){
30
-
31
- // <![CDATA[
32
- $('#notice-cookie-block').mage('cookieNotices', {
33
- cookieAllowButtonSelector: '#btn-cookie-allow',
34
- cookieName: '<?php echo \Magento \Cookie \Helper \Cookie::IS_USER_ALLOWED_SAVE_COOKIE ?> ',
35
- cookieValue: '<?php echo $ this ->helper ('Magento\Cookie\Helper\Cookie ' )->getAcceptedSaveCookiesWebsiteIds () ?> ',
36
- cookieLifetime: <?php echo $ this ->helper ('Magento\Cookie\Helper\Cookie ' )->getCookieRestrictionLifetime ()?> ,
37
- noCookiesUrl: '<?php echo $ block ->getUrl ('cookie/index/noCookies ' ) ?> '
38
- });
39
- // ]]>
40
-
41
- });
25
+ <script type="text/x-magento-init">
26
+ {
27
+ "#notice-cookie-block": {
28
+ "cookieNotices": {
29
+ "cookieAllowButtonSelector": "#btn-cookie-allow",
30
+ "cookieName": "<?php echo \Magento \Cookie \Helper \Cookie::IS_USER_ALLOWED_SAVE_COOKIE ?> ",
31
+ "cookieValue": "<?php echo $ this ->helper ('Magento\Cookie\Helper\Cookie ' )->getAcceptedSaveCookiesWebsiteIds () ?> ",
32
+ "cookieLifetime": <?php echo $ this ->helper ('Magento\Cookie\Helper\Cookie ' )->getCookieRestrictionLifetime ()?> ,
33
+ "noCookiesUrl": "<?php echo $ block ->getUrl ('cookie/index/noCookies ' ) ?> "
34
+ }
35
+ }
36
+ }
42
37
</script>
43
38
<?php endif ; ?>
You can’t perform that action at this time.
0 commit comments