var/cache/dev/twig/0c/0c91838fd92f0e51e646b3eb4c1ad605.php line 35

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* __string_template__a8622c249d6509d1e837099f3f6022f6 */
  14. class __TwigTemplate_9f0421b3b6a4d25f9f254fa965a0da52 extends \Eccube\Twig\Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->parent false;
  23.         $this->blocks = [
  24.         ];
  25.         $this->sandbox $this->env->getExtension('\Twig\Extension\SandboxExtension');
  26.         $this->checkSecurity();
  27.     }
  28.     protected function doDisplay(array $context, array $blocks = [])
  29.     {
  30.         $macros $this->macros;
  31.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  32.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""__string_template__a8622c249d6509d1e837099f3f6022f6"));
  33.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  34.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""__string_template__a8622c249d6509d1e837099f3f6022f6"));
  35.         // line 7
  36.         echo "<div class=\"ec-headerTopBar\">
  37.     <div class=\"ec-headerTopBar__inner\">
  38.         <div class=\"ec-headerTopBar__left\">
  39.             <button type=\"button\" class=\"ec-headerTopBar__messagePrev\" aria-label=\"";
  40.         // line 10
  41.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("前のメッセージ"), "html"nulltrue);
  42.         echo "\"><</button>
  43.             <div class=\"ec-headerTopBar__message\" data-current=\"1\">
  44.                 <span class=\"ec-headerTopBar__messageItem ec-headerTopBar__messageItem--1\"><i class=\"fas fa-truck\"></i> 33,000 円(税込)以上のご注文で送料無料(国内配送・一部地域を除く)</span>
  45.                 <span class=\"ec-headerTopBar__messageItem ec-headerTopBar__messageItem--2\">Complimentary domestic shipping on orders over ¥33,000.*</span>
  46.             </div>
  47.             <button type=\"button\" class=\"ec-headerTopBar__messageNext\" aria-label=\"";
  48.         // line 15
  49.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("次のメッセージ"), "html"nulltrue);
  50.         echo "\">></button>
  51.         </div>
  52.     </div>
  53. </div>
  54. ";
  55.         // line 20
  56.         echo "<div class=\"ec-headerSearchWrap is-pc\" style=\"display:none;\">
  57.     ";
  58.         // line 21
  59.         echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("block_search_product"));
  60.         echo "
  61. </div>
  62. ";
  63.         // line 24
  64.         echo "<div class=\"ec-headerMain\">
  65.     <div class=\"ec-headerMain__inner\">
  66.         <div class=\"ec-headerMain__left\">
  67.             <a href=\"#\" class=\"ec-headerMain__searchToggle ec-headerTopBar__searchToggle\" aria-label=\"";
  68.         // line 27
  69.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("検索"), "html"nulltrue);
  70.         echo "\"><i class=\"fas fa-search\"></i></a>
  71.         </div>
  72.         <div class=\"ec-headerMain__centerLogo\">
  73.             ";
  74.         // line 30
  75.         echo $this->extensions['Eccube\Twig\Extension\IgnoreTwigSandboxErrorExtension']->twig_include($this->env$context"Block/logo.twig");
  76.         echo "
  77.         </div>
  78.         <div class=\"ec-headerMain__right\">
  79.             <div class=\"ec-headerMain__account\">";
  80.         // line 33
  81.         if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_USER")) {
  82.             echo "<a href=\"";
  83.             echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("mypage");
  84.             echo "\" aria-label=\"";
  85.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("マイページ"), "html"nulltrue);
  86.             echo "\"><i class=\"fas fa-user\"></i></a>";
  87.         } else {
  88.             echo "<a href=\"";
  89.             echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("mypage_login");
  90.             echo "\" aria-label=\"";
  91.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ログイン"), "html"nulltrue);
  92.             echo "\"><i class=\"fas fa-user\"></i></a>";
  93.         }
  94.         echo "</div>
  95.             <div class=\"ec-headerMain__favorite\"><a href=\"";
  96.         // line 34
  97.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("mypage_favorite");
  98.         echo "\" aria-label=\"";
  99.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お気に入り"), "html"nulltrue);
  100.         echo "\"><i class=\"far fa-heart\"></i></a></div>
  101.             <div class=\"ec-headerRole__cart\">
  102.                 ";
  103.         // line 46
  104.         $context["Carts"] = $this->extensions['Eccube\Twig\Extension\CartServiceExtension']->get_all_carts();
  105.         // line 47
  106.         $context["totalPrice"] = $this->extensions['Eccube\Twig\Extension\CartServiceExtension']->get_carts_total_price();
  107.         // line 48
  108.         $context["totalQuantity"] = $this->extensions['Eccube\Twig\Extension\CartServiceExtension']->get_carts_total_quantity();
  109.         // line 49
  110.         echo "<div class=\"ec-cartNaviWrap\">
  111.     <div class=\"ec-cartNavi\">
  112.         <div class=\"ec-cartNavi__div\">
  113.             <img src=\"";
  114.         // line 52
  115.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/icon/icon_cart.svg"), "html"nulltrue);
  116.         echo "\" alt=\"\">
  117.             <br>
  118.             <span class=\"ec-cartNavi__badge\">";
  119.         // line 54
  120.         echo twig_escape_filter($this->envtwig_number_format_filter($this->env$this->sandbox->ensureToStringAllowed((isset($context["totalQuantity"]) || array_key_exists("totalQuantity"$context) ? $context["totalQuantity"] : (function () { throw new RuntimeError('Variable "totalQuantity" does not exist.'54$this->source); })()), 54$this->source)), "html"nulltrue);
  121.         echo "</span>
  122.         </div>
  123.         <div class=\"ec-cartNavi__label\">
  124.             <div class=\"ec-cartNavi__price\">TOTAL<br>";
  125.         // line 57
  126.         echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed((isset($context["totalPrice"]) || array_key_exists("totalPrice"$context) ? $context["totalPrice"] : (function () { throw new RuntimeError('Variable "totalPrice" does not exist.'57$this->source); })()), 57$this->source)), "html"nulltrue);
  127.         echo "</div>
  128.         </div>
  129.     </div>
  130.     ";
  131.         // line 60
  132.         if (((isset($context["totalQuantity"]) || array_key_exists("totalQuantity"$context) ? $context["totalQuantity"] : (function () { throw new RuntimeError('Variable "totalQuantity" does not exist.'60$this->source); })()) > 0)) {
  133.             // line 61
  134.             echo "        <div class=\"ec-cartNaviIsset\">
  135.             ";
  136.             // line 62
  137.             $context['_parent'] = $context;
  138.             $context['_seq'] = twig_ensure_traversable((isset($context["Carts"]) || array_key_exists("Carts"$context) ? $context["Carts"] : (function () { throw new RuntimeError('Variable "Carts" does not exist.'62$this->source); })()));
  139.             foreach ($context['_seq'] as $context["_key"] => $context["Cart"]) {
  140.                 // line 63
  141.                 echo "                ";
  142.                 $context['_parent'] = $context;
  143.                 $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source$context["Cart"], "CartItems", [], "any"falsefalsetrue63));
  144.                 foreach ($context['_seq'] as $context["_key"] => $context["CartItem"]) {
  145.                     // line 64
  146.                     echo "                    ";
  147.                     $context["ProductClass"] = twig_get_attribute($this->env$this->source$context["CartItem"], "ProductClass", [], "any"falsefalsetrue64);
  148.                     // line 65
  149.                     echo "                    ";
  150.                     $context["Product"] = twig_get_attribute($this->env$this->source, (isset($context["ProductClass"]) || array_key_exists("ProductClass"$context) ? $context["ProductClass"] : (function () { throw new RuntimeError('Variable "ProductClass" does not exist.'65$this->source); })()), "Product", [], "any"falsefalsetrue65);
  151.                     // line 66
  152.                     echo "                    <div class=\"ec-cartNaviIsset__cart\">
  153.                         <div class=\"ec-cartNaviIsset__cartImage\">
  154.                             <img src=\"";
  155.                     // line 68
  156.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->extensions['Eccube\Twig\Extension\EccubeExtension']->getNoImageProduct($this->extensions['Plugin\ApgProductClassImage42\Twig\Extension\PluginExtension']->getClassImage($this->sandbox->ensureToStringAllowed((isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'68$this->source); })()), 68$this->source), $this->sandbox->ensureToStringAllowed((isset($context["ProductClass"]) || array_key_exists("ProductClass"$context) ? $context["ProductClass"] : (function () { throw new RuntimeError('Variable "ProductClass" does not exist.'68$this->source); })()), 68$this->source))), "save_image"), "html"nulltrue);
  157.                     echo "\" alt=\"";
  158.                     echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'68$this->source); })()), "name", [], "any"falsefalsetrue68), 68$this->source), "html"nulltrue);
  159.                     echo "\"/>
  160.                         </div>
  161.                         <div class=\"ec-cartNaviIsset__cartContent\">
  162.                             <div class=\"ec-cartNaviIsset__cartContentTitle\">";
  163.                     // line 71
  164.                     echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'71$this->source); })()), "name", [], "any"falsefalsetrue71), 71$this->source), "html"nulltrue);
  165.                     echo "
  166.                                 <div class=\"ec-font-size-1\">
  167.                                     ";
  168.                     // line 73
  169.                     if ((twig_get_attribute($this->env$this->source, (isset($context["ProductClass"]) || array_key_exists("ProductClass"$context) ? $context["ProductClass"] : (function () { throw new RuntimeError('Variable "ProductClass" does not exist.'73$this->source); })()), "ClassCategory1", [], "any"falsefalsetrue73) && twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["ProductClass"]) || array_key_exists("ProductClass"$context) ? $context["ProductClass"] : (function () { throw new RuntimeError('Variable "ProductClass" does not exist.'73$this->source); })()), "ClassCategory1", [], "any"falsefalsetrue73), "id", [], "any"falsefalsetrue73))) {
  170.                         // line 74
  171.                         echo "                                        ";
  172.                         echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["ProductClass"]) || array_key_exists("ProductClass"$context) ? $context["ProductClass"] : (function () { throw new RuntimeError('Variable "ProductClass" does not exist.'74$this->source); })()), "ClassCategory1", [], "any"falsefalsetrue74), "ClassName", [], "any"falsefalsetrue74), "name", [], "any"falsefalsetrue74), 74$this->source), "html"nulltrue);
  173.                         echo ":";
  174.                         echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["ProductClass"]) || array_key_exists("ProductClass"$context) ? $context["ProductClass"] : (function () { throw new RuntimeError('Variable "ProductClass" does not exist.'74$this->source); })()), "ClassCategory1", [], "any"falsefalsetrue74), 74$this->source), "html"nulltrue);
  175.                         echo "
  176.                                     ";
  177.                     }
  178.                     // line 76
  179.                     echo "                                    ";
  180.                     if ((twig_get_attribute($this->env$this->source, (isset($context["ProductClass"]) || array_key_exists("ProductClass"$context) ? $context["ProductClass"] : (function () { throw new RuntimeError('Variable "ProductClass" does not exist.'76$this->source); })()), "ClassCategory2", [], "any"falsefalsetrue76) && twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["ProductClass"]) || array_key_exists("ProductClass"$context) ? $context["ProductClass"] : (function () { throw new RuntimeError('Variable "ProductClass" does not exist.'76$this->source); })()), "ClassCategory2", [], "any"falsefalsetrue76), "id", [], "any"falsefalsetrue76))) {
  181.                         // line 77
  182.                         echo "                                        <br>";
  183.                         echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["ProductClass"]) || array_key_exists("ProductClass"$context) ? $context["ProductClass"] : (function () { throw new RuntimeError('Variable "ProductClass" does not exist.'77$this->source); })()), "ClassCategory2", [], "any"falsefalsetrue77), "ClassName", [], "any"falsefalsetrue77), "name", [], "any"falsefalsetrue77), 77$this->source), "html"nulltrue);
  184.                         echo ":";
  185.                         echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["ProductClass"]) || array_key_exists("ProductClass"$context) ? $context["ProductClass"] : (function () { throw new RuntimeError('Variable "ProductClass" does not exist.'77$this->source); })()), "ClassCategory2", [], "any"falsefalsetrue77), 77$this->source), "html"nulltrue);
  186.                         echo "
  187.                                     ";
  188.                     }
  189.                     // line 79
  190.                     echo "                                </div>
  191.                             </div>
  192.                             <div class=\"ec-cartNaviIsset__cartContentPrice\">
  193.                                 ";
  194.                     // line 82
  195.                     echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["CartItem"], "price", [], "any"falsefalsetrue82), 82$this->source)), "html"nulltrue);
  196.                     echo "
  197.                                 <div class=\"ec-cartNaviIsset__cartContentTax\">";
  198.                     // line 83
  199.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html"nulltrue);
  200.                     echo "</div>
  201.                             </div>
  202.                             <div class=\"ec-cartNaviIsset__cartContentNumber\">";
  203.                     // line 85
  204.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("数量"), "html"nulltrue);
  205.                     echo " ";
  206.                     echo twig_escape_filter($this->envtwig_number_format_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["CartItem"], "quantity", [], "any"falsefalsetrue85), 85$this->source)), "html"nulltrue);
  207.                     echo "</div>
  208.                         </div>
  209.                     </div>
  210.                 ";
  211.                 }
  212.                 $_parent $context['_parent'];
  213.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['CartItem'], $context['_parent'], $context['loop']);
  214.                 $context array_intersect_key($context$_parent) + $_parent;
  215.                 // line 89
  216.                 echo "            ";
  217.             }
  218.             $_parent $context['_parent'];
  219.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Cart'], $context['_parent'], $context['loop']);
  220.             $context array_intersect_key($context$_parent) + $_parent;
  221.             // line 90
  222.             echo "            <div class=\"ec-cartNaviIsset__action\">
  223.                 <a class=\"ec-blockBtn--action\" href=\"";
  224.             // line 91
  225.             echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("cart");
  226.             echo "\">";
  227.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへ進む"), "html"nulltrue);
  228.             echo "</a>
  229.                 <a class=\"ec-blockBtn ec-cartNavi--cancel\">";
  230.             // line 92
  231.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("キャンセル"), "html"nulltrue);
  232.             echo "</a>
  233.             </div>
  234.         </div>
  235.     ";
  236.         } else {
  237.             // line 96
  238.             echo "        <div class=\"ec-cartNaviNull\">
  239.             <div class=\"ec-cartNaviNull__message\">
  240.                 <p>";
  241.             // line 98
  242.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("現在カート内に商品はございません。"), "html"nulltrue);
  243.             echo "</p>
  244.             </div>
  245.         </div>
  246.     ";
  247.         }
  248.         // line 102
  249.         echo "</div>
  250.             </div>
  251.         </div>
  252.         <div class=\"ec-headerRole__navSP is-sp\">
  253.             ";
  254.         // line 107
  255.         echo $this->extensions['Eccube\Twig\Extension\IgnoreTwigSandboxErrorExtension']->twig_include($this->env$context"Block/nav_sp.twig");
  256.         echo "
  257.         </div>
  258.     </div>
  259. </div>
  260. ";
  261.         // line 112
  262.         echo $this->extensions['Eccube\Twig\Extension\IgnoreTwigSandboxErrorExtension']->twig_include($this->env$context"Block/mega_menu_modal.twig");
  263.         echo "
  264. ";
  265.         // line 114
  266.         echo "<div class=\"ec-search is-sp\" id=\"ec-search-sp\" style=\"display:none;\">
  267.     ";
  268.         // line 115
  269.         echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("block_search_product", ["mode" => "keyword_only"]));
  270.         echo "
  271. </div>
  272. <script>
  273. (function() {
  274.     document.addEventListener('DOMContentLoaded', function() {
  275.         var t = document.querySelector('.ec-headerTopBar__searchToggle');
  276.         var w = document.querySelector('.ec-headerSearchWrap');
  277.         var spSearch = document.getElementById('ec-search-sp');
  278.         if (t) {
  279.             t.addEventListener('click', function(e) {
  280.                 e.preventDefault();
  281.                 if (w) w.style.display = w.style.display === 'none' ? 'block' : 'none';
  282.                 if (spSearch) spSearch.style.display = spSearch.style.display === 'none' ? 'block' : 'none';
  283.             });
  284.         }
  285.         (function messageSlider() {
  286.             var el = document.querySelector('.ec-headerTopBar__message');
  287.             var prev = document.querySelector('.ec-headerTopBar__messagePrev');
  288.             var next = document.querySelector('.ec-headerTopBar__messageNext');
  289.             if (!el || !prev || !next) return;
  290.             var current = 1;
  291.             var total = 2;
  292.             var intervalId = null;
  293.             var duration = 5000;
  294.             function show(n) {
  295.                 current = (n - 1 + total) % total + 1;
  296.                 el.setAttribute('data-current', String(current));
  297.             }
  298.             function goNext() {
  299.                 show(current === 1 ? 2 : 1);
  300.                 resetTimer();
  301.             }
  302.             function goPrev() {
  303.                 show(current === 2 ? 1 : 2);
  304.                 resetTimer();
  305.             }
  306.             function resetTimer() {
  307.                 if (intervalId) clearInterval(intervalId);
  308.                 intervalId = setInterval(goNext, duration);
  309.             }
  310.             prev.addEventListener('click', function(e) { e.preventDefault(); goPrev(); });
  311.             next.addEventListener('click', function(e) { e.preventDefault(); goNext(); });
  312.             intervalId = setInterval(goNext, duration);
  313.         })();
  314.         var modal = document.getElementById('mega-menu-modal');
  315.         var trigger = document.querySelector('.mega-menu__trigger[data-mega-open]');
  316.         var closers = document.querySelectorAll('[data-mega-close]');
  317.         if (trigger) {
  318.             trigger.addEventListener('click', function(e) {
  319.                 e.preventDefault();
  320.                 if (modal) {
  321.                     modal.classList.add('is-open');
  322.                     modal.setAttribute('aria-hidden', 'false');
  323.                     if (trigger.getAttribute('aria-expanded')) trigger.setAttribute('aria-expanded', 'true');
  324.                     document.body.style.overflow = 'hidden';
  325.                 }
  326.             });
  327.         }
  328.         if (modal) {
  329.             function closeMega() {
  330.                 modal.classList.remove('is-open');
  331.                 modal.setAttribute('aria-hidden', 'true');
  332.                 if (trigger && trigger.getAttribute('aria-expanded')) trigger.setAttribute('aria-expanded', 'false');
  333.                 document.body.style.overflow = '';
  334.             }
  335.             if (closers.length) {
  336.                 closers.forEach(function(el) {
  337.                     el.addEventListener('click', closeMega);
  338.                 });
  339.             }
  340.             modal.addEventListener('keydown', function(e) {
  341.                 if (e.key === 'Escape') closeMega();
  342.             });
  343.         }
  344.         (function navDropdowns() {
  345.             var items = document.querySelectorAll('.ec-headerNavMain__item--hasDropdown[data-nav-dropdown]');
  346.             var links = document.querySelectorAll('.ec-headerNavMain__link--dropdown');
  347.             function closeAll() {
  348.                 items.forEach(function(li) {
  349.                     li.classList.remove('is-open');
  350.                     var a = li.querySelector('.ec-headerNavMain__link--dropdown');
  351.                     if (a) a.setAttribute('aria-expanded', 'false');
  352.                 });
  353.             }
  354.             links.forEach(function(a) {
  355.                 a.addEventListener('click', function(e) {
  356.                     var li = a.closest('.ec-headerNavMain__item--hasDropdown');
  357.                     if (!li) return;
  358.                     var dropdown = li.querySelector('.ec-headerNavMain__dropdown');
  359.                     if (!dropdown) return;
  360.                     e.preventDefault();
  361.                     var isOpen = li.classList.contains('is-open');
  362.                     closeAll();
  363.                     if (!isOpen) {
  364.                         li.classList.add('is-open');
  365.                         a.setAttribute('aria-expanded', 'true');
  366.                     }
  367.                 });
  368.             });
  369.             document.addEventListener('click', function(e) {
  370.                 if (!e.target.closest('.ec-headerNavMain__item--hasDropdown')) closeAll();
  371.             });
  372.         })();
  373.     });
  374. })();
  375. </script>
  376. ";
  377.         
  378.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  379.         
  380.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  381.     }
  382.     public function getTemplateName()
  383.     {
  384.         return "__string_template__a8622c249d6509d1e837099f3f6022f6";
  385.     }
  386.     public function isTraitable()
  387.     {
  388.         return false;
  389.     }
  390.     public function getDebugInfo()
  391.     {
  392.         return array (  279 => 115,  276 => 114,  272 => 112,  265 => 107,  258 => 102,  251 => 98,  247 => 96,  240 => 92,  234 => 91,  231 => 90,  225 => 89,  213 => 85,  208 => 83,  204 => 82,  199 => 79,  191 => 77,  188 => 76,  180 => 74,  178 => 73,  173 => 71,  165 => 68,  161 => 66,  158 => 65,  155 => 64,  150 => 63,  146 => 62,  143 => 61,  141 => 60,  135 => 57,  129 => 54,  124 => 52,  119 => 49,  117 => 48,  115 => 47,  113 => 46,  106 => 34,  90 => 33,  84 => 30,  78 => 27,  73 => 24,  68 => 21,  65 => 20,  58 => 15,  50 => 10,  45 => 7,);
  393.     }
  394.     public function getSourceContext()
  395.     {
  396.         return new Source("{#
  397. temptu-style: two-row header
  398. Row 1 (black): fade message (送料無料) | search, cart
  399. Row 2 (white): logo | ITEMS, ABOUT, LINK, CONTACT | mypage, cart summary (点数 ¥0)
  400. #}
  401. {# Top bar (black) #}
  402. <div class=\"ec-headerTopBar\">
  403.     <div class=\"ec-headerTopBar__inner\">
  404.         <div class=\"ec-headerTopBar__left\">
  405.             <button type=\"button\" class=\"ec-headerTopBar__messagePrev\" aria-label=\"{{ '前のメッセージ'|trans }}\"><</button>
  406.             <div class=\"ec-headerTopBar__message\" data-current=\"1\">
  407.                 <span class=\"ec-headerTopBar__messageItem ec-headerTopBar__messageItem--1\"><i class=\"fas fa-truck\"></i> 33,000 円(税込)以上のご注文で送料無料(国内配送・一部地域を除く)</span>
  408.                 <span class=\"ec-headerTopBar__messageItem ec-headerTopBar__messageItem--2\">Complimentary domestic shipping on orders over ¥33,000.*</span>
  409.             </div>
  410.             <button type=\"button\" class=\"ec-headerTopBar__messageNext\" aria-label=\"{{ '次のメッセージ'|trans }}\">></button>
  411.         </div>
  412.     </div>
  413. </div>
  414. {# Search form (toggle from top bar) - hidden by default #}
  415. <div class=\"ec-headerSearchWrap is-pc\" style=\"display:none;\">
  416.     {{ render(path('block_search_product')) }}
  417. </div>
  418. {# Main header (white) #}
  419. <div class=\"ec-headerMain\">
  420.     <div class=\"ec-headerMain__inner\">
  421.         <div class=\"ec-headerMain__left\">
  422.             <a href=\"#\" class=\"ec-headerMain__searchToggle ec-headerTopBar__searchToggle\" aria-label=\"{{ '検索'|trans }}\"><i class=\"fas fa-search\"></i></a>
  423.         </div>
  424.         <div class=\"ec-headerMain__centerLogo\">
  425.             {{ include('Block/logo.twig') }}
  426.         </div>
  427.         <div class=\"ec-headerMain__right\">
  428.             <div class=\"ec-headerMain__account\">{% if is_granted('ROLE_USER') %}<a href=\"{{ url('mypage') }}\" aria-label=\"{{ 'マイページ'|trans }}\"><i class=\"fas fa-user\"></i></a>{% else %}<a href=\"{{ url('mypage_login') }}\" aria-label=\"{{ 'ログイン'|trans }}\"><i class=\"fas fa-user\"></i></a>{% endif %}</div>
  429.             <div class=\"ec-headerMain__favorite\"><a href=\"{{ url('mypage_favorite') }}\" aria-label=\"{{ 'お気に入り'|trans }}\"><i class=\"far fa-heart\"></i></a></div>
  430.             <div class=\"ec-headerRole__cart\">
  431.                 {#
  432. This file is part of EC-CUBE
  433. Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  434. http://www.ec-cube.co.jp/
  435. For the full copyright and license information, please view the LICENSE
  436. file that was distributed with this source code.
  437. #}
  438. {% set Carts = get_all_carts() %}
  439. {% set totalPrice = get_carts_total_price() %}
  440. {% set totalQuantity = get_carts_total_quantity() %}
  441. <div class=\"ec-cartNaviWrap\">
  442.     <div class=\"ec-cartNavi\">
  443.         <div class=\"ec-cartNavi__div\">
  444.             <img src=\"{{ asset('assets/icon/icon_cart.svg') }}\" alt=\"\">
  445.             <br>
  446.             <span class=\"ec-cartNavi__badge\">{{ totalQuantity|number_format }}</span>
  447.         </div>
  448.         <div class=\"ec-cartNavi__label\">
  449.             <div class=\"ec-cartNavi__price\">TOTAL<br>{{ totalPrice|price }}</div>
  450.         </div>
  451.     </div>
  452.     {% if totalQuantity > 0 %}
  453.         <div class=\"ec-cartNaviIsset\">
  454.             {% for Cart in Carts %}
  455.                 {% for CartItem in Cart.CartItems %}
  456.                     {% set ProductClass = CartItem.ProductClass %}
  457.                     {% set Product = ProductClass.Product %}
  458.                     <div class=\"ec-cartNaviIsset__cart\">
  459.                         <div class=\"ec-cartNaviIsset__cartImage\">
  460.                             <img src=\"{{ asset(class_image(Product, ProductClass)|no_image_product, 'save_image') }}\" alt=\"{{ Product.name }}\"/>
  461.                         </div>
  462.                         <div class=\"ec-cartNaviIsset__cartContent\">
  463.                             <div class=\"ec-cartNaviIsset__cartContentTitle\">{{ Product.name }}
  464.                                 <div class=\"ec-font-size-1\">
  465.                                     {% if ProductClass.ClassCategory1 and ProductClass.ClassCategory1.id %}
  466.                                         {{ ProductClass.ClassCategory1.ClassName.name }}:{{ ProductClass.ClassCategory1 }}
  467.                                     {% endif %}
  468.                                     {% if ProductClass.ClassCategory2 and ProductClass.ClassCategory2.id %}
  469.                                         <br>{{ ProductClass.ClassCategory2.ClassName.name }}:{{ ProductClass.ClassCategory2 }}
  470.                                     {% endif %}
  471.                                 </div>
  472.                             </div>
  473.                             <div class=\"ec-cartNaviIsset__cartContentPrice\">
  474.                                 {{ CartItem.price|price }}
  475.                                 <div class=\"ec-cartNaviIsset__cartContentTax\">{{ '税込'|trans }}</div>
  476.                             </div>
  477.                             <div class=\"ec-cartNaviIsset__cartContentNumber\">{{ '数量'|trans }} {{ CartItem.quantity|number_format }}</div>
  478.                         </div>
  479.                     </div>
  480.                 {% endfor %}
  481.             {% endfor %}
  482.             <div class=\"ec-cartNaviIsset__action\">
  483.                 <a class=\"ec-blockBtn--action\" href=\"{{ url('cart') }}\">{{ 'カートへ進む'|trans }}</a>
  484.                 <a class=\"ec-blockBtn ec-cartNavi--cancel\">{{ 'キャンセル'|trans }}</a>
  485.             </div>
  486.         </div>
  487.     {% else %}
  488.         <div class=\"ec-cartNaviNull\">
  489.             <div class=\"ec-cartNaviNull__message\">
  490.                 <p>{{ '現在カート内に商品はございません。'|trans }}</p>
  491.             </div>
  492.         </div>
  493.     {% endif %}
  494. </div>
  495.             </div>
  496.         </div>
  497.         <div class=\"ec-headerRole__navSP is-sp\">
  498.             {{ include('Block/nav_sp.twig') }}
  499.         </div>
  500.     </div>
  501. </div>
  502. {# モーダルは .ec-headerMain__center の外に配置(親の display:none の影響を受けない) #}
  503. {{ include('Block/mega_menu_modal.twig') }}
  504. {# Search form SP: キーワード検索のみ、アイコンタップで表示 #}
  505. <div class=\"ec-search is-sp\" id=\"ec-search-sp\" style=\"display:none;\">
  506.     {{ render(path('block_search_product', { mode: 'keyword_only' })) }}
  507. </div>
  508. <script>
  509. (function() {
  510.     document.addEventListener('DOMContentLoaded', function() {
  511.         var t = document.querySelector('.ec-headerTopBar__searchToggle');
  512.         var w = document.querySelector('.ec-headerSearchWrap');
  513.         var spSearch = document.getElementById('ec-search-sp');
  514.         if (t) {
  515.             t.addEventListener('click', function(e) {
  516.                 e.preventDefault();
  517.                 if (w) w.style.display = w.style.display === 'none' ? 'block' : 'none';
  518.                 if (spSearch) spSearch.style.display = spSearch.style.display === 'none' ? 'block' : 'none';
  519.             });
  520.         }
  521.         (function messageSlider() {
  522.             var el = document.querySelector('.ec-headerTopBar__message');
  523.             var prev = document.querySelector('.ec-headerTopBar__messagePrev');
  524.             var next = document.querySelector('.ec-headerTopBar__messageNext');
  525.             if (!el || !prev || !next) return;
  526.             var current = 1;
  527.             var total = 2;
  528.             var intervalId = null;
  529.             var duration = 5000;
  530.             function show(n) {
  531.                 current = (n - 1 + total) % total + 1;
  532.                 el.setAttribute('data-current', String(current));
  533.             }
  534.             function goNext() {
  535.                 show(current === 1 ? 2 : 1);
  536.                 resetTimer();
  537.             }
  538.             function goPrev() {
  539.                 show(current === 2 ? 1 : 2);
  540.                 resetTimer();
  541.             }
  542.             function resetTimer() {
  543.                 if (intervalId) clearInterval(intervalId);
  544.                 intervalId = setInterval(goNext, duration);
  545.             }
  546.             prev.addEventListener('click', function(e) { e.preventDefault(); goPrev(); });
  547.             next.addEventListener('click', function(e) { e.preventDefault(); goNext(); });
  548.             intervalId = setInterval(goNext, duration);
  549.         })();
  550.         var modal = document.getElementById('mega-menu-modal');
  551.         var trigger = document.querySelector('.mega-menu__trigger[data-mega-open]');
  552.         var closers = document.querySelectorAll('[data-mega-close]');
  553.         if (trigger) {
  554.             trigger.addEventListener('click', function(e) {
  555.                 e.preventDefault();
  556.                 if (modal) {
  557.                     modal.classList.add('is-open');
  558.                     modal.setAttribute('aria-hidden', 'false');
  559.                     if (trigger.getAttribute('aria-expanded')) trigger.setAttribute('aria-expanded', 'true');
  560.                     document.body.style.overflow = 'hidden';
  561.                 }
  562.             });
  563.         }
  564.         if (modal) {
  565.             function closeMega() {
  566.                 modal.classList.remove('is-open');
  567.                 modal.setAttribute('aria-hidden', 'true');
  568.                 if (trigger && trigger.getAttribute('aria-expanded')) trigger.setAttribute('aria-expanded', 'false');
  569.                 document.body.style.overflow = '';
  570.             }
  571.             if (closers.length) {
  572.                 closers.forEach(function(el) {
  573.                     el.addEventListener('click', closeMega);
  574.                 });
  575.             }
  576.             modal.addEventListener('keydown', function(e) {
  577.                 if (e.key === 'Escape') closeMega();
  578.             });
  579.         }
  580.         (function navDropdowns() {
  581.             var items = document.querySelectorAll('.ec-headerNavMain__item--hasDropdown[data-nav-dropdown]');
  582.             var links = document.querySelectorAll('.ec-headerNavMain__link--dropdown');
  583.             function closeAll() {
  584.                 items.forEach(function(li) {
  585.                     li.classList.remove('is-open');
  586.                     var a = li.querySelector('.ec-headerNavMain__link--dropdown');
  587.                     if (a) a.setAttribute('aria-expanded', 'false');
  588.                 });
  589.             }
  590.             links.forEach(function(a) {
  591.                 a.addEventListener('click', function(e) {
  592.                     var li = a.closest('.ec-headerNavMain__item--hasDropdown');
  593.                     if (!li) return;
  594.                     var dropdown = li.querySelector('.ec-headerNavMain__dropdown');
  595.                     if (!dropdown) return;
  596.                     e.preventDefault();
  597.                     var isOpen = li.classList.contains('is-open');
  598.                     closeAll();
  599.                     if (!isOpen) {
  600.                         li.classList.add('is-open');
  601.                         a.setAttribute('aria-expanded', 'true');
  602.                     }
  603.                 });
  604.             });
  605.             document.addEventListener('click', function(e) {
  606.                 if (!e.target.closest('.ec-headerNavMain__item--hasDropdown')) closeAll();
  607.             });
  608.         })();
  609.     });
  610. })();
  611. </script>
  612. ""__string_template__a8622c249d6509d1e837099f3f6022f6""");
  613.     }
  614.     
  615.     public function checkSecurity()
  616.     {
  617.         static $tags = array("if" => 33"set" => 46"for" => 62);
  618.         static $filters = array("escape" => 10"trans" => 10"number_format" => 54"price" => 57"no_image_product" => 68);
  619.         static $functions = array("render" => 21"path" => 21"include" => 30"is_granted" => 33"url" => 33"get_all_carts" => 46"get_carts_total_price" => 47"get_carts_total_quantity" => 48"asset" => 52"class_image" => 68);
  620.         try {
  621.             $this->sandbox->checkSecurity(
  622.                 ['if''set''for'],
  623.                 ['escape''trans''number_format''price''no_image_product'],
  624.                 ['render''path''include''is_granted''url''get_all_carts''get_carts_total_price''get_carts_total_quantity''asset''class_image']
  625.             );
  626.         } catch (SecurityError $e) {
  627.             $e->setSourceContext($this->source);
  628.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  629.                 $e->setTemplateLine($tags[$e->getTagName()]);
  630.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  631.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  632.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  633.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  634.             }
  635.             throw $e;
  636.         }
  637.     }
  638. }