app/template/bravers/default_frame.twig line 261

Open in your IDE?
  1. <!doctype html>
  2. {#
  3. This file is part of EC-CUBE
  4. Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  5. http://www.ec-cube.co.jp/
  6. For the full copyright and license information, please view the LICENSE
  7. file that was distributed with this source code.
  8. #}
  9. <html lang="{{ eccube_config.locale }}">
  10. <head prefix="og: https://ogp.me/ns# fb: https://ogp.me/ns/fb# product: https://ogp.me/ns/product#">
  11.     <meta charset="utf-8">
  12.     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  13.     <meta name="eccube-csrf-token" content="{{ csrf_token(constant('Eccube\\Common\\Constant::TOKEN_NAME')) }}">
  14.     <title>{{ BaseInfo.shop_name }}{% if subtitle is defined and subtitle is not empty %} / {{ subtitle }}{% elseif title is defined and title is not empty %} / {{ title }}{% endif %}</title>
  15.     {% if Page.meta_tags is not empty %}
  16.         {{ include(template_from_string(Page.meta_tags)) }}
  17.         {% if Page.description is not empty %}
  18.             <meta name="description" content="{{ Page.description }}">
  19.         {% endif %}
  20.     {% else %}
  21.         {{ include('meta.twig') }}
  22.     {% endif %}
  23.     {% if Page.author is not empty %}
  24.         <meta name="author" content="{{ Page.author }}">
  25.     {% endif %}
  26.     {% if Page.keyword is not empty %}
  27.         <meta name="keywords" content="{{ Page.keyword }}">
  28.     {% endif %}
  29.     {% if Page.meta_robots is not empty %}
  30.         <meta name="robots" content="{{ Page.meta_robots }}">
  31.     {% endif %}
  32.     {% if app.request.get('_route') == 'product_detail' %}
  33.     <link rel="stylesheet" href="{{ asset('assets/css/swiper-bundle.min.css', 'user_data') }}">
  34.     {% endif %}
  35.     <link rel="stylesheet" href="{{ asset('assets/css/customize.css', 'user_data') }}">
  36.     <link rel="apple-touch-icon" sizes="180x180" href="{{ asset('assets/favicon/apple-touch-icon.png', 'user_data') }}">
  37.     <link rel="icon" type="image/png" sizes="32x32" href="{{ asset('assets/favicon/favicon-32x32.png', 'user_data') }}">
  38.     <link rel="icon" type="image/png" sizes="16x16" href="{{ asset('assets/favicon/favicon-16x16.png', 'user_data') }}">
  39.     <link rel="manifest" href="{{ asset('assets/favicon/site.webmanifest', 'user_data') }}">
  40.     <link rel="mask-icon" href="{{ asset('assets/favicon/safari-pinned-tab.svg', 'user_data') }}" color="#5bbad5">
  41.     <meta name="msapplication-TileColor" content="#da532c">
  42.     <meta name="theme-color" content="#ffffff">
  43.     <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
  44.     <link rel="stylesheet" href="{{ asset('assets/css/style.css') }}">
  45.     <script src="{{ asset('front.bundle.js', 'bundle') }}"></script>
  46.     <!-- OGP -->
  47.     <meta property="og:url" content="{{ app.request.uri }}" />
  48.     <meta property="og:type" content="website" />
  49.     <meta property="og:title" content="{{ BaseInfo.shop_name }}{% if subtitle is defined and subtitle is not empty %} / {{ subtitle }}{% elseif title is defined and title is not empty %} / {{ title }}{% endif %}" />
  50.     <meta property="og:description" content="{{ Page.description }}" />
  51.     <meta property="og:site_name" content="{{ BaseInfo.shop_name }}" />
  52.     <meta property="og:image" content="{{ asset('assets/ogp/ogp.jpg' , 'user_data') }}" />
  53.     {% block stylesheet %}{% endblock %}
  54.     <script>
  55.         $(function() {
  56.             $.ajaxSetup({
  57.                 'headers': {
  58.                     'ECCUBE-CSRF-TOKEN': $('meta[name="eccube-csrf-token"]').attr('content')
  59.                 }
  60.             });
  61.         });
  62.     </script>
  63.     <script>
  64.         WebFontConfig = {google: {families: ['Noto+Sans+JP:400,500,700']}};
  65.         (function () {
  66.             var wf = document.createElement('script');
  67.             wf.src = ('https:' == document.location.protocol ? 'https' : 'http') + '://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
  68.             wf.type = 'text/javascript';
  69.             var s = document.getElementsByTagName('script')[0];
  70.             s.parentNode.insertBefore(wf, s);
  71.         })();
  72.     </script>
  73.     <script>
  74.         function onAddCart(e, self, quantity, callback) {
  75.             e.stopImmediatePropagation();
  76.             e.preventDefault();
  77.             var $form = $(self).parents('.popular-item').find('form.topBlocks__form');
  78.             var productId = $(self).parents('.popular-item').find('input[name="product_id"]').val() * 1;
  79.             // 個数フォームのチェック
  80.             $form.parent().find('.quantity').val(quantity);
  81.             $.ajax({
  82.                 url: $form.attr('action'),
  83.                 type: $form.attr('method'),
  84.                 data: $form.serialize(),
  85.                 dataType: 'json',
  86.                 beforeSend: function(xhr, settings) {
  87.                     // Buttonを無効にする
  88.                     $(self).prop('disabled', true);
  89.                 }
  90.             }).done(function(data) {
  91.                 // レスポンス内のメッセージをalertで表示
  92.                 $.each(data.messages, function() {
  93.                     $('#ec-modal-header').text(this);
  94.                 });
  95.                 var $currentQuantityLabelEl = $(self).parents('.popular-item').find(".quantity_label");
  96.                 var $quantityLabelEl = $(document).find(`.quantity_label_${productId}`);
  97.                 var newQuantity = $currentQuantityLabelEl.text() * 1 + quantity * 1;
  98.                 $quantityLabelEl.text(newQuantity);
  99.                 if(callback) {
  100.                     callback();
  101.                 }
  102.                 // カートブロックを更新する
  103.                 $.ajax({
  104.                     url: '{{ url('block_cart') }}',
  105.                     type: 'GET',
  106.                     dataType: 'html'
  107.                 }).done(function(html) {
  108.                     $('.ec-headerRole__cart').html(html);
  109.                 });
  110.             }).fail(function(data) {
  111.                 alert('{{ 'カートへの追加に失敗しました。'|trans }}');
  112.                 $(self).prop('disabled', false);
  113.             }).always(function(data) {
  114.                 checkRenderButton();
  115.             });
  116.             return false;
  117.         }
  118.         function checkRenderButton() {
  119.             $itemEls = $(".popular-item");
  120.             $itemEls.each(function(index, el) {
  121.                 let stockVal = $(el).find('.stock').val() * 1;
  122.                 var $quantityLabelEl = $(el).find('.quantity_label');
  123.                 var productId = $(el).find('input[name="product_id"]').val() * 1;
  124.                 var _quantity = $quantityLabelEl.text() * 1;
  125.                 if(_quantity == 0) {
  126.                     // enable minus button
  127.                     $(el).find(".minus__btn").prop('disabled', false);
  128.                     $(el).find(".ec-productRole__btn--only").removeClass("d-none");
  129.                     $(el).find(".ec-regular__btn").prop('disabled', false);
  130.                     $(el).find(".ec-productRole__btn--group").addClass("d-none");
  131.                 }
  132.                 if(_quantity > 0 && _quantity <= stockVal) {
  133.                     // Buttonを有効にする
  134.                     if (_quantity < stockVal) {
  135.                         $(el).find('.minus__btn').prop('disabled', false);
  136.                         $(el).find('.plus__btn').prop('disabled', false);
  137.                     }
  138.                     $(el).find(".ec-productRole__btn--only").addClass("d-none");
  139.                     $(el).find(".ec-productRole__btn--group").removeClass("d-none");
  140.                 } else {
  141.                     $(el).find('.plus__btn').prop('disabled', true);
  142.                 }
  143.             });
  144.         }
  145.         $(document).ready(function() {
  146.             $('.ec-blockFavoriteBtn').on("click", function(e) {
  147.                 e.stopImmediatePropagation();
  148.                 e.preventDefault();
  149.                 event.stopPropagation();
  150.                 var $form = $(this).parents('form.ec-favoriteForm');
  151.                 $form.attr('action', $(this).attr("data-action"));
  152.                 $form.attr('method', $(this).attr("data-method"));
  153.                 $.ajax({
  154.                     url: $form.attr('action'),
  155.                     type: $form.attr('method'),
  156.                 }).done(function(data) {
  157.                     $($form).find(".ec-blockFavoriteBtnDisable").removeClass("d-none");
  158.                     $($form).find(".ec-blockFavoriteBtn").addClass("d-none");
  159.                 }).fail(function(data) {
  160.                     alert('{{ 'お気に入りの追加に失敗しました。'|trans }}');
  161.                 });
  162.                 return false;
  163.             })
  164.             $('.ec-blockFavoriteBtnDisable').on("click", function(e) {
  165.                 e.stopImmediatePropagation();
  166.                 e.preventDefault();
  167.                 event.stopPropagation();
  168.                 var $form = $(this).parents('form.ec-favoriteForm');
  169.                 $form.attr('action', $(this).attr("data-action"));
  170.                 $form.attr('method', $(this).attr("data-method"));
  171.                 $.ajax({
  172.                     url: $form.attr('action'),
  173.                     type: $form.attr('method'),
  174.                 }).done(function(data) {
  175.                     $($form).find(".ec-blockFavoriteBtnDisable").addClass("d-none");
  176.                     $($form).find(".ec-blockFavoriteBtn").removeClass("d-none");
  177.                 }).fail(function(data) {
  178.                     alert('{{ 'お気に入りの追加に失敗しました。'|trans }}');
  179.                 });
  180.                 return false;
  181.             })
  182.         })
  183.     </script>
  184.     {# Layout: HEAD #}
  185.     {% if Layout.Head %}
  186.         {{ include('block.twig', {'Blocks': Layout.Head}) }}
  187.     {% endif %}
  188.     {# プラグイン用styleseetやmetatagなど #}
  189.     {% if plugin_assets is defined %}{{ include('@admin/snippet.twig', { snippets: plugin_assets }) }}{% endif %}
  190. </head>
  191. <body id="page_{{ app.request.get('_route') }}" class="{{ body_class|default('other_page') }}">
  192. {# Layout: BODY_AFTER #}
  193. {% if Layout.BodyAfter %}
  194.     {{ include('block.twig', {'Blocks': Layout.BodyAfter}) }}
  195. {% endif %}
  196. {% if isMaintenance %}
  197.     <div class="ec-maintenanceAlert">
  198.         <div>
  199.             <div class="ec-maintenanceAlert__icon"><img src="{{ asset('assets/icon/exclamation-white.svg') }}"/></div>
  200.             {{ 'メンテナンスモードが有効になっています。'|trans }}
  201.         </div>
  202.     </div>
  203. {% endif %}
  204. <div class="ec-layoutRole">
  205.     {# Layout: HEADER #}
  206.     {% if Layout.Header %}
  207.         <header class="ec-layoutRole__header">
  208.             {{ include('block.twig', {'Blocks': Layout.Header}) }}
  209.         </header>
  210.     {% endif %}
  211.     {# Layout: CONTENTS_TOP #}
  212.     {% if Layout.ContentsTop %}
  213.         <div class="ec-layoutRole__contentTop">
  214.             {{ include('block.twig', {'Blocks': Layout.ContentsTop}) }}
  215.         </div>
  216.     {% endif %}
  217.     <div class="ec-layoutRole__contents">
  218.         {# Layout: SIDE_LEFT #}
  219.         {% if Layout.SideLeft %}
  220.             <aside class="ec-layoutRole__left">
  221.                 {{ include('block.twig', {'Blocks': Layout.SideLeft}) }}
  222.             </aside>
  223.         {% endif %}
  224.         {% set layoutRoleMain = 'ec-layoutRole__main' %}
  225.         {% if Layout.ColumnNum == 2 %}
  226.             {% set layoutRoleMain = 'ec-layoutRole__mainWithColumn' %}
  227.         {% elseif Layout.ColumnNum == 3 %}
  228.             {% set layoutRoleMain = 'ec-layoutRole__mainBetweenColumn' %}
  229.         {% endif %}
  230.         <main class="{{ layoutRoleMain }}">
  231.             {# Layout: MAIN_TOP #}
  232.             {% if Layout.MainTop %}
  233.                 <div class="ec-layoutRole__mainTop">
  234.                     {{ include('block.twig', {'Blocks': Layout.MainTop}) }}
  235.                 </div>
  236.             {% endif %}
  237.             {# MAIN AREA #}
  238.             {% block main %}{% endblock %}
  239.             {# Layout: MAIN_Bottom #}
  240.             {% if Layout.MainBottom %}
  241.                 <div class="ec-layoutRole__mainBottom">
  242.                     {{ include('block.twig', {'Blocks': Layout.MainBottom}) }}
  243.                 </div>
  244.             {% endif %}
  245.         </main>
  246.         {# Layout: SIDE_RIGHT #}
  247.         {% if Layout.SideRight %}
  248.             <aside class="ec-layoutRole__right">
  249.                 {{ include('block.twig', {'Blocks': Layout.SideRight}) }}
  250.             </aside>
  251.         {% endif %}
  252.     </div>
  253.     {# Layout: CONTENTS_BOTTOM #}
  254.     {% if Layout.ContentsBottom %}
  255.         <div class="ec-layoutRole__contentBottom">
  256.             {{ include('block.twig', {'Blocks': Layout.ContentsBottom}) }}
  257.         </div>
  258.     {% endif %}
  259.     {# Layout: CONTENTS_FOOTER #}
  260.     {% if Layout.Footer %}
  261.         <footer class="ec-layoutRole__footer">
  262.             {{ include('block.twig', {'Blocks': Layout.Footer}) }}
  263.         </footer>
  264.     {% endif %}
  265. </div><!-- ec-layoutRole -->
  266. <div class="ec-overlayRole"></div>
  267. <div class="ec-drawerRole">
  268.     <div class="ec-drawerRoleClose"><i class="fas fa-times"></i></div>
  269.     {# Layout: DRAWER #}
  270.     {% if Layout.Drawer %}
  271.         {{ include('block.twig', {'Blocks': Layout.Drawer}) }}
  272.     {% endif %}
  273. </div>
  274. <div class="sp-hamburger-content" id="hamburger_menu">
  275.     {{ include('Block/hamburger_menu.twig') }}
  276. </div>
  277. {# <div class="ec-blockTopBtn pagetop">{{'ページトップへ'|trans}}</div> #}
  278. {% include('@common/lang.twig') %}
  279. <script src="{{ asset('assets/js/function.js') }}"></script>
  280. <script src="{{ asset('assets/js/eccube.js') }}"></script>
  281. {% if app.request.get('_route') == 'product_detail' %}
  282. <script src="{{ asset('assets/js/swiper-bundle.min.js') }}"></script>
  283. {% endif %}
  284. {% block javascript %}{% endblock %}
  285. {# Layout: CLOSE_BODY_BEFORE #}
  286. {% if Layout.CloseBodyBefore %}
  287.     {{ include('block.twig', {'Blocks': Layout.CloseBodyBefore}) }}
  288. {% endif %}
  289. {# プラグイン用Snippet #}
  290. {% if plugin_snippets is defined %}
  291.     {{ include('snippet.twig', { snippets: plugin_snippets }) }}
  292. {% endif %}
  293. <script src="{{ asset('assets/js/customize.js', 'user_data') }}"></script>
  294. {% set currentRoute = app.request.get('_route') %}
  295. {% set currentUrl = app.request.pathinfo %}
  296. {% set routeParams = app.request.get('_route_params') %}
  297. {% if currentRoute != 'cart' and currentRoute != 'mypage_login' and 'shopping' not in currentRoute and 'shopping' not in routeParams and 'forgot' not in currentRoute and 'forgot' not in routeParams and 'mypage' not in currentRoute and 'mypage' not in routeParams %}
  298.     {# ここに条件が満たされる場合のコードを追加 #}
  299.     <div class="sp-fixed-footer">
  300.         <div class="sp-fixed-footer__inner {% if is_granted('ROLE_USER') %} {% else %} flex {% endif %}">
  301.             {% if is_granted('ROLE_USER') %}
  302.                 {{ include('Block/cart.twig') }}
  303.             {% else %}
  304.                 <div class="sp-fixed-footer__left">
  305.                     <p class="sp-fixed-footer__text">ブレバース<br>ネットショッピング</p>
  306.                     <a href="" class="sp-fixed-footer__link">新規会員はこちら</a>
  307.                 </div>
  308.                 <div class="sp-fixed-footer__right">
  309.                     <a href="{{ url('mypage_login') }}" class="sp-fixed-footer__btn">
  310.                         {{ 'ログイン'|trans }}
  311.                     </a>
  312.                 </div>
  313.             {% endif %}
  314.         </div>
  315.     </div>
  316. {% endif %}
  317. <div id="loginModal" class="modal-outer">
  318.     <div class="modal-inner modal-login">
  319.         <p class="modal-login__title">
  320.             サービスをご利用いただくには、
  321.             <br>ブレイバースショップへのログインが必要です。
  322.         </p>
  323.         <a href="{{ url('mypage_login') }}" class="modal-login__btn">ログイン</a>
  324.     </div>
  325. </div>
  326. </body>
  327. </html>