app/template/default/Block/header.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. {% set totalQuantity = get_carts_total_quantity() %}
  9. {% set EnUser = app.request.cookies.get('en_user') == 'Y' %}
  10. {% if EnUser == false %}
  11.     <div class="ec-header-navi-sp pc-none">
  12.         <div class="ec-header-navi-sp__logo">
  13.             {% if ChainStore == false %}
  14.                 <a href="{{ url('homepage') }}">
  15.                     <img src="{{ asset('assets/img/common/logo_sp.png') }}" width="80">
  16.                 </a>
  17.             {% else %}
  18.                 <a href="{{ url('mypage_menu') }}">
  19.                     <img src="{{ asset('assets/img/common/logo_sp.png') }}" width="80">
  20.                 </a>
  21.             {% endif %}
  22.         </div>
  23.         <div class="ec-header-navi-sp__login">
  24.             {% if is_granted('ROLE_USER') %}
  25.                 <a href="{{ url('logout') }}">
  26.                     <img src="{{ asset('assets/img/common/lock-alt-solid.svg') }}" width="25">
  27.                     <span>ログアウト</span>
  28.                 </a>
  29.             {% else %}
  30.                 <a href="{{ url('mypage_login') }}">
  31.                     <img src="{{ asset('assets/img/common/lock-alt-solid.svg') }}" width="25">
  32.                     <span>ログイン</span>
  33.                 </a>
  34.             {% endif %}
  35.         </div>
  36.         <div class="ec-header-navi-sp__cart">
  37.             <div class="ec-headerRole__cart">
  38.                 {{ include('Block/cart.twig') }}
  39.             </div>
  40.         </div>
  41.         <div class="ec-header-navi-sp__store">
  42.             {% if ChainStore == false %}
  43.                 <a href="{{ url('product_list') }}">
  44.                     <p><span class="small">ONNLINE</span><span class="large">SHOP</span></p>
  45.                     <img src="{{ asset('assets/img/common/icon_online_store.png') }}" width="32">
  46.                 </a>
  47.             {% else %}
  48.                 <a href="{{ url('mypage') }}">
  49.                     <p class="chain-store-icon2">マイ<br>ページ</p>
  50.                 </a>
  51.                 <a href="{{ url('product_list') }}">
  52.                     <p class="chain-store-icon">商品<br>発注</p>
  53.                 </a>
  54.             {% endif %}
  55.         </div>
  56.         <div class="ec-header-navi-sp__btn">
  57.             {{ include('Block/nav_sp.twig') }}
  58.         </div>
  59.         {% if ChainStore == false %}
  60.             {% if app.request.attributes.get('_route') == 'homepage' or app.request.attributes.get('_route') == 'product_list' %}
  61.                 <div class="ec-header-navi-sp__lang-link">
  62.                     <a href="{{ url('en_user') }}">
  63.                         <span>English Page</span>
  64.                     </a>
  65.                 </div>
  66.             {% endif %}
  67.         {% endif %}
  68.     </div>
  69.     <div class="ec-header-top sp-none">
  70.         {% if ChainStore == false %}
  71.             {% if app.request.attributes.get('_route') == 'homepage' or app.request.attributes.get('_route') == 'product_list' %}
  72.                 <div class="ec-header-top__lang-link">
  73.                     <a href="{{ url('en_user') }}">English Page</a>
  74.                 </div>
  75.             {% endif %}
  76.         {% endif %}
  77.         {{ render(path('block_' ~ 'search_product')) }}
  78.         <div class="ec-header-top__login">
  79.             {{ include('Block/login.twig') }}
  80.         </div>
  81.     </div>
  82.     <div class="ec-header-bottom sp-none">
  83.         {% if ChainStore == false %}
  84.             <div class="ec-header-bottom__logo">
  85.                 <p class="ec-header-bottom__img">
  86.                     <h1>
  87.                         <a href="{{ url('homepage') }}">
  88.                             <img src="{{ asset('assets/img/common/logo_header.png') }}" alt="ダシーズファクトリー公式サイト オンラインショップ">
  89.                         </a>
  90.                     </h1>
  91.                 </p>
  92.             </div>
  93.             <div class="ec-header-bottom__center">
  94.                 <div class="ec-header-bottom__gnav">
  95.                     <ul class="p-global-navi">
  96.                         <li class="p-global-navi__item">
  97.                             <a href="/shop/news/">NEWS</a>
  98.                             <a href="/shop/news/" class="p-global-navi__jp">お知らせ</a>
  99.                         </li>
  100.                         <li class="p-global-navi__item has-child">
  101.                             <a href="/shop/story/">STORY</a>
  102.                             <a href="/shop/story/" class="p-global-navi__jp">製品の誕生物語</a>
  103.                             <ul class="p-global-navi-child">
  104.                             <li class="p-global-navi-child__item">
  105.                                 <a href="/shop/story/story-ice-cream">- ICE</a>
  106.                             </li>
  107.                             <li class="p-global-navi-child__item">
  108.                                 <a href="/shop/story/story-coffee">- COFFEE</a>
  109.                             </li>
  110.                             </ul>
  111.                         </li>
  112.                         <li class="p-global-navi__item has-child">
  113.                             <a href="/shop/concept/">CONCEPT</a>
  114.                             <a href="/shop/concept/" class="p-global-navi__jp">製品のこだわり</a>
  115.                             <ul class="p-global-navi-child">
  116.                             <li class="p-global-navi-child__item">
  117.                                 <a href="/shop/concept/concept-ice-cream/">- ICE</a>
  118.                             </li>
  119.                             <li class="p-global-navi-child__item">
  120.                                 <a href="/shop/concept/concept-coffee/">- COFFEE</a>
  121.                             </li>
  122.                             </ul>
  123.                         </li>
  124.                         <li class="p-global-navi__item">
  125.                             <a href="/shop/products-list/">PRODUCTS</a>
  126.                             <a href="/shop/products-list/" class="p-global-navi__jp">商品ラインアップ</a>
  127.                         </li>
  128.                         <li class="p-global-navi__item">
  129.                             <a href="{{ url('company') }}">ABOUT US</a>
  130.                             <a href="{{ url('company') }}" class="p-global-navi__jp">会社概要</a>
  131.                         </li>
  132.                         <li class="p-global-navi__item">
  133.                             <a href="/shop/stores/">STORES</a>
  134.                             <a href="/shop/stores/" class="p-global-navi__jp">実店舗のご紹介</a>
  135.                         </li>
  136.                         <li class="p-global-navi__item">
  137.                             <a href="/shop/entry/">販売店募集</a>
  138.                         </li>
  139.                         <li class="p-global-navi__item">
  140.                             <a href="/shop/vending/">自販機取扱</a>
  141.                         </li>
  142.                     </ul>
  143.                 </div>
  144.             </div>
  145.         {% else %}
  146.             <div class="ec-header-bottom__logo">
  147.                 <p class="ec-header-bottom__img">
  148.                     <a href="{{ url('mypage_menu') }}">
  149.                     <img src="{{ asset('assets/img/common/logo_header.png') }}" alt="">
  150.                     </a>
  151.                 </p>
  152.             </div>
  153.             <div class="ec-header-bottom__center">
  154.                 <div class="ec-header-bottom-title">
  155.                     <h1>ダシーズ契約店専用サイト</h1>
  156.                 </div>
  157.             </div>
  158.         {% endif %}
  159.         <div class="ec-header-bottom__right">
  160.             <ul class="ec-header-bottom__store-link">
  161.                 <li class="ec-header-bottom__store-link-item">
  162.                     <a href="{{ url('cart') }}">
  163.                     <span class="ec-cartNavi-badge">{{ totalQuantity|number_format }}</span>
  164.                     <img src="{{ asset('assets/img/common/icon_store.png') }}" alt="" width="34">
  165.                     </a>
  166.                 </li>
  167.                 {% if ChainStore == false %}
  168.                     <li class="ec-header-bottom__store-link-item">
  169.                         <a href="{{ url('product_list') }}">
  170.                             <span>ONLINE SHOP</span>
  171.                         </a>
  172.                         <a href="/products/list/" class="store-link-jp">オンラインショップ</a>
  173.                     </li>
  174.                     <li class="ec-header-bottom__store-link-item">
  175.                         <a href="/shop/guide/">
  176.                             <span class="store-link-small">GUIDE</span>
  177.                         </a>
  178.                         <a href="/shop/guide/" class="store-link-jp">お買い物ガイド</a>
  179.                     </li>
  180.                 {% endif %}
  181.             </ul>
  182.         </div>
  183.     </div>
  184. {% else %}
  185.     <div class="ec-header-navi-sp pc-none">
  186.         <div class="ec-header-navi-sp__logo">
  187.             {% if EnUser %}
  188.                 <a href="{{ url('product_list') }}">
  189.             {% else %}
  190.                 <a href="{{ url('homepage') }}">
  191.             {% endif %}
  192.                 <img src="{{ asset('assets/img/common/logo_sp.png') }}" width="80">
  193.             </a>
  194.         </div>
  195.         {#
  196.         <div class="ec-header-navi-sp__login">
  197.             {% if is_granted('ROLE_USER') %}
  198.                 <a href="{{ url('logout') }}">
  199.                     <img src="{{ asset('assets/img/common/lock-alt-solid.svg') }}" width="25">
  200.                     <span>ログアウト</span>
  201.                 </a>
  202.             {% else %}
  203.                 <a href="{{ url('mypage_login') }}">
  204.                     <img src="{{ asset('assets/img/common/lock-alt-solid.svg') }}" width="25">
  205.                     <span>ログイン</span>
  206.                 </a>
  207.             {% endif %}
  208.         </div>
  209.         #}
  210.         <div class="ec-header-navi-sp__cart">
  211.             <div class="ec-headerRole__cart">
  212.                 {{ include('Block/cart.twig') }}
  213.             </div>
  214.         </div>
  215.         <div class="ec-header-navi-sp__store">
  216.             <a href="{{ url('product_list') }}">
  217.                 <p><span class="small">ONLINE</span><span class="large">SHOP</span></p>
  218.                 <img src="{{ asset('assets/img/common/icon_online_store.png') }}" width="32">
  219.             </a>
  220.         </div>
  221.         <div class="ec-header-navi-sp__btn">
  222.             {{ include('Block/nav_sp.twig') }}
  223.         </div>
  224.         {% if app.request.attributes.get('_route') == 'homepage' or app.request.attributes.get('_route') == 'product_list' %}
  225.             <div class="ec-header-navi-sp__lang-link">
  226.                 <a href="{{ url('product_list') }}?empty_cookie=1">
  227.                     <span>Japanese Page</span>
  228.                 </a>
  229.             </div>
  230.         {% endif %}
  231.     </div>
  232.     {% if app.request.attributes.get('_route') == 'homepage' or app.request.attributes.get('_route') == 'product_list' %}
  233.         <div class="ec-header-top sp-none">
  234.             <div class="ec-header-top__lang-link">
  235.                 <a href="{{ url('product_list') }}?empty_cookie=1">Japanese Page</a>
  236.             </div>
  237.         </div>
  238.     {% endif %}
  239.     <div class="ec-header-bottom ec-header-bottom--en sp-none">
  240.         <div class="ec-header-bottom__logo">
  241.             <p class="ec-header-bottom__img">
  242.                 <h1>
  243.                     {% if EnUser %}
  244.                         <a href="{{ url('product_list') }}">
  245.                     {% else %}
  246.                         <a href="{{ url('homepage') }}">
  247.                     {% endif %}
  248.                         <img src="{{ asset('assets/img/common/logo_header.png') }}" alt="ダシーズファクトリー公式サイト オンラインショップ">
  249.                     </a>
  250.                 </h1>
  251.             </p>
  252.         </div>
  253.         <div class="ec-header-bottom__right">
  254.             <ul class="ec-header-bottom__store-link">
  255.                 <li class="ec-header-bottom__store-link-item">
  256.                     <a href="{{ url('cart') }}">
  257.                     <span class="ec-cartNavi-badge">{{ totalQuantity|number_format }}</span>
  258.                     <img src="{{ asset('assets/img/common/icon_store.png') }}" alt="" width="34">
  259.                     </a>
  260.                 </li>
  261.                 {% if ChainStore == false %}
  262.                     <li class="ec-header-bottom__store-link-item">
  263.                         <a href="{{ url('product_list') }}">
  264.                             <span>ONLINE SHOP</span>
  265.                         </a>
  266.                     </li>
  267.                     <li class="ec-header-bottom__store-link-item">
  268.                         <a href="/shop/en/guide/">
  269.                             <span class="store-link-small">GUIDE</span>
  270.                         </a>
  271.                     </li>
  272.                 {% endif %}
  273.             </ul>
  274.         </div>
  275.     </div>
  276. {% endif %}
  277. {% if ChainStore %}
  278.     <div class="ec-header-bottom-list sp-none">
  279.         <ul class="ec-header-bottom-list__list">
  280.             <li class="ec-header-bottom-list__item">
  281.                 <a href="{{ url('mypage_menu') }}">トップ</a>
  282.             </li>
  283.             <li class="ec-header-bottom-list__item">
  284.                 <a href="{{ url('mypage_news') }}">新着情報</a>
  285.             </li>
  286.             <li class="ec-header-bottom-list__item">
  287.                 <a href="{{ url('product_list') }}">商品発注</a>
  288.             </li>
  289.             <li class="ec-header-bottom-list__item">
  290.                 <a href="{{ url('product_list') }}?category_id=8">販促品発注</a>
  291.             </li>
  292.             <li class="ec-header-bottom-list__item">
  293.                 <a href="/shop/manual/">マニュアル</a>
  294.             </li>
  295.             <li class="ec-header-bottom-list__item">
  296.                 <a href="/shop/notifi/">各種申請</a>
  297.             </li>
  298.             <li class="ec-header-bottom-list__item">
  299.                 <a href="/shop/promotion/">プロモーション</a>
  300.             </li>
  301.             <li class="ec-header-bottom-list__item ec-header-bottom-list__item--colored">
  302.                 <a href="{{ url('mypage') }}">マイページ</a>
  303.             </li>
  304.         </ul>
  305.     </div>
  306. {% endif %}