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