src/Eccube/Resource/template/default/default_frame.twig line 237

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.     <link rel="icon" href="{{ asset('assets/img/common/favicon.ico', 'user_data') }}">
  33.     <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
  34.     <link rel="stylesheet" href="{{ asset('assets/css/style.css') }}">
  35.     <script src="{{ asset('front.bundle.js', 'bundle') }}"></script>
  36.     {% block stylesheet %}{% endblock %}
  37.     <script>
  38.         $(function() {
  39.             $.ajaxSetup({
  40.                 'headers': {
  41.                     'ECCUBE-CSRF-TOKEN': $('meta[name="eccube-csrf-token"]').attr('content')
  42.                 }
  43.             });
  44.         });
  45.     </script>
  46.     {# Layout: HEAD #}
  47.     {% if Layout.Head %}
  48.         {{ include('block.twig', {'Blocks': Layout.Head}) }}
  49.     {% endif %}
  50.     {# プラグイン用styleseetやmetatagなど #}
  51.     {% if plugin_assets is defined %}{{ include('@admin/snippet.twig', { snippets: plugin_assets }) }}{% endif %}
  52.     <link rel="stylesheet" href="{{ asset('assets/css/customize.css', 'user_data') }}">
  53. {% if app.user %}
  54.     <!--
  55.         EC-CUBEカスタマイズ
  56.     -->
  57.     <script type="text/javascript">
  58.         // 値取得確認
  59.         console.log(window);
  60.         console.log('The user id is ' + '{{ app.user.id }}');
  61.         console.log('The user email is ' + '{{ app.user.email }}');
  62.         console.log('The user name is ' + '{{ app.user.name01 }} {{ app.user.name02 }}');
  63.         console.log('The user point is ' + '{{ app.user.point }}');
  64. {% endif %}
  65.     </script>
  66.     <!--
  67.         DataCloud用タグ
  68.     -->
  69.     <script type="text/javascript" src="https://cdn.c360a.salesforce.com/beacon/c360a/f36d614a-e1b5-4bfd-8585-97d816238409/scripts/c360a.min.js">
  70.     console.log('DataCloud tag loaded');
  71.     </script>
  72.     <!--
  73.         //ここまで DataCloud用Beaconタグ
  74.     -->
  75.     <!--
  76.         //ここまで EC-CUBEカスタマイズ
  77.     -->
  78.     <!--
  79.         Personalization用Beaconタグ
  80.     <script type="text/javascript" async src="//cdn.evgnet.com/beacon/directusinc/tokutakeaws/scripts/evergage.min.js"></script>
  81.         //ここまで Personalization様Beconタグ
  82.     -->
  83.     <!--
  84.         Braze用WebSDKタグ
  85.     -->
  86.     
  87.     <!-- SDK読み込み(必須。ただし直接記述の方法)
  88.     <script type="text/javascript">
  89.         +function(a,p,P,b,y){a.braze={};a.brazeQueue=[];for(var s="BrazeSdkMetadata DeviceProperties Card Card.prototype.dismissCard Card.prototype.removeAllSubscriptions Card.prototype.removeSubscription Card.prototype.subscribeToClickedEvent Card.prototype.subscribeToDismissedEvent Card.fromContentCardsJson Banner CaptionedImage ClassicCard ControlCard ContentCards ContentCards.prototype.getUnviewedCardCount Feed Feed.prototype.getUnreadCardCount ControlMessage InAppMessage InAppMessage.SlideFrom InAppMessage.ClickAction InAppMessage.DismissType InAppMessage.OpenTarget InAppMessage.ImageStyle InAppMessage.Orientation InAppMessage.TextAlignment InAppMessage.CropType InAppMessage.prototype.closeMessage InAppMessage.prototype.removeAllSubscriptions InAppMessage.prototype.removeSubscription InAppMessage.prototype.subscribeToClickedEvent InAppMessage.prototype.subscribeToDismissedEvent InAppMessage.fromJson FullScreenMessage ModalMessage HtmlMessage SlideUpMessage User User.Genders User.NotificationSubscriptionTypes User.prototype.addAlias User.prototype.addToCustomAttributeArray User.prototype.addToSubscriptionGroup User.prototype.getUserId User.prototype.incrementCustomUserAttribute User.prototype.removeFromCustomAttributeArray User.prototype.removeFromSubscriptionGroup User.prototype.setCountry User.prototype.setCustomLocationAttribute User.prototype.setCustomUserAttribute User.prototype.setDateOfBirth User.prototype.setEmail User.prototype.setEmailNotificationSubscriptionType User.prototype.setFirstName User.prototype.setGender User.prototype.setHomeCity User.prototype.setLanguage User.prototype.setLastKnownLocation User.prototype.setLastName User.prototype.setPhoneNumber User.prototype.setPushNotificationSubscriptionType InAppMessageButton InAppMessageButton.prototype.removeAllSubscriptions InAppMessageButton.prototype.removeSubscription InAppMessageButton.prototype.subscribeToClickedEvent automaticallyShowInAppMessages destroyFeed hideContentCards showContentCards showFeed showInAppMessage toggleContentCards toggleFeed changeUser destroy getDeviceId initialize isPushBlocked isPushPermissionGranted isPushSupported logCardClick logCardDismissal logCardImpressions logContentCardImpressions logContentCardsDisplayed logCustomEvent logFeedDisplayed logInAppMessageButtonClick logInAppMessageClick logInAppMessageHtmlClick logInAppMessageImpression logPurchase openSession requestPushPermission removeAllSubscriptions removeSubscription requestContentCardsRefresh requestFeedRefresh refreshFeatureFlags requestImmediateDataFlush enableSDK isDisabled setLogger setSdkAuthenticationSignature addSdkMetadata disableSDK subscribeToContentCardsUpdates subscribeToFeedUpdates subscribeToInAppMessage subscribeToSdkAuthenticationFailures toggleLogging unregisterPush wipeData handleBrazeAction subscribeToFeatureFlagsUpdates getAllFeatureFlags".split(" "),i=0;i<s.length;i++){for(var m=s[i],k=a.braze,l=m.split("."),j=0;j<l.length-1;j++)k=k[l[j]];k[l[j]]=(new Function("return function "+m.replace(/\./g,"_")+"(){window.brazeQueue.push(arguments); return true}"))()}window.braze.getCachedContentCards=function(){return new window.braze.ContentCards};window.braze.getCachedFeed=function(){return new window.braze.Feed};window.braze.getUser=function(){return new window.braze.User};window.braze.getFeatureFlag=function(){return new window.braze.FeatureFlag};(y=p.createElement(P)).type='text/javascript';
  90.           y.src='https://js.appboycdn.com/web-sdk/4.5/braze.min.js';
  91.           y.async=1;(b=p.getElementsByTagName(P)[0]).parentNode.insertBefore(y,b)
  92.         }(window,document,'script');
  93.         // initialize the SDK(初期設定)
  94.         braze.initialize('712642bd-8b92-4338-8417-373195f29d87', {
  95.             baseUrl: "sdk.iad-05.braze.com",
  96.             enableLogging: true
  97.         });
  98.         
  99.         // optionally show all in-app messages without custom handling
  100.         braze.automaticallyShowInAppMessages();
  101.         // if you use Content Cards
  102.         braze.subscribeToContentCardsUpdates(function(cards){
  103.             // cards have been updated
  104.         });
  105.         // optionally set the current user's External ID
  106.         //if (isLoggedIn){
  107.         //   braze.changeUser(userIdentifier);
  108.         //}
  109.         // Be sure to call `openSession` after `automaticallyShowInAppMessages`
  110.         braze.openSession();
  111.         // Troubleshooting
  112.         // braze.toggleLogging()
  113.          -->
  114. <script type="text/javascript">
  115. {% if app.user %}
  116.         // 変数前準備
  117.         const userId = '{{ app.user.id }}';
  118.         const lastName = '{{ app.user.name01 }}';
  119.         const firstName = '{{ app.user.name02 }}';
  120.         const email = '{{ app.user.email }}';
  121. {% endif %}
  122. </script>
  123.     <!--
  124.         // ID設定
  125.         braze.changeUser(userId);
  126.         // StanderdAttributesへユーザー情報をセットする為の関数
  127.         const setStandardAttributes = () => {
  128.             if (lastName) {
  129.                 braze.getUser().setLastName(lastName);
  130.             }
  131.             if (firstName) {
  132.                 braze.getUser().setFirstName(firstName);
  133.             }
  134.             if (email) {
  135.                 braze.getUser().setEmail(email);
  136.             }
  137.         }
  138.         // StanderdAttributesの関数呼び出し(実行)
  139.         setStandardAttributes();
  140. {% if app.user %}
  141.         // カスタムユーザー属性のKeyの作成。事前にBraze Manage Settingsからカスタム属性を作成しておく
  142.         const point = 'point'
  143.         const pointValue = '{{ app.user.point }}';
  144. {% endif %}
  145.         // カスタムユーザー属性
  146.         const setCustomUserAttribute = () => {
  147.             if (point && pointValue) {
  148.                 braze.getUser().setCustomUserAttribute(point, pointValue);
  149.             }
  150.         }
  151.         // setCustomUserAttributeの関数呼び出し(実行)
  152.         setCustomUserAttribute();
  153.         // カスタムイベント属性の作成。事前にBraze Manage Settingsからカスタムイベントを作成しておく
  154.         const eventName = 'changeRegist';    // EventName
  155.         const eventPropertyName = 'open';        // EventPropertyName
  156.         const eventPropertyValue = new Date();    // EventPropertyValue
  157.         console.log('The time is ' + eventPropertyValue.toLocaleString())
  158.         // カスタムイベント
  159.         const setCustomEvent = () => {
  160.             if (eventName) {
  161.                 if (eventPropertyName && eventPropertyValue) {
  162.                     let eventProperties = {}
  163.                     eventProperties[eventPropertyName] = eventPropertyValue.toLocaleString()
  164.                     braze.logCustomEvent(eventName, eventProperties)
  165.                 }
  166.                 else {
  167.                     braze.logCustomEvent(eventName)
  168.                 }
  169.             }
  170.         }
  171.         // setCustomEventの関数呼び出し(実行)本来はカスタムイベントを起こす場所で発火
  172.         setCustomEvent();
  173.         // 購入イベント
  174.         const setPurchaseEvent = () => {
  175.         }
  176.     </script>      
  177.     
  178.         //ここまで Braze用WebSDKタグ
  179.     -->
  180. </head>
  181. <body id="page_{{ app.request.get('_route') }}" class="{{ body_class|default('other_page') }}">
  182. <!-- Google Tag Manager (noscript) -->
  183. <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-5JZRBCNS"
  184. height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
  185. <!-- End Google Tag Manager (noscript) -->
  186. {# Layout: BODY_AFTER #}
  187. {% if Layout.BodyAfter %}
  188.     {{ include('block.twig', {'Blocks': Layout.BodyAfter}) }}
  189. {% endif %}
  190. {% if isMaintenance %}
  191.     <div class="ec-maintenanceAlert">
  192.         <div>
  193.             <div class="ec-maintenanceAlert__icon"><img src="{{ asset('assets/icon/exclamation-white.svg') }}"/></div>
  194.             {{ 'メンテナンスモードが有効になっています。'|trans }}
  195.         </div>
  196.     </div>
  197. {% endif %}
  198. <div class="ec-layoutRole">
  199.     {# Layout: HEADER #}
  200.     {% if Layout.Header %}
  201.         <header class="ec-layoutRole__header">
  202.             {{ include('block.twig', {'Blocks': Layout.Header}) }}
  203.         </header>
  204.     {% endif %}
  205.     {# Layout: CONTENTS_TOP #}
  206.     {% if Layout.ContentsTop %}
  207.         <div class="ec-layoutRole__contentTop">
  208.             {{ include('block.twig', {'Blocks': Layout.ContentsTop}) }}
  209.         </div>
  210.     {% endif %}
  211.     <div class="ec-layoutRole__contents">
  212.         {# Layout: SIDE_LEFT #}
  213.         {% if Layout.SideLeft %}
  214.             <aside class="ec-layoutRole__left">
  215.                 {{ include('block.twig', {'Blocks': Layout.SideLeft}) }}
  216.             </aside>
  217.         {% endif %}
  218.         {% set layoutRoleMain = 'ec-layoutRole__main' %}
  219.         {% if Layout.ColumnNum == 2 %}
  220.             {% set layoutRoleMain = 'ec-layoutRole__mainWithColumn' %}
  221.         {% elseif Layout.ColumnNum == 3 %}
  222.             {% set layoutRoleMain = 'ec-layoutRole__mainBetweenColumn' %}
  223.         {% endif %}
  224.         <main class="{{ layoutRoleMain }}">
  225.             {# Layout: MAIN_TOP #}
  226.             {% if Layout.MainTop %}
  227.                 <div class="ec-layoutRole__mainTop">
  228.                     {{ include('block.twig', {'Blocks': Layout.MainTop}) }}
  229.                 </div>
  230.             {% endif %}
  231.             {# MAIN AREA #}
  232.             {% block main %}{% endblock %}
  233.             {# Layout: MAIN_Bottom #}
  234.             {% if Layout.MainBottom %}
  235.                 <div class="ec-layoutRole__mainBottom">
  236.                     {{ include('block.twig', {'Blocks': Layout.MainBottom}) }}
  237.                 </div>
  238.             {% endif %}
  239.         </main>
  240.         {# Layout: SIDE_RIGHT #}
  241.         {% if Layout.SideRight %}
  242.             <aside class="ec-layoutRole__right">
  243.                 {{ include('block.twig', {'Blocks': Layout.SideRight}) }}
  244.             </aside>
  245.         {% endif %}
  246.     </div>
  247.     {# Layout: CONTENTS_BOTTOM #}
  248.     {% if Layout.ContentsBottom %}
  249.         <div class="ec-layoutRole__contentBottom">
  250.             {{ include('block.twig', {'Blocks': Layout.ContentsBottom}) }}
  251.         </div>
  252.     {% endif %}
  253.     {# Layout: CONTENTS_FOOTER #}
  254.     {% if Layout.Footer %}
  255.         <footer class="ec-layoutRole__footer">
  256.             {{ include('block.twig', {'Blocks': Layout.Footer}) }}
  257.         </footer>
  258.     {% endif %}
  259. </div><!-- ec-layoutRole -->
  260. <div class="ec-overlayRole"></div>
  261. <div class="ec-drawerRoleClose"><i class="fas fa-times"></i></div>
  262. <div class="ec-drawerRole">
  263.     {# Layout: DRAWER #}
  264.     {% if Layout.Drawer %}
  265.         {{ include('block.twig', {'Blocks': Layout.Drawer}) }}
  266.     {% endif %}
  267. </div>
  268. <div class="ec-blockTopBtn pagetop">{{'ページトップへ'|trans}}</div>
  269. {% include('@common/lang.twig') %}
  270. <script src="{{ asset('assets/js/function.js') }}"></script>
  271. <script src="{{ asset('assets/js/eccube.js') }}"></script>
  272. {% block javascript %}{% endblock %}
  273. {# Layout: CLOSE_BODY_BEFORE #}
  274. {% if Layout.CloseBodyBefore %}
  275.     {{ include('block.twig', {'Blocks': Layout.CloseBodyBefore}) }}
  276. {% endif %}
  277. {# プラグイン用Snippet #}
  278. {% if plugin_snippets is defined %}
  279.     {{ include('snippet.twig', { snippets: plugin_snippets }) }}
  280. {% endif %}
  281.     <script src="{{ asset('assets/js/customize.js', 'user_data') }}"></script>
  282. </body>
  283. </html>