app/template/default/Block/cookieconsent.twig line 1

Open in your IDE?
  1. {#
  2. This file is part of EC-CUBE
  3. Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  4. http://www.ec-cube.co.jp/
  5. For the full copyright and license information, please view the LICENSE
  6. file that was distributed with this source code.
  7. #}
  8. <script>
  9.     //クッキー設定
  10.     //有効期限は一年
  11.     function setCookie(){
  12.         $('.ec-footerRole').removeClass('footer_mrg');
  13.         var now = new Date();
  14.         now.setMonth(now.getMonth() + 12);
  15.         document.cookie = 'CookieConsented = true; path = /; expires = '+ now.toUTCString();
  16.         document.getElementById('CookieConsented_footer').style.display = 'none'
  17.     }
  18.     //cookieのvalueにtrueなければ表示
  19.     $(function() {
  20.         if (document.cookie.indexOf('true') == -1) {
  21.             document.getElementById('CookieConsented_footer').style.display = 'block'
  22.             $('.ec-footerRole').addClass('footer_mrg');
  23.         }
  24.     })
  25. </script>
  26. <div id="CookieConsented_footer">
  27.     <div class="CookieConsented__bg">
  28.         <div class="CookieConsented__inner">
  29.             <p>当サイトは利便性の向上や利用状況の把握などを目的として「クッキー(Cookie)」を利用しています。<br>
  30.             このまま当サイトをご利用をいただく場合、クッキーの使用にご同意をいただいたものとさせていただきます。<br>
  31.             詳しくはクッキー(Cookie)ポリシーをご覧ください。<a href="{{ url('homepage') }}user_data/cookiepolicy" class="CookieConsented__link">クッキーポリシー</a></p>
  32.             <button class="ec-blockBtn" onclick="setCookie();">{{ '同意する'|trans }}</button>
  33.         </div>
  34.     </div>
  35. </div>