app/template/aneros2023/Block/aneros_header.twig line 1

Open in your IDE?
  1. <header id="header" class="header">
  2.         <div class="no_margin container-fluid">
  3.             <div class="top">
  4.                 <div class="container" id="headre_top">
  5.                     <div id="social_area">
  6.                         <ul id="social-icons">
  7.                             <li>
  8.                                 <a href="https://twitter.com/aneros_japan" target="_blank" rel="noopener">
  9.                                     <i class="fa fa-x-twitter"></i>
  10.                                 </a>
  11.                             </li>
  12.                             <li>
  13.                                 <a href="https://www.instagram.com/aneros_japan/" target="_blank" rel="noopener">
  14.                                     <i class="fa fa-instagram"></i>
  15.                                 </a>
  16.                             </li>
  17.                             <li>
  18.                                 <a href="{{ url('contact') }}">
  19.                                     <i class="fa fa-envelope"></i>
  20.                                 </a>
  21.                             </li>
  22.                         </ul>
  23.                     </div>
  24.                     <div class="right">
  25.                         <div class="top_notices">アネロスジャパンで5,000円以上のお買い上げは送料無料!</div>
  26. {% set Carts = get_all_carts() %}
  27. {% set totalPrice = get_carts_total_price() %}
  28. {% set totalQuantity = get_carts_total_quantity() %}
  29. {% set total_price = 0 %}
  30.                         <div class="minicart sidebar">
  31.                             {% if totalQuantity <= 0 %}
  32.                                 {# <a href="{{ url('cart') }}" id="header-cart-link" class=" no-count"><span class="fa fa-shopping-cart"></span>カート内に商品はございません</a> #}
  33.                                 <a href="{{ url('cart') }}" id="header-cart-link" class=" no-count"><span class="fa fa-shopping-cart"></span></a>
  34.                             {% else %}
  35.                                 {# <a href="{{ url('cart') }}" id="header-cart-link" class=" no-count"><span class="fa fa-shopping-cart"></span>合計数量:{{ totalQuantity }}</a> #}
  36.                                 <a href="{{ url('cart') }}" id="header-cart-link" class=" no-count"><span class="fa fa-shopping-cart"></span><span class="cart-total">{{ totalQuantity }}</span></a>
  37.                             {% endif %}
  38.                             <div id="header-cart">
  39.                                 <div class="block-content">
  40.                                     {% if totalQuantity <= 0 %}
  41.                                         <p class="empty">カート内に商品はございません</p>
  42.                                     {% else %}
  43.                                         <p class="block-subtitle">現在カゴの中</p>
  44.                                         <ol id="cart-sidebar" class="mini-products-list flexbox">
  45.                                             {% set cnt = 0 %}
  46.                                             {% for Cart in Carts %}
  47.                                                 {% for CartItem in Cart.CartItems %}
  48.                                                     {% set ProductClass = CartItem.ProductClass %}
  49.                                                     {% set Product = ProductClass.Product %}
  50.                                                     {% if cnt % 2 == 0 %}
  51.                                                         <li class="item flexbox odd">
  52.                                                     {% elseif cnt % 2 == 1 %}
  53.                                                         <li class="item flexbox even">
  54.                                                     {% endif %}
  55.                                                             <a href="{{ url('product_detail', {'id': Product.id}) }}" title="{{ Product.name }}" class="product-image">
  56.                                                                 <img src="{{ asset(Product.MainListImage|no_image_product, 'save_image') }}" width="50" height="50" alt="{{ Product.name }}">
  57.                                                             </a>
  58.                                                             <div class="product-details">
  59.                                                                 <button href="{{ url('cart_handle_item', {'operation': 'remove', 'productClassId': ProductClass.id }) }}" {{ csrf_token_for_anchor() }} data-method="put" data-message="カートから商品を削除してもよろしいですか?" title="削除" class="item_remove btn-remove">削除</button>
  60.                                                                 <p class="product-name">
  61.                                                                     <a href="{{ url('product_detail', {'id': Product.id}) }}">{{ Product.name }}</a>
  62.                                                                     {% if ProductClass.ClassCategory1 and ProductClass.ClassCategory1.id %}
  63.                                                                         <p class="product-class">{{ ProductClass.ClassCategory1.ClassName }}:{{ ProductClass.ClassCategory1 }}</p>
  64.                                                                     {% endif %}
  65.                                                                     {% if ProductClass.ClassCategory2 and ProductClass.ClassCategory2.id %}
  66.                                                                         <p class="product-class">{{ ProductClass.ClassCategory2.ClassName }}:{{ ProductClass.ClassCategory2 }}</p>
  67.                                                                     {% endif %}
  68.                                                                 </p>
  69.                                                                 <a href="{{ url('cart') }}" title="商品変更" class="btn-edit">商品変更</a>
  70.                                                                 <strong>{{ CartItem.quantity|number_format }}</strong>
  71.                                                                 x
  72.                                                                 <span class="price">{{ CartItem.price|price }}</span>
  73.                                                             </div>
  74.                                                         </li>
  75.                                                     {% set cnt=cnt+1 %}
  76.                                                 {% endfor %}
  77.                                                 {% set total_price = total_price + Cart.total_price %}
  78.                                             {% endfor %}
  79.                                         </ol>
  80.                                         <div class="subtotal">
  81.                                             <span class="cart-sidebar-subtotal">
  82.                                                 <span class="label">小計:</span>
  83.                                                 <span class="price">{{ total_price|price }}</span>
  84.                                             </span>
  85.                                         </div>
  86.                                         <div class="actions">
  87.                                             <a href="{{ url('cart') }}" title="購入手続き" class="button">
  88.                                                 <span>
  89.                                                     <span>購入手続き</span>
  90.                                                 </span>
  91.                                             </a>
  92.                                         </div>
  93.                                     {% endif %}
  94.                                 </div>
  95.                             </div>
  96.                         </div>
  97.                         <ul class="toplinks links">
  98.                             <li class="first">
  99.                                 {#<a href="{{ url('contact') }}" title="お問い合わせ"><i class="ec-headerNav__itemIcon fas fa-comments fa-fw"></i><span>お問い合わせ</span></a>#}
  100.                                 <a href="{{ url('contact') }}" title="お問い合わせ"><i class="ec-headerNav__itemIcon fas fa-comments fa-fw"></i> <span>お問い合わせ</span></a>
  101.                             </li>
  102.                             <li>
  103.                                 {#<a href="{{ url('homepage') }}shop-list" title="【アネロス】取扱店"><i class="ec-headerNav__itemIcon fas fa-store fa-fw"></i><span>【アネロス】取扱店</span></a>#}
  104.                                 <a href="{{ url('homepage') }}shop-list" title="【アネロス】取扱店"><i class="ec-headerNav__itemIcon fas fa-store fa-fw"></i> <span>【アネロス】取扱店</span></a>
  105.                             </li>
  106.                             {% if is_granted('ROLE_USER') %}
  107.                             <li>
  108.                                 {#<a href="{{ url('mypage') }}" class="mypage-link"><i class="ec-headerNav__itemIcon fas fa-user fa-fw"></i>マイページ</a>#}
  109.                                 <a href="{{ url('mypage') }}" class="mypage-link" title="マイページ"><i class="ec-headerNav__itemIcon fas fa-user fa-fw"></i> <span>マイページ</span></a>
  110.                             </li>
  111.                             <li>
  112.                                 {# <a href="{{ url('logout') }}" data-clearurl="{{ url('cart_clear') }}" class="logout-link">ログアウト</a> #}
  113.                                 <a href="{{ url('logout') }}" data-clearurl="{{ url('cart_clear') }}" class="logout-link"><i class="ec-headerNav__itemIcon fas fa-right-from-bracket fa-fw"></i> <span>ログアウト</span></a>
  114.                             </li>
  115.                             {% else %}
  116.                             <li class="login-container">
  117.                                 {# <a href="{{ url('mypage_login') }}" class="login-link">ログイン</a> #}
  118.                                 <a href="{{ url('mypage_login') }}" title="ログイン"><i class="ec-headerNav__itemIcon fas fa-user fa-fw"></i> <span>ログイン</span></a>
  119.                             </li>
  120.                             {% endif %}
  121.                         </ul>
  122.                     </div>
  123.                     
  124.                     {#% if not is_granted('ROLE_USER') %#}
  125.                         <div id="top-links-signin-container" style="display: none;">
  126.                             <i class="fa fa-caret-up"></i>
  127.                             <span id="top-links-close-button" class="close"><i class="fa fa-close"></i></span>
  128.                             <div id="top-links-signin-button">
  129.                                 <a href="{{ url('mypage_login') }}" class="top-signin-button">ログイン</a>
  130.                             </div>
  131.                             <div id="top-links-signin-footer">
  132.                                 ANEROS JAPAN会員登録がお得!<br />
  133.                                 <a href="{{ url('entry') }}">新規会員登録はこちら</a>
  134.                             </div>
  135.                         </div>
  136.                     {#% endif %#}
  137.                     
  138.                 </div>
  139.             </div>
  140.             
  141.             
  142.             <div class="main">
  143.                 <div class="container main_area">
  144.                     <a class="logo" href="{{ url('homepage') }}">
  145.                         <img src="{{ asset('aneros/img/header/logo.png') }}" alt="アネロス ロゴ" class="header-logo">
  146.                     </a>
  147.                     <div class="right" id="main_menu_outher">
  148.                         <a href="#!" id="toggle-nav"><i class="fa fa-reorder"></i></a>
  149.                         <div id="nav-area">
  150.                             <nav id="main_menu">
  151.                                 <ul class="menu">
  152.                                     <li class="has-submenu" id="menu-learn" data-submenu="submenu-learning-center">
  153.                                         <a href="#!" class='show-submenu'>知識<i class="fa fa-chevron-down"></i></a>
  154.                                         <div class="submenu-contr" id="submenu-learning-center">
  155.                                             <div class="container">
  156.                                                 <i class="fa fa-caret-up"></i>
  157.                                                 <ul class="submenu">
  158.                                                     <li>
  159.                                                         <a href="{{ url('homepage') }}learning-center">
  160.                                                             <img src="{{ asset('aneros/img/header/learn/menu-learning-center.png') }}" alt="アネロス講座ヘッダー">
  161.                                                             <h3>アネロス講座</h3>
  162.                                                         </a>
  163.                                                     </li>
  164.                                                     <li>
  165.                                                         <a href="/blog/">
  166.                                                             <img src="{{ asset('aneros/img/header/learn/menu-experiences.png') }}" alt="ブログヘッダー">
  167.                                                             <h3>公式ブログ</h3>
  168.                                                         </a>
  169.                                                     </li>
  170.                                                     <li>
  171.                                                         <a href="/forums/">
  172.                                                             <img src="{{ asset('aneros/img/header/learn/menu-forum.png') }}" alt="フォーラムヘッダー">
  173.                                                             <h3>フォーラム</h3>
  174.                                                         </a>
  175.                                                     </li>
  176.                                                     <li>
  177.                                                         <a href="/blog/category/users-voice/">
  178.                                                             <img src="{{ asset('aneros/img/header/learn/menu-chat.png') }}" alt="ユーザーズボイスヘッダー">
  179.                                                             <h3>ユーザーズボイス</h3>
  180.                                                         </a>
  181.                                                         <span id="cur-online-users"></span>
  182.                                                     </li>
  183.                                                     <li>
  184.                                                         <a href="{{ url('homepage') }}dr-voice">
  185.                                                             <img src="{{ asset('aneros/img/header/learn/menu-dr-voice.png') }}" alt="ドクターズボイスヘッダー">
  186.                                                             <h3>ドクターズボイス</h3>
  187.                                                         </a>
  188.                                                     </li>
  189.                                                 </ul>
  190.                                             </div>
  191.                                         </div>
  192.                                     </li>
  193.                                     <li class="has-submenu" id="menu-products" data-submenu="submenu-products">
  194.                                         <a href="#!" class='show-submenu'>【アネロス】モデル<i class="fa fa-chevron-down"></i></a>
  195.                                         <div class="submenu-contr" id="submenu-products">
  196.                                             <div class="container">
  197.                                                 <i class="fa fa-caret-up"></i>
  198.                                                 <ul class="submenu" id="menu-aneros-products">
  199.                                                     <li>
  200.                                                         <a href="{{ url('homepage') }}products/detail/93">
  201.                                                             <img src="{{ asset('aneros/img/header/products/eupho_syn_v.png') }}" alt="ユーホーシンV"
  202.                                                                 title="ユーホーシンV">
  203.                                                             <h3>
  204.                                                                 ユーホーシンV<br />
  205.                                                                 <span class="p_new">New!</span>
  206.                                                             </h3>
  207.                                                         </a>
  208.                                                     </li>
  209.                                                     <li>
  210.                                                         <a href="{{ url('homepage') }}products/detail/92">
  211.                                                             <img src="{{ asset('aneros/img/header/products/psy.png') }}" alt="PSY"
  212.                                                                 title="PSY">
  213.                                                             <h3>
  214.                                                                 サイ<br />
  215.                                                             </h3>
  216.                                                         </a>
  217.                                                     </li>
  218.                                                     <li>
  219.                                                         <a href="{{ url('homepage') }}products/detail/82">
  220.                                                             <img src="{{ asset('aneros/img/header/products/helix_syn_v.png') }}" alt="ヒリックスシンV"
  221.                                                                 title="ヒリックスシンV">
  222.                                                             <h3>
  223.                                                                 ヒリックスシンV
  224.                                                             </h3>
  225.                                                         </a>
  226.                                                     </li>
  227.                                                     <li>
  228.                                                         <a href="{{ url('homepage') }}products/detail/73">
  229.                                                             <img src="{{ asset('aneros/img/header/products/mgx_trident_syn.png') }}" alt="MGXシントライデント"
  230.                                                                 title="MGXシントライデント">
  231.                                                             <h3>
  232.                                                                 MGXシントライデント
  233.                                                             </h3>
  234.                                                         </a>
  235.                                                     </li>
  236.                                                     <li>
  237.                                                         <a href="{{ url('homepage') }}products/detail/74">
  238.                                                             <img src="{{ asset('aneros/img/header/products/eupho_trident_syn.png') }}" alt="ユーホーシントライデント"
  239.                                                                 title="ユーホーシントライデント">
  240.                                                             <h3>
  241.                                                                 ユーホーシントライデント
  242.                                                             </h3>
  243.                                                         </a>
  244.                                                     </li>
  245.                                                     <li>
  246.                                                         <a href="{{ url('homepage') }}products/detail/70">
  247.                                                             <img src="{{ asset('aneros/img/header/products/helix_trident_syn.png') }}" alt="ヒリックスシントライデント"
  248.                                                                 title="ヒリックスシントライデント">
  249.                                                             <h3>
  250.                                                                 ヒリックスシントライデント
  251.                                                             </h3>
  252.                                                         </a>
  253.                                                     </li>
  254.                                                     <li>
  255.                                                         <a href="{{ url('homepage') }}products/detail/66">
  256.                                                             <img src="{{ asset('aneros/img/header/products/Helix-LightGrey-Flat.png') }}" alt="ヒリックストライデント"
  257.                                                                 title="ヒリックストライデント">
  258.                                                             <h3>
  259.                                                                 ヒリックストライデント
  260.                                                             </h3>
  261.                                                         </a>
  262.                                                     </li>
  263.                                                     <li>
  264.                                                         <a href="{{ url('homepage') }}products/detail/68">
  265.                                                             <img src="{{ asset('aneros/img/header/products/Eupho-LightGrey-Flat.png') }}" alt="ユーホートライデント"
  266.                                                                 title="ユーホートライデント">
  267.                                                             <h3>
  268.                                                                 ユーホートライデント
  269.                                                             </h3>
  270.                                                         </a>
  271.                                                     </li>
  272.                                                     <li>
  273.                                                         <a href="{{ url('homepage') }}products/detail/69">
  274.                                                             <img src="{{ asset('aneros/img/header/products/MGX-LightGrey-Flat.png') }}" alt="MGXトライデント" title="MGXトライデント">
  275.                                                             <h3>
  276.                                                                 MGXトライデント
  277.                                                             </h3>
  278.                                                         </a>
  279.                                                     </li>
  280.                                                     <li>
  281.                                                         <a href="{{ url('homepage') }}products/detail/67">
  282.                                                             <img src="{{ asset('aneros/img/header/products/Maximus-LightGrey-Flat.png') }}" alt="マキシマストライデント"
  283.                                                                 title="マキシマストライデント">
  284.                                                             <h3>
  285.                                                                 マキシマストライデント
  286.                                                             </h3>
  287.                                                         </a>
  288.                                                     </li>
  289.                                                     <li>
  290.                                                         <a href="{{ url('homepage') }}products/detail/72">
  291.                                                             <img src="{{ asset('aneros/img/header/products/vice2.png') }}" alt="ヴァイス 2" title="ヴァイス 2">
  292.                                                             <h3>
  293.                                                                 ヴァイス 2
  294.                                                             </h3>
  295.                                                         </a>
  296.                                                     </li>
  297.                                                     <li>
  298.                                                         <a href="{{ url('homepage') }}sessions">
  299.                                                             <img src="{{ asset('aneros/img/header/products/sessions-lube.png') }}" alt="セッションズ" title="セッションズ">
  300.                                                             <h3>セッションズローション</h3>
  301.                                                         </a>
  302.                                                     </li>
  303.                                                     <li>
  304.                                                         <a href="{{ url('homepage') }}products/detail/81">
  305.                                                             <img src="{{ asset('aneros/img/header/products/progasm.png') }}" alt="プロガスム" title="プロガスム">
  306.                                                             <h3>
  307.                                                                 プロガスムブラックアイス
  308.                                                             </h3>
  309.                                                         </a>
  310.                                                     </li>
  311.                                                     <li>
  312.                                                         <a href="{{ url('homepage') }}products/detail/45">
  313.                                                             <img src="{{ asset('aneros/img/header/products/tempo.png') }}" alt="テンポ" title="テンポ">
  314.                                                             <h3>テンポ</h3>
  315.                                                         </a>
  316.                                                     </li>
  317.                                                 </ul>
  318.                                             </div>
  319.                                             <div class="site-guarantee-infos">
  320.                                                 <img src="{{ asset('aneros/img/header/fast-shipping.png') }}" alt="早く届く!" title="早く届く!" style="max-width: 236px">
  321.                                                 <img src="{{ asset('aneros/img/header/secure-cc-processing.png') }}" alt="安全なお買い物" title="安全なお買い物" style="max-width: 197px">
  322.                                                 <img src="{{ asset('aneros/img/header/money-back-guarantee.png') }}" alt="返金保証" title="返金保証" style="max-width: 286px">
  323.                                             </div>
  324.                                         </div>
  325.                                     </li>
  326.                                     <li class="has-submenu" id="menu-shop" data-submenu="submenu-shop">
  327.                                         <a href="#!" class='show-submenu'>カテゴリ<i class="fa fa-chevron-down"></i></a>
  328.                                         <div class="submenu-contr" id="submenu-shop">
  329.                                             <div class="container">
  330.                                                 <i class="fa fa-caret-up"></i>
  331.                                                 <div class="first-time-user">
  332.                                                     <a href="{{ url('homepage') }}products/detail/73">商品詳細</a>
  333.                                                 </div>
  334.                                                 <ul class="submenu" id="menu-categories">
  335.                                                     <li class="level0 nav-1 first">
  336.                                                         <a href="{{ url('homepage') }}prostate-massagers" class="level0 "><img
  337.                                                                 alt="前立腺マッサージ器"
  338.                                                                 src="{{ asset('aneros/img/header/category/menu-icon-prostate-massagers_2.png') }}">
  339.                                                             <h3 class="light">前立腺マッサージ器</h3>
  340.                                                         </a>
  341.                                                     </li>
  342.                                                     <li class="level0 nav-2">
  343.                                                         <a href="{{ url('homepage') }}accessories" class="level0 "><img
  344.                                                                 alt="アクセサリー"
  345.                                                                 src="{{ asset('aneros/img/header/category/menu-icon-aneros-accessories_1.png') }}">
  346.                                                             <h3 class="light">アクセサリー</h3>
  347.                                                         </a>
  348.                                                     </li>
  349.                                                     <li class="level0 nav-3">
  350.                                                         <a href="{{ url('homepage') }}sex-toys-for-men" class="level0 "><img
  351.                                                                 alt="男性用商品"
  352.                                                                 src="{{ asset('aneros/img/header/category/menu-icon-mens_2.png') }}">
  353.                                                             <h3 class="light">男性用商品</h3>
  354.                                                         </a>
  355.                                                     </li>
  356.                                                     <li class="level0 nav-4">
  357.                                                         <a href="{{ url('homepage') }}sex-toys-for-women" class="level0 "><img
  358.                                                                 alt="女性用商品"
  359.                                                                 src="{{ asset('aneros/img/header/category/menu-icon-women_1.png') }}">
  360.                                                             <h3 class="light">女性用商品</h3>
  361.                                                         </a>
  362.                                                     </li>
  363.                                                     <li class="level0 nav-5">
  364.                                                         <a href="{{ url('homepage') }}sex-toys-for-couples" class="level0 "><img
  365.                                                                 alt="カップル用商品"
  366.                                                                 src="{{ asset('aneros/img/header/category/menu-icon-couple_2.png') }}">
  367.                                                             <h3 class="light">カップル用商品</h3>
  368.                                                         </a>
  369.                                                     </li>
  370.                                                     <li class="level0 nav-6">
  371.                                                         <a href="{{ url('homepage') }}lubricants" class="level0 "><img
  372.                                                                 alt="ローション"
  373.                                                                 src="{{ asset('aneros/img/header/category/menu-icon-lubricants_2.png') }}">
  374.                                                             <h3 class="light">ローション</h3>
  375.                                                         </a>
  376.                                                     </li>
  377.                                                     <li class="level0 nav-7">
  378.                                                         <a href="{{ url('homepage') }}masturbators" class="level0 "><img
  379.                                                                 alt="マスターベーション"
  380.                                                                 src="{{ asset('aneros/img/header/category/menu-icon-masturbator_1.png') }}">
  381.                                                             <h3 class="light">マスターベーション</h3>
  382.                                                         </a>
  383.                                                     </li>
  384.                                                     <li class="level0 nav-8 last">
  385.                                                         <a href="{{ url('homepage') }}special-offers" class="level0 "><img
  386.                                                                 alt="お買い得セット"
  387.                                                                 src="{{ asset('aneros/img/header/category/menu-icon-special-offers_2.png') }}">
  388.                                                             <h3 class="light">お買い得セット</h3>
  389.                                                         </a>
  390.                                                     </li>
  391.                                                 </ul>
  392.                                             </div>
  393.                                             <div class="site-guarantee-infos">
  394.                                                 <img src="{{ asset('aneros/img/header/fast-shipping.png') }}" alt="早く届く!" title="早く届く!" style="max-width: 236px">
  395.                                                 <img src="{{ asset('aneros/img/header/secure-cc-processing.png') }}" alt="安全なお買い物" title="安全なお買い物" style="max-width: 197px">
  396.                                                 <img src="{{ asset('aneros/img/header/money-back-guarantee.png') }}" alt="返金保証" title="返金保証" style="max-width: 286px">
  397.                                             </div>
  398.                                         </div>
  399.                                     </li>
  400.                                 </ul>
  401.                             </nav>
  402.                             <div class="search_area">
  403.                                 <div class="search_box">
  404.                                     <label for="search" style="display: none">商品検索:</label>
  405.                                     <form method="get" class="searchform" action="{{ path('product_list') }}">
  406.                                         <input type="search" id="name" name="name" maxlength="50" placeholder="商品名"
  407.                                         class="form-control input-text required-entry">
  408.                                     </form>
  409.                                 </div>
  410.                                 <div class="button_box">
  411.                                     <a href="#!" class="close_search_box"><i class="fa fa-close"></i></a>
  412.                                     <a href="#!" class="show_search_box"><i class="fa fa-search"></i></a>
  413.                                 </div>
  414.                             </div>
  415.                         </div>
  416.                     </div>
  417.                 </div>
  418.             </div>
  419. {# ==== Header A/B Test: Coupon (A) vs Campaign Link Banner (B) ==== #}
  420. {% set EXP_NAME = 'header_vday_coupon_vs_sale_v1' %}
  421. {% set CAMPAIGN_ID = '2026-2-vday-header' %}
  422. {% set CAMPAIGN_URL = url('homepage') ~ '2026-vday-sale' %}
  423. {% set current_route = app.request.attributes.get('_route')|default('') %}
  424. <style>
  425.   .bf-header-banner {
  426.     width: 100%;
  427.     background: #111;
  428.     color: #fff;
  429.     font-weight: 600;
  430.     font-size: 14px;
  431.     line-height: 1;
  432.     z-index: 5000;
  433.   }
  434.   .bf-header-banner-inner {
  435.     width: 100%;
  436.   }
  437.   /* Variant B: sale-link layout */
  438.   .bf-header-banner .bf-cta-repeat {
  439.     display: flex;
  440.     align-items: center;
  441.     justify-content: center;
  442.     gap: 75px;
  443.     padding: 10px 12px;
  444.     white-space: nowrap;
  445.     overflow: hidden;
  446.   }
  447.   .bf-header-banner .bf-cta {
  448.     text-decoration: none;
  449.     color: inherit;
  450.   }
  451.   .bf-header-banner .bf-cta:hover { opacity: 0.85; }
  452.   .bf-header-banner .bf-cta-repeat:hover .bf-cta {
  453.     text-decoration: underline;
  454.   }
  455.   @media (max-width: 480px) {
  456.     .bf-header-banner .bf-cta-repeat .bf-cta:not(:first-child) { display: none; }
  457.     .bf-header-banner .bf-cta-repeat { gap: 0; }
  458.   }
  459.   /* Variant A: coupon banner styling */
  460.   .bf-header-banner .coupon-row {
  461.     display: flex;
  462.     align-items: center;
  463.     justify-content: center;
  464.     padding: 10px 12px;
  465.   }
  466.   .bf-header-banner p.coupon-code {
  467.     margin: 0;
  468.     font-size: 14px;
  469.     color: #fff;
  470.     font-weight: 600;
  471.   }
  472.   .bf-header-banner .coupon-label {
  473.     margin-right: 4px;
  474.   }
  475.   .bf-header-banner .coupon-copy-btn {
  476.     display: inline-flex;
  477.     align-items: center;
  478.     gap: 4px;
  479.     border: none;
  480.     background: transparent;
  481.     color: #fff;
  482.     font-weight: 700;
  483.     cursor: pointer;
  484.     padding: 0;
  485.     font-size: 14px;
  486.   }
  487.   .bf-header-banner .coupon-copy-btn i {
  488.     font-size: 90%;
  489.   }
  490.   .bf-header-banner .coupon-copy-btn:hover {
  491.     color: #ccc;
  492.   }
  493.   .bf-header-banner .coupon-copy-btn-wrapper {
  494.     position: relative;
  495.     display: inline-flex;
  496.     align-items: center;
  497.   }
  498.   .bf-header-banner .tooltiptext {
  499.     visibility: hidden;
  500.     width: 90px;
  501.     background-color: gray;
  502.     color: #fff;
  503.     text-align: center;
  504.     border-radius: 6px;
  505.     border: 1px solid #000;
  506.     padding: 5px 0;
  507.     position: absolute;
  508.     z-index: 1;
  509.     top: 115%;
  510.     left: 50%;
  511.     margin-left: -45px;
  512.     font-size: 10px;
  513.     opacity: 0;
  514.     transition: opacity 0.3s;
  515.   }
  516.   .bf-header-banner .tooltiptext::after {
  517.     content: "";
  518.     position: absolute;
  519.     bottom: 100%;
  520.     left: 50%;
  521.     margin-left: -5px;
  522.     border-width: 5px;
  523.     border-style: solid;
  524.     border-color: transparent transparent gray transparent;
  525.   }
  526.   .bf-header-banner .coupon-copy-btn-wrapper:hover .tooltiptext {
  527.     visibility: visible;
  528.     opacity: 1;
  529.   }
  530.   /* Default: JS decides which variant block to show */
  531.   .bf-header-banner .vday-banner {
  532.     display: none;
  533.   }
  534. </style>
  535. <div id="vday-header-banner"
  536.      class="bf-header-banner"
  537.      style="display:none"
  538.      aria-hidden="true"
  539.      role="region"
  540.      aria-label="バレンタインセール告知">
  541.   <div class="bf-header-banner-inner">
  542.     {# Variant A: Coupon banner #}
  543.     <div class="vday-banner vday-banner--coupon">
  544.       <div class="coupon-row">
  545.         <p class="coupon-code">
  546.           <span class="coupon-label">14%OFF会員限定クーポンコード:</span>
  547.           <span class="coupon-copy-btn-wrapper">
  548.             <button type="button"
  549.                     class="coupon-copy-btn"
  550.                     aria-label="クーポンコード vday2026 をコピー">
  551.               <span class="coupon-code-text">vday2026</span>
  552.               <i class="fa fa-copy" aria-hidden="true"></i>
  553.             </button>
  554.             <span class="tooltiptext" aria-live="polite">コピー</span>
  555.           </span>
  556.         </p>
  557.       </div>
  558.     </div>
  559.     {# Variant B: Sale link banner #}
  560.     <div class="vday-banner vday-banner--sale">
  561.       <div class="bf-cta-repeat">
  562.         <a class="bf-cta" href="{{ CAMPAIGN_URL }}">会員専用バレンタインセール開催中|会場はこちら</a>
  563.         <a class="bf-cta" href="{{ CAMPAIGN_URL }}" aria-hidden="true" tabindex="-1">会員専用バレンタインセール開催中|会場はこちら</a>
  564.         <a class="bf-cta" href="{{ CAMPAIGN_URL }}" aria-hidden="true" tabindex="-1">会員専用バレンタインセール開催中|会場はこちら</a>
  565.         <a class="bf-cta" href="{{ CAMPAIGN_URL }}" aria-hidden="true" tabindex="-1">会員専用バレンタインセール開催中|会場はこちら</a>
  566.         <a class="bf-cta" href="{{ CAMPAIGN_URL }}" aria-hidden="true" tabindex="-1">会員専用バレンタインセール開催中|会場はこちら</a>
  567.         <a class="bf-cta" href="{{ CAMPAIGN_URL }}" aria-hidden="true" tabindex="-1">会員専用バレンタインセール開催中|会場はこちら</a>
  568.       </div>
  569.     </div>
  570.   </div>
  571. </div>
  572. <script>
  573. (function() {
  574.   if (window.__vdayHeaderAbInit) return;
  575.   window.__vdayHeaderAbInit = true;
  576.   var EXP = {{ EXP_NAME|json_encode|raw }};
  577.   var CAMPAIGN_ID = {{ CAMPAIGN_ID|json_encode|raw }};
  578.   var CAMPAIGN_URL = {{ CAMPAIGN_URL|json_encode|raw }};
  579.   var ROUTE = {{ current_route|json_encode|raw }};
  580.   // Per-variant suppression route lists
  581.   var SUPPRESS_A = [
  582.     'shopping_login',
  583.     'shopping_nonmember',
  584.     'shopping_shipping',
  585.     'shopping_complete',
  586.     'shopping_shipping_edit',
  587.     'shopping_error',
  588.     'shopping_redirect_to',
  589.     'shopping_confirm',
  590.     'amazon_pay_shopping_confirm'
  591.   ];
  592.   var SUPPRESS_B = [
  593.     'cart',
  594.     'shopping',
  595.     'shopping_shipping',
  596.     'shopping_complete',
  597.     'shopping_login',
  598.     'shopping_nonmember',
  599.     'shopping_shipping_edit',
  600.     'shopping_error',
  601.     'shopping_redirect_to',
  602.     'shopping_confirm',
  603.     'amazon_pay_shopping',
  604.     'amazon_pay_shopping_confirm',
  605.     'plugin_coupon_shopping'
  606.   ];
  607.   function isSuppressed(route, variant) {
  608.     if (variant === 'A') {
  609.       return SUPPRESS_A.indexOf(route) !== -1;
  610.     } else if (variant === 'B') {
  611.       return SUPPRESS_B.indexOf(route) !== -1;
  612.     }
  613.     return false;
  614.   }
  615.   // --- Cookie helpers ---
  616.   function getCookie(n) {
  617.     var m = document.cookie.split('; ').find(function(r){ return r.indexOf(n + '=') === 0; });
  618.     return m ? m.split('=')[1] : undefined;
  619.   }
  620.   function setCookie(n, v, days) {
  621.     var d = new Date();
  622.     d.setTime(d.getTime() + days * 24 * 60 * 60 * 1000);
  623.     document.cookie = n + '=' + v + '; path=/; expires=' + d.toUTCString();
  624.   }
  625.   // Assign / read variant
  626.   var COOKIE = 'ab_' + EXP;
  627.   var variant = getCookie(COOKIE);
  628.   if (variant !== 'A' && variant !== 'B') {
  629.     variant = (Math.random() < 0.5) ? 'A' : 'B';
  630.     setCookie(COOKIE, variant, 60);
  631.   }
  632.   var SUPPRESSED = isSuppressed(ROUTE, variant);
  633.   window.dataLayer = window.dataLayer || [];
  634.   // If suppressed for this variant+route, log and bail
  635.   if (SUPPRESSED) {
  636.     window.dataLayer.push({
  637.       event: 'header_ab_suppressed',
  638.       experiment_name: EXP,
  639.       variant: variant,
  640.       campaign_id: CAMPAIGN_ID,
  641.       position: 'header',
  642.       route: ROUTE
  643.     });
  644.     return;
  645.   }
  646.   // Avoid duplicate views per session
  647.   var VIEW_KEY = EXP + ':' + CAMPAIGN_ID + ':viewed';
  648.   if (!sessionStorage.getItem(VIEW_KEY)) {
  649.     window.dataLayer.push({
  650.       event: 'header_ab_view',
  651.       experiment_name: EXP,
  652.       variant: variant,
  653.       campaign_id: CAMPAIGN_ID,
  654.       position: 'header'
  655.     });
  656.     sessionStorage.setItem(VIEW_KEY, '1');
  657.   }
  658.   var banner = document.getElementById('vday-header-banner');
  659.   if (!banner) return;
  660.   var couponBlock = banner.querySelector('.vday-banner--coupon');
  661.   var saleBlock   = banner.querySelector('.vday-banner--sale');
  662.   banner.style.display = 'block';
  663.   banner.removeAttribute('aria-hidden');
  664.   if (variant === 'A') {
  665.     if (couponBlock) couponBlock.style.display = 'block';
  666.     if (saleBlock)   saleBlock.style.display   = 'none';
  667.     var btn = banner.querySelector('.coupon-copy-btn');
  668.     var tooltip = banner.querySelector('.tooltiptext');
  669.     var code = 'vday2026';
  670.     if (btn) {
  671.       btn.addEventListener('click', function(e) {
  672.         e.preventDefault();
  673.         if (navigator.clipboard && navigator.clipboard.writeText) {
  674.           navigator.clipboard.writeText(code).catch(function(){});
  675.         } else {
  676.           var input = document.createElement('input');
  677.           input.value = code;
  678.           document.body.appendChild(input);
  679.           input.select();
  680.           try { document.execCommand('copy'); } catch (err) {}
  681.           document.body.removeChild(input);
  682.         }
  683.         if (tooltip) {
  684.           tooltip.textContent = 'コピーしました';
  685.           setTimeout(function() { tooltip.textContent = 'コピー'; }, 2000);
  686.         }
  687.         window.dataLayer.push({
  688.           event: 'header_ab_click',
  689.           experiment_name: EXP,
  690.           variant: variant,
  691.           campaign_id: CAMPAIGN_ID,
  692.           position: 'header',
  693.           click_type: 'coupon_copy',
  694.           coupon_code: code
  695.         });
  696.       }, { passive: false });
  697.     }
  698.   } else {
  699.     if (couponBlock) couponBlock.style.display = 'none';
  700.     if (saleBlock)   saleBlock.style.display   = 'block';
  701.     var links = banner.querySelectorAll('a.bf-cta');
  702.     links.forEach(function(a) {
  703.       a.addEventListener('click', function(e) {
  704.         window.dataLayer.push({
  705.           event: 'header_ab_click',
  706.           experiment_name: EXP,
  707.           variant: variant,
  708.           campaign_id: CAMPAIGN_ID,
  709.           position: 'header',
  710.           click_type: 'sale_link',
  711.           link_url: a.href
  712.         });
  713.         if (e.metaKey || e.ctrlKey || e.shiftKey || e.button === 1) {
  714.           return;
  715.         }
  716.         e.preventDefault();
  717.         setTimeout(function() { location.href = a.href; }, 120);
  718.       }, { passive: false });
  719.     });
  720.   }
  721. })();
  722. </script>
  723. {# ==== End Vday Header A/B Test ==== #}
  724.         {# カウントダウンタイマー設定開始 #}
  725.             <div id="sale-timer">
  726.                 <p>
  727.                     セール終了までの残り時間: <span id="count-down"></span>
  728.                 </p>
  729.                 <script>
  730.                     // Set the date we're counting down to
  731.                     var countDownDate = new Date("Feb 19, 2026 18:00:00").getTime();
  732.                         // Update the count down every 1 second
  733.                         var x = setInterval(function() {
  734.                         // Get today's date and time
  735.                         var now = new Date().getTime();
  736.                     
  737.                         // Find the distance between now and the count down date
  738.                         var distance = countDownDate - now;
  739.                     
  740.                         // Time calculations for hours, minutes and seconds
  741.                         var days = Math.floor(distance / (1000 * 60 * 60 * 24));
  742.                         var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
  743.                         var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
  744.                         var seconds = Math.floor((distance % (1000 * 60)) / 1000);
  745.                     
  746.                         // Display the result in the element with id="count-down"
  747.                         document.getElementById("count-down").innerHTML = days + "日 " + hours + "時間 "
  748.                         + minutes + "分 " + seconds + "秒 ";
  749.                     
  750.                         // If the count down is finished, write some text
  751.                         if (distance < 0) {
  752.                             clearInterval(x);
  753.                             document.getElementById("count-down").innerHTML = "大盛況にて終了致しました。誠にありがとうございました。";
  754.                         }
  755.                     }, 1000);
  756.                 </script>
  757.                 <style>
  758.                     #sale-timer {text-align:center;}
  759.                     #sale-timer p {margin: 0; padding:10px 0; font-size:16px; color:white; font-weight:bold;}
  760.                     #sale-timer p span {color:red;}
  761.                     @media only screen and (max-width: 767px){
  762.                         #sale-timer p {font-size:14px;}
  763.                     }
  764.                 </style>
  765.             </div>
  766.         {# カウントダウンタイマー設定終了 #}
  767.         
  768.         </div>
  769.     </header>