var/cache/dev/twig/37/378598fa6a46409de5188e965432906b.php line 40

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__f87294302d7a8625262f6ddb5301e93f */
  14. class __TwigTemplate_0f124c5ac63d9e6ef5e0ce25693b409a 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->blocks = [
  23.             'stylesheet' => [$this'block_stylesheet'],
  24.             'javascript' => [$this'block_javascript'],
  25.             'main' => [$this'block_main'],
  26.         ];
  27.     }
  28.     protected function doGetParent(array $context)
  29.     {
  30.         // line 11
  31.         return "default_frame.twig";
  32.     }
  33.     protected function doDisplay(array $context, array $blocks = [])
  34.     {
  35.         $macros $this->macros;
  36.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  37.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""__string_template__f87294302d7a8625262f6ddb5301e93f"));
  38.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  39.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""__string_template__f87294302d7a8625262f6ddb5301e93f"));
  40.         // line 13
  41.         $context["body_class"] = "product_page";
  42.         // line 11
  43.         $this->parent $this->loadTemplate("default_frame.twig""__string_template__f87294302d7a8625262f6ddb5301e93f"11);
  44.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  45.         
  46.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  47.         
  48.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  49.     }
  50.     // line 15
  51.     public function block_stylesheet($context, array $blocks = [])
  52.     {
  53.         $macros $this->macros;
  54.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  55.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheet"));
  56.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  57.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheet"));
  58.         // line 16
  59.         echo "<link rel=\"stylesheet\" href=\"";
  60.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/css/products-detail.css"), "html"nulltrue);
  61.         echo "\" type=\"text/css\" media=\"all\" />
  62. ";
  63.         
  64.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  65.         
  66.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  67.     }
  68.     // line 19
  69.     public function block_javascript($context, array $blocks = [])
  70.     {
  71.         $macros $this->macros;
  72.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  73.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascript"));
  74.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  75.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascript"));
  76.         // line 20
  77.         echo "    <script>
  78.         eccube.classCategories = ";
  79.         // line 21
  80.         echo $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getClassCategoriesAsJson((isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'21$this->source); })()));
  81.         echo ";
  82.         // 規格2に選択肢を割り当てる。
  83.         function fnSetClassCategories(form, classcat_id2_selected) {
  84.             var \$form = \$(form);
  85.             var product_id = \$form.find('input[name=product_id]').val();
  86.             var \$sele1 = \$form.find('select[name=classcategory_id1]');
  87.             var \$sele2 = \$form.find('select[name=classcategory_id2]');
  88.             eccube.setClassCategories(\$form, product_id, \$sele1, \$sele2, classcat_id2_selected);
  89.         }
  90.         ";
  91.         // line 32
  92.         if (twig_get_attribute($this->env$this->source, ($context["form"] ?? null), "classcategory_id2", [], "any"truetruefalse32)) {
  93.             // line 33
  94.             echo "        fnSetClassCategories(
  95.             \$('#form1'), ";
  96.             // line 34
  97.             echo json_encode(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'34$this->source); })()), "classcategory_id2", [], "any"falsefalsefalse34), "vars", [], "any"falsefalsefalse34), "value", [], "any"falsefalsefalse34));
  98.             echo "
  99.         );
  100.         ";
  101.         } elseif (twig_get_attribute($this->env$this->source,         // line 36
  102. ($context["form"] ?? null), "classcategory_id1", [], "any"truetruefalse36)) {
  103.             // line 37
  104.             echo "        eccube.checkStock(\$('#form1'), ";
  105.             echo twig_escape_filter($this->envtwig_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.'37$this->source); })()), "id", [], "any"falsefalsefalse37), "html"nulltrue);
  106.             echo ", ";
  107.             echo json_encode(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'37$this->source); })()), "classcategory_id1", [], "any"falsefalsefalse37), "vars", [], "any"falsefalsefalse37), "value", [], "any"falsefalsefalse37));
  108.             echo ", null);
  109.         ";
  110.         }
  111.         // line 39
  112.         echo "    </script>
  113.     <script>
  114.         \$(function() {
  115.             // bfcache無効化
  116.             \$(window).bind('pageshow', function(event) {
  117.                 if (event.originalEvent.persisted) {
  118.                     location.reload(true);
  119.                 }
  120.             });
  121.             // Core Web Vital の Cumulative Layout Shift(CLS)対策のため
  122.             // img タグに width, height が付与されている.
  123.             // 630px 未満の画面サイズでは縦横比が壊れるための対策
  124.             // see https://github.com/EC-CUBE/ec-cube/pull/5023
  125.             \$('.ec-grid2__cell').hide();
  126.             var removeSize = function () {
  127.                 \$('.slide-item').height('');
  128.                 \$('.slide-item img')
  129.                     .removeAttr('width')
  130.                     .removeAttr('height')
  131.                     .removeAttr('style');
  132.             };
  133.             var slickInitial = function(slick) {
  134.                 \$('.ec-grid2__cell').fadeIn(1500);
  135.                 var baseHeight = \$(slick.target).height();
  136.                 var baseWidth = \$(slick.target).width();
  137.                 var rate = baseWidth / baseHeight;
  138.                 \$('.slide-item').height(baseHeight * rate); // 余白を削除する
  139.                 // transform を使用することでCLSの影響を受けないようにする
  140.                 \$('.slide-item img')
  141.                     .css(
  142.                         {
  143.                             'transform-origin': 'top left',
  144.                             'transform': 'scaleY(' + rate + ')',
  145.                             'transition': 'transform .1s'
  146.                         }
  147.                     );
  148.                 // 正しいサイズに近くなったら属性を解除する
  149.                 setTimeout(removeSize, 500);
  150.             };
  151.             \$('.item_visual').on('init', slickInitial);
  152.             // リサイズ時は CLS の影響を受けないため属性を解除する
  153.             \$(window).resize(removeSize);
  154.             \$('.item_visual').slick({
  155.                 dots: false,
  156.                 arrows: false,
  157.             });
  158.             
  159.             let slide_len = \$('.item_thumbs > div').length;
  160.             \$('.item_thumbs').slick({
  161.                 slidesToShow: 3,
  162.                 slidesToScroll: 1,
  163.                 asNavFor: '.item_visual',
  164.                 dots: false,
  165.                 arrows: true,
  166.                 prevArrow: '<div class=\"slide-arrow prev-arrow\"><img src=\"";
  167.         // line 95
  168.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/common/slider_ico_arrow_prev.svg"), "html"nulltrue);
  169.         echo "\" alt=\"\"></div>',
  170.                 nextArrow: '<div class=\"slide-arrow next-arrow\"><img src=\"";
  171.         // line 96
  172.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/common/slider_ico_arrow_next.svg"), "html"nulltrue);
  173.         echo "\" alt=\"\"></div>',
  174.             });
  175.             if (slide_len <= 2) {
  176.                 \$('.item_thumbs .slick-track').css({
  177.                     marginLeft: '0'
  178.                 });
  179.             }
  180.             \$('.slideThumb').on('click', function() {
  181.                 var index = \$(this).attr('data-index');
  182.                 \$('.item_visual').slick('slickGoTo', index, false);
  183.             })
  184.         });
  185.     </script>
  186.     <script>
  187.         \$(function() {
  188.             \$('.add-cart').on('click', function(event) {
  189.                 ";
  190.         // line 113
  191.         if (twig_get_attribute($this->env$this->source, ($context["form"] ?? null), "classcategory_id1", [], "any"truetruefalse113)) {
  192.             // line 114
  193.             echo "                // 規格1フォームの必須チェック
  194.                 if (\$('#classcategory_id1').val() == '__unselected' || \$('#classcategory_id1').val() == '') {
  195.                     \$('#classcategory_id1')[0].setCustomValidity('";
  196.             // line 116
  197.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("項目が選択されていません"), "html"nulltrue);
  198.             echo "');
  199.                     return true;
  200.                 } else {
  201.                     \$('#classcategory_id1')[0].setCustomValidity('');
  202.                 }
  203.                 ";
  204.         }
  205.         // line 122
  206.         echo "
  207.                 ";
  208.         // line 123
  209.         if (twig_get_attribute($this->env$this->source, ($context["form"] ?? null), "classcategory_id2", [], "any"truetruefalse123)) {
  210.             // line 124
  211.             echo "                // 規格2フォームの必須チェック
  212.                 if (\$('#classcategory_id2').val() == '__unselected' || \$('#classcategory_id2').val() == '') {
  213.                     \$('#classcategory_id2')[0].setCustomValidity('";
  214.             // line 126
  215.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("項目が選択されていません"), "html"nulltrue);
  216.             echo "');
  217.                     return true;
  218.                 } else {
  219.                     \$('#classcategory_id2')[0].setCustomValidity('');
  220.                 }
  221.                 ";
  222.         }
  223.         // line 132
  224.         echo "
  225.                 // 個数フォームのチェック
  226.                 if (\$('#quantity').val() < 1) {
  227.                     \$('#quantity')[0].setCustomValidity('";
  228.         // line 135
  229.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("1以上で入力してください。"), "html"nulltrue);
  230.         echo "');
  231.                     return true;
  232.                 } else {
  233.                     \$('#quantity')[0].setCustomValidity('');
  234.                 }
  235.                 event.preventDefault();
  236.                 \$form = \$('#form1');
  237.                 \$.ajax({
  238.                     url: \$form.attr('action'),
  239.                     type: \$form.attr('method'),
  240.                     data: \$form.serialize(),
  241.                     dataType: 'json',
  242.                     beforeSend: function(xhr, settings) {
  243.                         // Buttonを無効にする
  244.                         \$('.add-cart').prop('disabled', true);
  245.                     }
  246.                 }).done(function(data) {
  247.                     // レスポンス内のメッセージをalertで表示
  248.                     \$.each(data.messages, function() {
  249.                         \$('#ec-modal-header').text(this);
  250.                     });
  251.                     \$('.ec-modal').show()
  252.                     // カートブロックを更新する
  253.                     \$.ajax({
  254.                         url: \"";
  255.         // line 162
  256.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("block_cart");
  257.         echo "\",
  258.                         type: 'GET',
  259.                         dataType: 'html'
  260.                     }).done(function(html) {
  261.                         \$('.ec-headerRole__cart').html(html);
  262.                     });
  263.                 }).fail(function(data) {
  264.                     alert('";
  265.         // line 169
  266.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへの追加に失敗しました。"), "html"nulltrue);
  267.         echo "');
  268.                 }).always(function(data) {
  269.                     // Buttonを有効にする
  270.                     \$('.add-cart').prop('disabled', false);
  271.                 });
  272.             });
  273.         });
  274.         \$('.ec-modal-wrap').on('click', function(e) {
  275.             // モーダル内の処理は外側にバブリングさせない
  276.             e.stopPropagation();
  277.         });
  278.         \$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
  279.             \$('.ec-modal').hide()
  280.         });
  281.     </script>
  282.     <script type=\"application/ld+json\">
  283.     {
  284.         \"@context\": \"https://schema.org/\",
  285.         \"@type\": \"Product\",
  286.         \"name\": \"";
  287.         // line 189
  288.         echo twig_escape_filter($this->envtwig_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.'189$this->source); })()), "name", [], "any"falsefalsefalse189), "html"nulltrue);
  289.         echo "\",
  290.         \"image\": [
  291.             ";
  292.         // line 191
  293.         $context['_parent'] = $context;
  294.         $context['_seq'] = twig_ensure_traversable(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.'191$this->source); })()), "ProductImage", [], "any"falsefalsefalse191));
  295.         $context['_iterated'] = false;
  296.         $context['loop'] = [
  297.           'parent' => $context['_parent'],
  298.           'index0' => 0,
  299.           'index'  => 1,
  300.           'first'  => true,
  301.         ];
  302.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  303.             $length count($context['_seq']);
  304.             $context['loop']['revindex0'] = $length 1;
  305.             $context['loop']['revindex'] = $length;
  306.             $context['loop']['length'] = $length;
  307.             $context['loop']['last'] = === $length;
  308.         }
  309.         foreach ($context['_seq'] as $context["_key"] => $context["img"]) {
  310.             // line 192
  311.             echo "                \"";
  312.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'192$this->source); })()), "request", [], "any"falsefalsefalse192), "schemeAndHttpHost", [], "any"falsefalsefalse192), "html"nulltrue);
  313.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($context["img"], "save_image"), "html"nulltrue);
  314.             echo "\"";
  315.             if ( !twig_get_attribute($this->env$this->source$context["loop"], "last", [], "any"falsefalsefalse192)) {
  316.                 echo ",";
  317.             }
  318.             // line 193
  319.             echo "
  320.             ";
  321.             $context['_iterated'] = true;
  322.             ++$context['loop']['index0'];
  323.             ++$context['loop']['index'];
  324.             $context['loop']['first'] = false;
  325.             if (isset($context['loop']['length'])) {
  326.                 --$context['loop']['revindex0'];
  327.                 --$context['loop']['revindex'];
  328.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  329.             }
  330.         }
  331.         if (!$context['_iterated']) {
  332.             // line 195
  333.             echo "                \"";
  334.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'195$this->source); })()), "request", [], "any"falsefalsefalse195), "schemeAndHttpHost", [], "any"falsefalsefalse195), "html"nulltrue);
  335.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->extensions['Eccube\Twig\Extension\EccubeExtension']->getNoImageProduct(""), "save_image"), "html"nulltrue);
  336.             echo "\"
  337.             ";
  338.         }
  339.         $_parent $context['_parent'];
  340.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['img'], $context['_parent'], $context['loop']);
  341.         $context array_intersect_key($context$_parent) + $_parent;
  342.         // line 197
  343.         echo "        ],
  344.         \"description\": \"";
  345.         // line 198
  346.         echo twig_escape_filter($this->envtwig_slice($this->envtwig_replace_filter(((twig_get_attribute($this->env$this->source, ($context["Product"] ?? null), "description_list", [], "any"truetruefalse198)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source, ($context["Product"] ?? null), "description_list", [], "any"falsefalsefalse198), 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.'198$this->source); })()), "description_detail", [], "any"falsefalsefalse198))) : (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.'198$this->source); })()), "description_detail", [], "any"falsefalsefalse198))), ["
  347. => """ " => ""]), 0300), "html"nulltrue);
  348.         echo "\",
  349.         ";
  350.         // line 199
  351.         if (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.'199$this->source); })()), "code_min", [], "any"falsefalsefalse199)) {
  352.             // line 200
  353.             echo "        \"sku\": \"";
  354.             echo twig_escape_filter($this->envtwig_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.'200$this->source); })()), "code_min", [], "any"falsefalsefalse200), "html"nulltrue);
  355.             echo "\",
  356.         ";
  357.         }
  358.         // line 202
  359.         echo "        \"offers\": {
  360.             \"@type\": \"Offer\",
  361.             \"url\": \"";
  362.         // line 204
  363.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_detail", ["id" => 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.'204$this->source); })()), "id", [], "any"falsefalsefalse204)]), "html"nulltrue);
  364.         echo "\",
  365.             \"priceCurrency\": \"";
  366.         // line 205
  367.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["eccube_config"]) || array_key_exists("eccube_config"$context) ? $context["eccube_config"] : (function () { throw new RuntimeError('Variable "eccube_config" does not exist.'205$this->source); })()), "currency", [], "any"falsefalsefalse205), "html"nulltrue);
  368.         echo "\",
  369.             \"price\": ";
  370.         // line 206
  371.         ((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.'206$this->source); })()), "getPrice02IncTaxMin", [], "any"falsefalsefalse206)) ? (print (twig_escape_filter($this->envtwig_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.'206$this->source); })()), "getPrice02IncTaxMin", [], "any"falsefalsefalse206), "html"nulltrue))) : (print (0)));
  372.         echo ",
  373.             \"availability\": \"";
  374.         // line 207
  375.         echo ((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.'207$this->source); })()), "stock_find", [], "any"falsefalsefalse207)) ? ("InStock") : ("OutOfStock"));
  376.         echo "\"
  377.         }
  378.     }
  379.     </script>
  380. ";
  381.         
  382.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  383.         
  384.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  385.     }
  386.     // line 213
  387.     public function block_main($context, array $blocks = [])
  388.     {
  389.         $macros $this->macros;
  390.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  391.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  392.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  393.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  394.         // line 214
  395.         echo "    <section id=\"main-visual\">
  396.         <div class=\"mainvisual\" style=\"background-image: url('";
  397.         // line 215
  398.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/common/mv_img_01.jpg"), "html"nulltrue);
  399.         echo "'); ?>)\"></div>
  400.     </section>
  401.     <section id=\"main-title\">
  402.         <h2 class=\"page-title\">";
  403.         // line 218
  404.         echo twig_escape_filter($this->envtwig_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.'218$this->source); })()), "name", [], "any"falsefalsefalse218), "html"nulltrue);
  405.         echo "</h2>
  406.         <div class=\"scroll\">
  407.             <a href=\"#topic-path\">
  408.                 <p>scroll</p>
  409.                 <img src=\"https://mx-build.jp/wp-content/themes/%E3%82%BF%E3%82%A4%E3%82%A8%E3%82%A4%E5%8C%97%E6%B5%B7%E9%81%93%E3%82%A8%E3%83%B3%E3%82%B7%E3%82%99%E3%83%8B%E3%82%A2%E3%82%A2%E3%83%AA%E3%83%B3%E3%82%AF%E3%82%99/img/scroll.png\" alt=\"scroll-arrow\">
  410.             </a>
  411.         </div>
  412.     </section>
  413. \t<section id=\"topic-path\">
  414. \t\t<div class=\"wrapper\">
  415. \t\t\t<div class=\"container\">
  416. \t\t\t\t<div class=\"page\">
  417. \t\t\t\t\t<a href=\"/\">
  418. \t\t\t\t\t\t<span class=\"home\">HOME</span>
  419. \t\t\t\t\t</a>
  420. \t\t\t\t\t<span>&gt;</span>
  421. \t\t\t\t\t<a href=\"";
  422.         // line 234
  423.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
  424.         echo "\">
  425. \t\t\t\t\t\t<span class=\"current\">商品一覧</span>
  426. \t\t\t\t\t</a>
  427. \t\t\t\t\t<span>&gt;</span>
  428. \t\t\t\t\t<span class=\"current\">";
  429.         // line 238
  430.         echo twig_escape_filter($this->envtwig_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.'238$this->source); })()), "name", [], "any"falsefalsefalse238), "html"nulltrue);
  431.         echo "</span>
  432. \t\t\t\t</div>
  433. \t\t\t</div>
  434. \t\t</div>
  435. \t</section>
  436. \t<!-- メニューバー -->
  437. \t";
  438.         // line 244
  439.         $context["Categories"] = twig_get_attribute($this->env$this->source$this->env->getFunction('repository')->getCallable()("Eccube\\Entity\\Category"), "getList", [], "method"falsefalsefalse244);
  440.         // line 245
  441.         echo "\t<section id=\"menu-bar\">
  442. \t\t<div class=\"wrapper\">
  443. \t\t\t<div class=\"container\">
  444. \t\t\t\t<nav>
  445. \t\t\t\t\t<ul class=\"menu-list\">
  446. \t\t\t\t\t\t";
  447.         // line 250
  448.         $context['_parent'] = $context;
  449.         $context['_seq'] = twig_ensure_traversable((isset($context["Categories"]) || array_key_exists("Categories"$context) ? $context["Categories"] : (function () { throw new RuntimeError('Variable "Categories" does not exist.'250$this->source); })()));
  450.         foreach ($context['_seq'] as $context["_key"] => $context["Category"]) {
  451.             // line 251
  452.             echo "\t\t\t\t\t\t\t<li class=\"menu\">
  453. \t\t\t\t\t\t\t\t<a href=\"/shop/products/list?category_id=";
  454.             // line 252
  455.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Category"], "id", [], "any"falsefalsefalse252), "html"nulltrue);
  456.             echo "\">";
  457.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Category"], "name", [], "any"falsefalsefalse252), "html"nulltrue);
  458.             echo "</a>
  459. \t\t\t\t\t\t\t</li>
  460. \t\t\t\t\t\t";
  461.         }
  462.         $_parent $context['_parent'];
  463.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Category'], $context['_parent'], $context['loop']);
  464.         $context array_intersect_key($context$_parent) + $_parent;
  465.         // line 255
  466.         echo "\t\t\t\t\t</ul>
  467. \t\t\t\t</nav>
  468. \t\t\t</div>
  469. \t\t</div>
  470. \t</section>
  471.     <div class=\"ec-productRole\">
  472.         <div class=\"ec-grid2\">
  473.             <div class=\"ec-grid2__cell\">
  474.                 <div class=\"ec-sliderItemRole\">
  475.                     <div class=\"item_visual\">
  476.                         ";
  477.         // line 265
  478.         $context['_parent'] = $context;
  479.         $context['_seq'] = twig_ensure_traversable(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.'265$this->source); })()), "ProductImage", [], "any"falsefalsefalse265));
  480.         $context['_iterated'] = false;
  481.         $context['loop'] = [
  482.           'parent' => $context['_parent'],
  483.           'index0' => 0,
  484.           'index'  => 1,
  485.           'first'  => true,
  486.         ];
  487.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  488.             $length count($context['_seq']);
  489.             $context['loop']['revindex0'] = $length 1;
  490.             $context['loop']['revindex'] = $length;
  491.             $context['loop']['length'] = $length;
  492.             $context['loop']['last'] = === $length;
  493.         }
  494.         foreach ($context['_seq'] as $context["_key"] => $context["ProductImage"]) {
  495.             // line 266
  496.             echo "                            <div class=\"slide-item\"><img src=\"";
  497.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($context["ProductImage"], "save_image"), "html"nulltrue);
  498.             echo "\" alt=\"";
  499.             ((twig_get_attribute($this->env$this->source$context["loop"], "first", [], "any"falsefalsefalse266)) ? (print (twig_escape_filter($this->envtwig_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.'266$this->source); })()), "name", [], "any"falsefalsefalse266), "html"nulltrue))) : (print ("")));
  500.             echo "\" width=\"550\" height=\"550\"";
  501.             if ((twig_get_attribute($this->env$this->source$context["loop"], "index", [], "any"falsefalsefalse266) > 1)) {
  502.                 echo " loading=\"lazy\"";
  503.             }
  504.             echo "></div>
  505.                         ";
  506.             $context['_iterated'] = true;
  507.             ++$context['loop']['index0'];
  508.             ++$context['loop']['index'];
  509.             $context['loop']['first'] = false;
  510.             if (isset($context['loop']['length'])) {
  511.                 --$context['loop']['revindex0'];
  512.                 --$context['loop']['revindex'];
  513.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  514.             }
  515.         }
  516.         if (!$context['_iterated']) {
  517.             // line 268
  518.             echo "                            <div class=\"slide-item\"><img src=\"";
  519.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->extensions['Eccube\Twig\Extension\EccubeExtension']->getNoImageProduct(""), "save_image"), "html"nulltrue);
  520.             echo "\" alt=\"";
  521.             ((twig_get_attribute($this->env$this->source$context["loop"], "first", [], "any"falsefalsefalse268)) ? (print (twig_escape_filter($this->envtwig_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.'268$this->source); })()), "name", [], "any"falsefalsefalse268), "html"nulltrue))) : (print ("")));
  522.             echo "\" width=\"550\" height=\"550\"></div>
  523.                         ";
  524.         }
  525.         $_parent $context['_parent'];
  526.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ProductImage'], $context['_parent'], $context['loop']);
  527.         $context array_intersect_key($context$_parent) + $_parent;
  528.         // line 270
  529.         echo "                    </div>
  530.                     <div class=\"item_thumbs\">
  531.                         ";
  532.         // line 272
  533.         $context['_parent'] = $context;
  534.         $context['_seq'] = twig_ensure_traversable(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.'272$this->source); })()), "ProductImage", [], "any"falsefalsefalse272));
  535.         $context['loop'] = [
  536.           'parent' => $context['_parent'],
  537.           'index0' => 0,
  538.           'index'  => 1,
  539.           'first'  => true,
  540.         ];
  541.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  542.             $length count($context['_seq']);
  543.             $context['loop']['revindex0'] = $length 1;
  544.             $context['loop']['revindex'] = $length;
  545.             $context['loop']['length'] = $length;
  546.             $context['loop']['last'] = === $length;
  547.         }
  548.         foreach ($context['_seq'] as $context["_key"] => $context["ProductImage"]) {
  549.             // line 273
  550.             echo "                            <div class=\"slideThumb\" data-index=\"";
  551.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["loop"], "index0", [], "any"falsefalsefalse273), "html"nulltrue);
  552.             echo "\"><img src=\"";
  553.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($context["ProductImage"], "save_image"), "html"nulltrue);
  554.             echo "\" alt=\"\" width=\"133\" height=\"133\" loading=\"lazy\"></div>
  555.                         ";
  556.             ++$context['loop']['index0'];
  557.             ++$context['loop']['index'];
  558.             $context['loop']['first'] = false;
  559.             if (isset($context['loop']['length'])) {
  560.                 --$context['loop']['revindex0'];
  561.                 --$context['loop']['revindex'];
  562.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  563.             }
  564.         }
  565.         $_parent $context['_parent'];
  566.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ProductImage'], $context['_parent'], $context['loop']);
  567.         $context array_intersect_key($context$_parent) + $_parent;
  568.         // line 275
  569.         echo "                    </div>
  570.                 </div>
  571.             </div>
  572.             <div class=\"ec-grid2__cell\">
  573.                 <div class=\"ec-productRole__profile\">
  574.                     ";
  575.         // line 281
  576.         echo "                    <div class=\"ec-productRole__title\">
  577.                         <h2 class=\"ec-headingTitle\">";
  578.         // line 282
  579.         echo twig_escape_filter($this->envtwig_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.'282$this->source); })()), "name", [], "any"falsefalsefalse282), "html"nulltrue);
  580.         echo "</h2>
  581.                     </div>
  582.                     ";
  583.         // line 284
  584.         if (false) {
  585.             // line 285
  586.             echo "                        ";
  587.             // line 286
  588.             echo "                        <ul class=\"ec-productRole__tags\">
  589.                             ";
  590.             // line 287
  591.             $context['_parent'] = $context;
  592.             $context['_seq'] = twig_ensure_traversable(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.'287$this->source); })()), "Tags", [], "any"falsefalsefalse287));
  593.             foreach ($context['_seq'] as $context["_key"] => $context["Tag"]) {
  594.                 // line 288
  595.                 echo "                                <li class=\"ec-productRole__tag tag_";
  596.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Tag"], "id", [], "any"falsefalsefalse288), "html"nulltrue);
  597.                 echo "\">";
  598.                 echo twig_escape_filter($this->env$context["Tag"], "html"nulltrue);
  599.                 echo "</li>
  600.                             ";
  601.             }
  602.             $_parent $context['_parent'];
  603.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Tag'], $context['_parent'], $context['loop']);
  604.             $context array_intersect_key($context$_parent) + $_parent;
  605.             // line 290
  606.             echo "                        </ul>
  607.                         ";
  608.             // line 292
  609.             echo "                        ";
  610.             if ( !twig_test_empty(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.'292$this->source); })()), "code_min", [], "any"falsefalsefalse292))) {
  611.                 // line 293
  612.                 echo "                            <div class=\"ec-productRole__code\">
  613.                                 ";
  614.                 // line 294
  615.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("商品コード"), "html"nulltrue);
  616.                 echo ": <span class=\"product-code-default\">";
  617.                 echo twig_escape_filter($this->envtwig_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.'294$this->source); })()), "code_min", [], "any"falsefalsefalse294), "html"nulltrue);
  618.                 if ((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.'294$this->source); })()), "code_min", [], "any"falsefalsefalse294) != 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.'294$this->source); })()), "code_max", [], "any"falsefalsefalse294))) {
  619.                     echo " ~ ";
  620.                     echo twig_escape_filter($this->envtwig_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.'294$this->source); })()), "code_max", [], "any"falsefalsefalse294), "html"nulltrue);
  621.                 }
  622.                 echo "</span>
  623.                             </div>
  624.                         ";
  625.             }
  626.             // line 297
  627.             echo "                        ";
  628.             // line 298
  629.             echo "                        ";
  630.             if ( !twig_test_empty(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.'298$this->source); })()), "ProductCategories", [], "any"falsefalsefalse298))) {
  631.                 // line 299
  632.                 echo "                            <div class=\"ec-productRole__category\">
  633.                                 <div>";
  634.                 // line 300
  635.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("関連カテゴリ"), "html"nulltrue);
  636.                 echo "</div>
  637.                                 ";
  638.                 // line 301
  639.                 $context['_parent'] = $context;
  640.                 $context['_seq'] = twig_ensure_traversable(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.'301$this->source); })()), "ProductCategories", [], "any"falsefalsefalse301));
  641.                 foreach ($context['_seq'] as $context["_key"] => $context["ProductCategory"]) {
  642.                     // line 302
  643.                     echo "                                    <ul>
  644.                                         <li>
  645.                                             ";
  646.                     // line 304
  647.                     $context['_parent'] = $context;
  648.                     $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["ProductCategory"], "Category", [], "any"falsefalsefalse304), "path", [], "any"falsefalsefalse304));
  649.                     $context['loop'] = [
  650.                       'parent' => $context['_parent'],
  651.                       'index0' => 0,
  652.                       'index'  => 1,
  653.                       'first'  => true,
  654.                     ];
  655.                     if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  656.                         $length count($context['_seq']);
  657.                         $context['loop']['revindex0'] = $length 1;
  658.                         $context['loop']['revindex'] = $length;
  659.                         $context['loop']['length'] = $length;
  660.                         $context['loop']['last'] = === $length;
  661.                     }
  662.                     foreach ($context['_seq'] as $context["_key"] => $context["Category"]) {
  663.                         // line 305
  664.                         echo "                                                <a href=\"";
  665.                         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
  666.                         echo "?category_id=";
  667.                         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Category"], "id", [], "any"falsefalsefalse305), "html"nulltrue);
  668.                         echo "\">";
  669.                         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Category"], "name", [], "any"falsefalsefalse305), "html"nulltrue);
  670.                         echo "</a>";
  671.                         if ((twig_get_attribute($this->env$this->source$context["loop"], "last", [], "any"falsefalsefalse305) == false)) {
  672.                             // line 306
  673.                             echo "                                                <span>></span>";
  674.                         }
  675.                         ++$context['loop']['index0'];
  676.                         ++$context['loop']['index'];
  677.                         $context['loop']['first'] = false;
  678.                         if (isset($context['loop']['length'])) {
  679.                             --$context['loop']['revindex0'];
  680.                             --$context['loop']['revindex'];
  681.                             $context['loop']['last'] = === $context['loop']['revindex0'];
  682.                         }
  683.                     }
  684.                     $_parent $context['_parent'];
  685.                     unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Category'], $context['_parent'], $context['loop']);
  686.                     $context array_intersect_key($context$_parent) + $_parent;
  687.                     // line 308
  688.                     echo "                                        </li>
  689.                                     </ul>
  690.                                 ";
  691.                 }
  692.                 $_parent $context['_parent'];
  693.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ProductCategory'], $context['_parent'], $context['loop']);
  694.                 $context array_intersect_key($context$_parent) + $_parent;
  695.                 // line 311
  696.                 echo "                            </div>
  697.                         ";
  698.             }
  699.             // line 313
  700.             echo "                    ";
  701.         }
  702.         // line 314
  703.         echo "                    <form action=\"";
  704.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_add_cart", ["id" => 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.'314$this->source); })()), "id", [], "any"falsefalsefalse314)]), "html"nulltrue);
  705.         echo "\" method=\"post\" id=\"form1\" name=\"form1\">
  706.                         ";
  707.         // line 315
  708.         if (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.'315$this->source); })()), "stock_find", [], "any"falsefalsefalse315)) {
  709.             // line 316
  710.             echo "                            <div class=\"ec-productRole__actions\">
  711.                                 ";
  712.             // line 317
  713.             if (twig_get_attribute($this->env$this->source, ($context["form"] ?? null), "classcategory_id1", [], "any"truetruefalse317)) {
  714.                 // line 318
  715.                 echo "                                    <div class=\"ec-select\">
  716.                                         ";
  717.                 // line 319
  718.                 echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'319$this->source); })()), "classcategory_id1", [], "any"falsefalsefalse319), 'row');
  719.                 echo "
  720.                                         ";
  721.                 // line 320
  722.                 echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'320$this->source); })()), "classcategory_id1", [], "any"falsefalsefalse320), 'errors');
  723.                 echo "
  724.                                     </div>
  725.                                     ";
  726.                 // line 322
  727.                 if (twig_get_attribute($this->env$this->source, ($context["form"] ?? null), "classcategory_id2", [], "any"truetruefalse322)) {
  728.                     // line 323
  729.                     echo "                                        <div class=\"ec-select\">
  730.                                             ";
  731.                     // line 324
  732.                     echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'324$this->source); })()), "classcategory_id2", [], "any"falsefalsefalse324), 'row');
  733.                     echo "
  734.                                             ";
  735.                     // line 325
  736.                     echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'325$this->source); })()), "classcategory_id2", [], "any"falsefalsefalse325), 'errors');
  737.                     echo "
  738.                                         </div>
  739.                                     ";
  740.                 }
  741.                 // line 328
  742.                 echo "                                ";
  743.             }
  744.             // line 329
  745.             echo "                                <div class=\"ec-productRole__description\">";
  746.             echo twig_nl2br(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.'329$this->source); })()), "description_detail", [], "any"falsefalsefalse329));
  747.             echo "</div>
  748.                                 ";
  749.             // line 330
  750.             if (false) {
  751.                 // line 331
  752.                 echo "                                ";
  753.                 // line 332
  754.                 echo "                                    ";
  755.                 if (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.'332$this->source); })()), "hasProductClass", [], "any"falsefalsefalse332)) {
  756.                     // line 333
  757.                     echo "<div class=\"ec-productRole__priceRegular\">
  758.                                             ";
  759.                     // line 334
  760.                     if (( !(null === 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.'334$this->source); })()), "getPrice01Min", [], "any"falsefalsefalse334)) && (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.'334$this->source); })()), "getPrice01IncTaxMin", [], "any"falsefalsefalse334) == 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.'334$this->source); })()), "getPrice01IncTaxMax", [], "any"falsefalsefalse334)))) {
  761.                         // line 335
  762.                         echo "                                                <span class=\"ec-productRole__priceRegularPrice\">";
  763.                         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("通常価格"), "html"nulltrue);
  764.                         echo ":<span class=\"price01-default\">";
  765.                         echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(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.'335$this->source); })()), "getPrice01IncTaxMin", [], "any"falsefalsefalse335)), "html"nulltrue);
  766.                         echo "</span></span>
  767.                                                 <span class=\"ec-productRole__priceRegularTax\">";
  768.                         // line 336
  769.                         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html"nulltrue);
  770.                         echo "</span>
  771.                                             ";
  772.                     } elseif (( !(null === twig_get_attribute($this->env$this->source,                     // line 337
  773. (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'337$this->source); })()), "getPrice01Min", [], "any"falsefalsefalse337)) &&  !(null === 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.'337$this->source); })()), "getPrice01Max", [], "any"falsefalsefalse337)))) {
  774.                         // line 338
  775.                         echo "                                                <span class=\"ec-productRole__priceRegularPrice\">";
  776.                         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("通常価格"), "html"nulltrue);
  777.                         echo ":<span class=\"price01-default\">";
  778.                         echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(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.'338$this->source); })()), "getPrice01IncTaxMin", [], "any"falsefalsefalse338)), "html"nulltrue);
  779.                         echo "~ ";
  780.                         echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(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.'338$this->source); })()), "getPrice01IncTaxMax", [], "any"falsefalsefalse338)), "html"nulltrue);
  781.                         echo "</span></span>
  782.                                                 <span class=\"ec-productRole__priceRegularTax\">";
  783.                         // line 339
  784.                         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html"nulltrue);
  785.                         echo "</span>
  786.                                             ";
  787.                     }
  788.                     // line 341
  789.                     echo "                                        </div>
  790.                                     ";
  791.                 } else {
  792.                     // line 343
  793.                     echo "                                        ";
  794.                     if ( !(null === 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.'343$this->source); })()), "getPrice01Max", [], "any"falsefalsefalse343))) {
  795.                         // line 344
  796.                         echo "                                            <span class=\"ec-productRole__priceRegularPrice\">";
  797.                         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("通常価格"), "html"nulltrue);
  798.                         echo ":";
  799.                         echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(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.'344$this->source); })()), "getPrice01IncTaxMin", [], "any"falsefalsefalse344)), "html"nulltrue);
  800.                         echo "</span>
  801.                                             <span class=\"ec-productRole__priceRegularTax\">";
  802.                         // line 345
  803.                         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html"nulltrue);
  804.                         echo "</span>
  805.                                         ";
  806.                     }
  807.                     // line 347
  808.                     echo "                                    ";
  809.                 }
  810.                 // line 348
  811.                 echo "                                ";
  812.             }
  813.             // line 349
  814.             echo "                                ";
  815.             // line 350
  816.             echo "                                <div class=\"ec-productRole__price\">
  817.                                     ";
  818.             // line 351
  819.             if (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.'351$this->source); })()), "hasProductClass", [], "any"falsefalsefalse351)) {
  820.                 // line 352
  821.                 if ((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.'352$this->source); })()), "getPrice02IncTaxMin", [], "any"falsefalsefalse352) == 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.'352$this->source); })()), "getPrice02IncTaxMax", [], "any"falsefalsefalse352))) {
  822.                     // line 353
  823.                     echo "                                            <div class=\"ec-price\">
  824.                                                 <span class=\"ec-price__price price02-default\">";
  825.                     // line 354
  826.                     echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(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.'354$this->source); })()), "getPrice02IncTaxMin", [], "any"falsefalsefalse354)), "html"nulltrue);
  827.                     echo "</span>
  828.                                                 <span class=\"ec-price__tax\">";
  829.                     // line 355
  830.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html"nulltrue);
  831.                     echo "</span>
  832.                                             </div>
  833.                                         ";
  834.                 } else {
  835.                     // line 358
  836.                     echo "                                            <div class=\"ec-price\">
  837.                                                 <span class=\"ec-price__price price02-default\">";
  838.                     // line 359
  839.                     echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(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.'359$this->source); })()), "getPrice02IncTaxMin", [], "any"falsefalsefalse359)), "html"nulltrue);
  840.                     echo " ~ ";
  841.                     echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(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.'359$this->source); })()), "getPrice02IncTaxMax", [], "any"falsefalsefalse359)), "html"nulltrue);
  842.                     echo "</span>
  843.                                                 <span class=\"ec-price__tax\">";
  844.                     // line 360
  845.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html"nulltrue);
  846.                     echo "</span>
  847.                                             </div>
  848.                                         ";
  849.                 }
  850.                 // line 363
  851.                 echo "                                    ";
  852.             } else {
  853.                 // line 364
  854.                 echo "                                        <div class=\"ec-price\">
  855.                                             <span class=\"ec-price__price\">";
  856.                 // line 365
  857.                 echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(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.'365$this->source); })()), "getPrice02IncTaxMin", [], "any"falsefalsefalse365)), "html"nulltrue);
  858.                 echo "</span>
  859.                                             <span class=\"ec-price__tax\">";
  860.                 // line 366
  861.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html"nulltrue);
  862.                 echo "</span>
  863.                                         </div>
  864.                                     ";
  865.             }
  866.             // line 369
  867.             echo "                                </div>
  868.                                 <div class=\"myTemplate-ec-numberInput\">
  869.                                     <span>";
  870.             // line 371
  871.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("数量"), "html"nulltrue);
  872.             echo "</span>
  873.                                     ";
  874.             // line 372
  875.             echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'372$this->source); })()), "quantity", [], "any"falsefalsefalse372), 'widget');
  876.             echo "
  877.                                     ";
  878.             // line 373
  879.             echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'373$this->source); })()), "quantity", [], "any"falsefalsefalse373), 'errors');
  880.             echo "
  881.                                 </div>
  882.                                 <div class=\"myTemplate-options\">
  883.                                     ";
  884.             // line 376
  885.             echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock((isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'376$this->source); })()), 'rest');
  886.             echo "
  887.                                 </div>
  888.                             </div>
  889.                             <div class=\"ec-productRole__btn\">
  890.                                 <button type=\"submit\" class=\"ec-blockBtn--action add-cart\">
  891.                                     ";
  892.             // line 381
  893.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ADD CART"), "html"nulltrue);
  894.             echo "
  895.                                 </button>
  896.                             </div>
  897.                         ";
  898.         } else {
  899.             // line 385
  900.             echo "                            <div class=\"ec-productRole__btn\">
  901.                                 <button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
  902.                                     ";
  903.             // line 387
  904.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ただいま品切れ中です。"), "html"nulltrue);
  905.             echo "
  906.                                 </button>
  907.                             </div>
  908.                         ";
  909.         }
  910.         // line 391
  911.         echo "                    </form>
  912.                     ";
  913.         // line 392
  914.         echo twig_include($this->env$context"Product/option_description.twig");
  915.         echo "<div class=\"ec-modal\">
  916.                         <div class=\"ec-modal-overlay\">
  917.                             <div class=\"ec-modal-wrap\">
  918.                                 <span class=\"ec-modal-close\"><span class=\"ec-icon\"><img src=\"";
  919.         // line 395
  920.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/icon/cross-dark.svg"), "html"nulltrue);
  921.         echo "\" alt=\"\"/></span></span>
  922.                                 <div id=\"ec-modal-header\" class=\"text-center\">";
  923.         // line 396
  924.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに追加しました。"), "html"nulltrue);
  925.         echo "</div>
  926.                                 <div class=\"ec-modal-box\">
  927.                                     <div class=\"ec-role\">
  928.                                         <span class=\"ec-inlineBtn--cancel\">";
  929.         // line 399
  930.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お買い物を続ける"), "html"nulltrue);
  931.         echo "</span>
  932.                                         <a href=\"";
  933.         // line 400
  934.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("cart");
  935.         echo "\" class=\"ec-inlineBtn--action\">";
  936.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへ進む"), "html"nulltrue);
  937.         echo "</a>
  938.                                     </div>
  939.                                 </div>
  940.                             </div>
  941.                         </div>
  942.                     </div>
  943.                     ";
  944.         // line 406
  945.         if (twig_get_attribute($this->env$this->source, (isset($context["BaseInfo"]) || array_key_exists("BaseInfo"$context) ? $context["BaseInfo"] : (function () { throw new RuntimeError('Variable "BaseInfo" does not exist.'406$this->source); })()), "option_favorite_product", [], "any"falsefalsefalse406)) {
  946.             // line 407
  947.             echo "                        <form action=\"";
  948.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_add_favorite", ["id" => 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.'407$this->source); })()), "id", [], "any"falsefalsefalse407)]), "html"nulltrue);
  949.             echo "\" method=\"post\">
  950.                             <div class=\"ec-productRole__btn\">
  951.                                 ";
  952.             // line 409
  953.             if (((isset($context["is_favorite"]) || array_key_exists("is_favorite"$context) ? $context["is_favorite"] : (function () { throw new RuntimeError('Variable "is_favorite" does not exist.'409$this->source); })()) == false)) {
  954.                 // line 410
  955.                 echo "                                    <button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel\">
  956.                                         ";
  957.                 // line 411
  958.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お気に入りに追加"), "html"nulltrue);
  959.                 echo "
  960.                                     </button>
  961.                                 ";
  962.             } else {
  963.                 // line 414
  964.                 echo "                                    <button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel\"
  965.                                             disabled=\"disabled\">";
  966.                 // line 415
  967.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お気に入りに追加済です。"), "html"nulltrue);
  968.                 echo "
  969.                                     </button>
  970.                                 ";
  971.             }
  972.             // line 418
  973.             echo "                            </div>
  974.                         </form>
  975.                     ";
  976.         }
  977.         // line 421
  978.         echo "                </div>
  979.             </div>
  980.         </div>
  981.         ";
  982.         // line 424
  983.         if (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.'424$this->source); })()), "freearea", [], "any"falsefalsefalse424)) {
  984.             // line 425
  985.             echo "             <div class=\"ec-productRole__description\">
  986.                  ";
  987.             // line 426
  988.             echo twig_include($this->env$contexttwig_template_from_string($this->envtwig_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.'426$this->source); })()), "freearea", [], "any"falsefalsefalse426)));
  989.             echo "
  990.             </div>
  991.         ";
  992.         }
  993.         // line 429
  994.         echo "    </div>
  995. ";
  996.         
  997.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  998.         
  999.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  1000.     }
  1001.     public function getTemplateName()
  1002.     {
  1003.         return "__string_template__f87294302d7a8625262f6ddb5301e93f";
  1004.     }
  1005.     public function isTraitable()
  1006.     {
  1007.         return false;
  1008.     }
  1009.     public function getDebugInfo()
  1010.     {
  1011.         return array (  1027 => 429,  1021 => 426,  1018 => 425,  1016 => 424,  1011 => 421,  1006 => 418,  1000 => 415,  997 => 414,  991 => 411,  988 => 410,  986 => 409,  980 => 407,  978 => 406,  967 => 400,  963 => 399,  957 => 396,  953 => 395,  947 => 392,  944 => 391,  937 => 387,  933 => 385,  926 => 381,  918 => 376,  912 => 373,  908 => 372,  904 => 371,  900 => 369,  894 => 366,  890 => 365,  887 => 364,  884 => 363,  878 => 360,  872 => 359,  869 => 358,  863 => 355,  859 => 354,  856 => 353,  854 => 352,  852 => 351,  849 => 350,  847 => 349,  844 => 348,  841 => 347,  836 => 345,  829 => 344,  826 => 343,  822 => 341,  817 => 339,  808 => 338,  806 => 337,  802 => 336,  795 => 335,  793 => 334,  790 => 333,  787 => 332,  785 => 331,  783 => 330,  778 => 329,  775 => 328,  769 => 325,  765 => 324,  762 => 323,  760 => 322,  755 => 320,  751 => 319,  748 => 318,  746 => 317,  743 => 316,  741 => 315,  736 => 314,  733 => 313,  729 => 311,  721 => 308,  706 => 306,  697 => 305,  680 => 304,  676 => 302,  672 => 301,  668 => 300,  665 => 299,  662 => 298,  660 => 297,  648 => 294,  645 => 293,  642 => 292,  639 => 290,  628 => 288,  624 => 287,  621 => 286,  619 => 285,  617 => 284,  612 => 282,  609 => 281,  602 => 275,  583 => 273,  566 => 272,  562 => 270,  551 => 268,  529 => 266,  511 => 265,  499 => 255,  488 => 252,  485 => 251,  481 => 250,  474 => 245,  472 => 244,  463 => 238,  456 => 234,  437 => 218,  431 => 215,  428 => 214,  418 => 213,  403 => 207,  399 => 206,  395 => 205,  391 => 204,  387 => 202,  381 => 200,  379 => 199,  374 => 198,  371 => 197,  361 => 195,  347 => 193,  339 => 192,  321 => 191,  316 => 189,  293 => 169,  283 => 162,  253 => 135,  248 => 132,  239 => 126,  235 => 124,  233 => 123,  230 => 122,  221 => 116,  217 => 114,  215 => 113,  195 => 96,  191 => 95,  133 => 39,  125 => 37,  123 => 36,  118 => 34,  115 => 33,  113 => 32,  99 => 21,  96 => 20,  86 => 19,  73 => 16,  63 => 15,  52 => 11,  50 => 13,  37 => 11,);
  1012.     }
  1013.     public function getSourceContext()
  1014.     {
  1015.         return new Source("{#
  1016. This file is part of EC-CUBE
  1017. Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  1018. http://www.ec-cube.co.jp/
  1019. For the full copyright and license information, please view the LICENSE
  1020. file that was distributed with this source code.
  1021. #}
  1022. {% extends 'default_frame.twig' %}
  1023. {% set body_class = 'product_page' %}
  1024. {% block stylesheet %}
  1025. <link rel=\"stylesheet\" href=\"{{ asset('assets/css/products-detail.css') }}\" type=\"text/css\" media=\"all\" />
  1026. {% endblock %}
  1027. {% block javascript %}
  1028.     <script>
  1029.         eccube.classCategories = {{ class_categories_as_json(Product)|raw }};
  1030.         // 規格2に選択肢を割り当てる。
  1031.         function fnSetClassCategories(form, classcat_id2_selected) {
  1032.             var \$form = \$(form);
  1033.             var product_id = \$form.find('input[name=product_id]').val();
  1034.             var \$sele1 = \$form.find('select[name=classcategory_id1]');
  1035.             var \$sele2 = \$form.find('select[name=classcategory_id2]');
  1036.             eccube.setClassCategories(\$form, product_id, \$sele1, \$sele2, classcat_id2_selected);
  1037.         }
  1038.         {% if form.classcategory_id2 is defined %}
  1039.         fnSetClassCategories(
  1040.             \$('#form1'), {{ form.classcategory_id2.vars.value|json_encode|raw }}
  1041.         );
  1042.         {% elseif form.classcategory_id1 is defined %}
  1043.         eccube.checkStock(\$('#form1'), {{ Product.id }}, {{ form.classcategory_id1.vars.value|json_encode|raw }}, null);
  1044.         {% endif %}
  1045.     </script>
  1046.     <script>
  1047.         \$(function() {
  1048.             // bfcache無効化
  1049.             \$(window).bind('pageshow', function(event) {
  1050.                 if (event.originalEvent.persisted) {
  1051.                     location.reload(true);
  1052.                 }
  1053.             });
  1054.             // Core Web Vital の Cumulative Layout Shift(CLS)対策のため
  1055.             // img タグに width, height が付与されている.
  1056.             // 630px 未満の画面サイズでは縦横比が壊れるための対策
  1057.             // see https://github.com/EC-CUBE/ec-cube/pull/5023
  1058.             \$('.ec-grid2__cell').hide();
  1059.             var removeSize = function () {
  1060.                 \$('.slide-item').height('');
  1061.                 \$('.slide-item img')
  1062.                     .removeAttr('width')
  1063.                     .removeAttr('height')
  1064.                     .removeAttr('style');
  1065.             };
  1066.             var slickInitial = function(slick) {
  1067.                 \$('.ec-grid2__cell').fadeIn(1500);
  1068.                 var baseHeight = \$(slick.target).height();
  1069.                 var baseWidth = \$(slick.target).width();
  1070.                 var rate = baseWidth / baseHeight;
  1071.                 \$('.slide-item').height(baseHeight * rate); // 余白を削除する
  1072.                 // transform を使用することでCLSの影響を受けないようにする
  1073.                 \$('.slide-item img')
  1074.                     .css(
  1075.                         {
  1076.                             'transform-origin': 'top left',
  1077.                             'transform': 'scaleY(' + rate + ')',
  1078.                             'transition': 'transform .1s'
  1079.                         }
  1080.                     );
  1081.                 // 正しいサイズに近くなったら属性を解除する
  1082.                 setTimeout(removeSize, 500);
  1083.             };
  1084.             \$('.item_visual').on('init', slickInitial);
  1085.             // リサイズ時は CLS の影響を受けないため属性を解除する
  1086.             \$(window).resize(removeSize);
  1087.             \$('.item_visual').slick({
  1088.                 dots: false,
  1089.                 arrows: false,
  1090.             });
  1091.             
  1092.             let slide_len = \$('.item_thumbs > div').length;
  1093.             \$('.item_thumbs').slick({
  1094.                 slidesToShow: 3,
  1095.                 slidesToScroll: 1,
  1096.                 asNavFor: '.item_visual',
  1097.                 dots: false,
  1098.                 arrows: true,
  1099.                 prevArrow: '<div class=\"slide-arrow prev-arrow\"><img src=\"{{ asset('assets/img/common/slider_ico_arrow_prev.svg') }}\" alt=\"\"></div>',
  1100.                 nextArrow: '<div class=\"slide-arrow next-arrow\"><img src=\"{{ asset('assets/img/common/slider_ico_arrow_next.svg') }}\" alt=\"\"></div>',
  1101.             });
  1102.             if (slide_len <= 2) {
  1103.                 \$('.item_thumbs .slick-track').css({
  1104.                     marginLeft: '0'
  1105.                 });
  1106.             }
  1107.             \$('.slideThumb').on('click', function() {
  1108.                 var index = \$(this).attr('data-index');
  1109.                 \$('.item_visual').slick('slickGoTo', index, false);
  1110.             })
  1111.         });
  1112.     </script>
  1113.     <script>
  1114.         \$(function() {
  1115.             \$('.add-cart').on('click', function(event) {
  1116.                 {% if form.classcategory_id1 is defined %}
  1117.                 // 規格1フォームの必須チェック
  1118.                 if (\$('#classcategory_id1').val() == '__unselected' || \$('#classcategory_id1').val() == '') {
  1119.                     \$('#classcategory_id1')[0].setCustomValidity('{{ '項目が選択されていません'|trans }}');
  1120.                     return true;
  1121.                 } else {
  1122.                     \$('#classcategory_id1')[0].setCustomValidity('');
  1123.                 }
  1124.                 {% endif %}
  1125.                 {% if form.classcategory_id2 is defined %}
  1126.                 // 規格2フォームの必須チェック
  1127.                 if (\$('#classcategory_id2').val() == '__unselected' || \$('#classcategory_id2').val() == '') {
  1128.                     \$('#classcategory_id2')[0].setCustomValidity('{{ '項目が選択されていません'|trans }}');
  1129.                     return true;
  1130.                 } else {
  1131.                     \$('#classcategory_id2')[0].setCustomValidity('');
  1132.                 }
  1133.                 {% endif %}
  1134.                 // 個数フォームのチェック
  1135.                 if (\$('#quantity').val() < 1) {
  1136.                     \$('#quantity')[0].setCustomValidity('{{ '1以上で入力してください。'|trans }}');
  1137.                     return true;
  1138.                 } else {
  1139.                     \$('#quantity')[0].setCustomValidity('');
  1140.                 }
  1141.                 event.preventDefault();
  1142.                 \$form = \$('#form1');
  1143.                 \$.ajax({
  1144.                     url: \$form.attr('action'),
  1145.                     type: \$form.attr('method'),
  1146.                     data: \$form.serialize(),
  1147.                     dataType: 'json',
  1148.                     beforeSend: function(xhr, settings) {
  1149.                         // Buttonを無効にする
  1150.                         \$('.add-cart').prop('disabled', true);
  1151.                     }
  1152.                 }).done(function(data) {
  1153.                     // レスポンス内のメッセージをalertで表示
  1154.                     \$.each(data.messages, function() {
  1155.                         \$('#ec-modal-header').text(this);
  1156.                     });
  1157.                     \$('.ec-modal').show()
  1158.                     // カートブロックを更新する
  1159.                     \$.ajax({
  1160.                         url: \"{{ url('block_cart') }}\",
  1161.                         type: 'GET',
  1162.                         dataType: 'html'
  1163.                     }).done(function(html) {
  1164.                         \$('.ec-headerRole__cart').html(html);
  1165.                     });
  1166.                 }).fail(function(data) {
  1167.                     alert('{{ 'カートへの追加に失敗しました。'|trans }}');
  1168.                 }).always(function(data) {
  1169.                     // Buttonを有効にする
  1170.                     \$('.add-cart').prop('disabled', false);
  1171.                 });
  1172.             });
  1173.         });
  1174.         \$('.ec-modal-wrap').on('click', function(e) {
  1175.             // モーダル内の処理は外側にバブリングさせない
  1176.             e.stopPropagation();
  1177.         });
  1178.         \$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
  1179.             \$('.ec-modal').hide()
  1180.         });
  1181.     </script>
  1182.     <script type=\"application/ld+json\">
  1183.     {
  1184.         \"@context\": \"https://schema.org/\",
  1185.         \"@type\": \"Product\",
  1186.         \"name\": \"{{ Product.name }}\",
  1187.         \"image\": [
  1188.             {% for img in Product.ProductImage %}
  1189.                 \"{{ app.request.schemeAndHttpHost }}{{ asset(img, 'save_image') }}\"{% if not loop.last %},{% endif %}
  1190.             {% else %}
  1191.                 \"{{ app.request.schemeAndHttpHost }}{{ asset(''|no_image_product, 'save_image') }}\"
  1192.             {% endfor %}
  1193.         ],
  1194.         \"description\": \"{{ Product.description_list | default(Product.description_detail) | replace({'\\n': '', '\\r': ''}) | slice(0,300) }}\",
  1195.         {% if Product.code_min %}
  1196.         \"sku\": \"{{ Product.code_min }}\",
  1197.         {% endif %}
  1198.         \"offers\": {
  1199.             \"@type\": \"Offer\",
  1200.             \"url\": \"{{ url('product_detail', {'id': Product.id}) }}\",
  1201.             \"priceCurrency\": \"{{ eccube_config.currency }}\",
  1202.             \"price\": {{ Product.getPrice02IncTaxMin ? Product.getPrice02IncTaxMin : 0}},
  1203.             \"availability\": \"{{ Product.stock_find ? \"InStock\" : \"OutOfStock\" }}\"
  1204.         }
  1205.     }
  1206.     </script>
  1207. {% endblock %}
  1208. {% block main %}
  1209.     <section id=\"main-visual\">
  1210.         <div class=\"mainvisual\" style=\"background-image: url('{{ asset('assets/img/common/mv_img_01.jpg') }}'); ?>)\"></div>
  1211.     </section>
  1212.     <section id=\"main-title\">
  1213.         <h2 class=\"page-title\">{{ Product.name }}</h2>
  1214.         <div class=\"scroll\">
  1215.             <a href=\"#topic-path\">
  1216.                 <p>scroll</p>
  1217.                 <img src=\"https://mx-build.jp/wp-content/themes/%E3%82%BF%E3%82%A4%E3%82%A8%E3%82%A4%E5%8C%97%E6%B5%B7%E9%81%93%E3%82%A8%E3%83%B3%E3%82%B7%E3%82%99%E3%83%8B%E3%82%A2%E3%82%A2%E3%83%AA%E3%83%B3%E3%82%AF%E3%82%99/img/scroll.png\" alt=\"scroll-arrow\">
  1218.             </a>
  1219.         </div>
  1220.     </section>
  1221. \t<section id=\"topic-path\">
  1222. \t\t<div class=\"wrapper\">
  1223. \t\t\t<div class=\"container\">
  1224. \t\t\t\t<div class=\"page\">
  1225. \t\t\t\t\t<a href=\"/\">
  1226. \t\t\t\t\t\t<span class=\"home\">HOME</span>
  1227. \t\t\t\t\t</a>
  1228. \t\t\t\t\t<span>&gt;</span>
  1229. \t\t\t\t\t<a href=\"{{ url('product_list') }}\">
  1230. \t\t\t\t\t\t<span class=\"current\">商品一覧</span>
  1231. \t\t\t\t\t</a>
  1232. \t\t\t\t\t<span>&gt;</span>
  1233. \t\t\t\t\t<span class=\"current\">{{ Product.name }}</span>
  1234. \t\t\t\t</div>
  1235. \t\t\t</div>
  1236. \t\t</div>
  1237. \t</section>
  1238. \t<!-- メニューバー -->
  1239. \t{% set Categories = repository('Eccube\\\\Entity\\\\Category').getList() %}
  1240. \t<section id=\"menu-bar\">
  1241. \t\t<div class=\"wrapper\">
  1242. \t\t\t<div class=\"container\">
  1243. \t\t\t\t<nav>
  1244. \t\t\t\t\t<ul class=\"menu-list\">
  1245. \t\t\t\t\t\t{% for Category in Categories %}
  1246. \t\t\t\t\t\t\t<li class=\"menu\">
  1247. \t\t\t\t\t\t\t\t<a href=\"/shop/products/list?category_id={{ Category.id }}\">{{ Category.name }}</a>
  1248. \t\t\t\t\t\t\t</li>
  1249. \t\t\t\t\t\t{% endfor %}
  1250. \t\t\t\t\t</ul>
  1251. \t\t\t\t</nav>
  1252. \t\t\t</div>
  1253. \t\t</div>
  1254. \t</section>
  1255.     <div class=\"ec-productRole\">
  1256.         <div class=\"ec-grid2\">
  1257.             <div class=\"ec-grid2__cell\">
  1258.                 <div class=\"ec-sliderItemRole\">
  1259.                     <div class=\"item_visual\">
  1260.                         {% for ProductImage in Product.ProductImage %}
  1261.                             <div class=\"slide-item\"><img src=\"{{ asset(ProductImage, 'save_image') }}\" alt=\"{{ loop.first ? Product.name : '' }}\" width=\"550\" height=\"550\"{% if loop.index > 1 %} loading=\"lazy\"{% endif %}></div>
  1262.                         {% else %}
  1263.                             <div class=\"slide-item\"><img src=\"{{ asset(''|no_image_product, 'save_image') }}\" alt=\"{{ loop.first ? Product.name : '' }}\" width=\"550\" height=\"550\"></div>
  1264.                         {% endfor %}
  1265.                     </div>
  1266.                     <div class=\"item_thumbs\">
  1267.                         {% for ProductImage in Product.ProductImage %}
  1268.                             <div class=\"slideThumb\" data-index=\"{{ loop.index0 }}\"><img src=\"{{ asset(ProductImage, 'save_image') }}\" alt=\"\" width=\"133\" height=\"133\" loading=\"lazy\"></div>
  1269.                         {% endfor %}
  1270.                     </div>
  1271.                 </div>
  1272.             </div>
  1273.             <div class=\"ec-grid2__cell\">
  1274.                 <div class=\"ec-productRole__profile\">
  1275.                     {# 商品名 #}
  1276.                     <div class=\"ec-productRole__title\">
  1277.                         <h2 class=\"ec-headingTitle\">{{ Product.name }}</h2>
  1278.                     </div>
  1279.                     {% if ( false ) %}
  1280.                         {# タグ #}
  1281.                         <ul class=\"ec-productRole__tags\">
  1282.                             {% for Tag in Product.Tags %}
  1283.                                 <li class=\"ec-productRole__tag tag_{{ Tag.id }}\">{{ Tag }}</li>
  1284.                             {% endfor %}
  1285.                         </ul>
  1286.                         {# 商品コード #}
  1287.                         {% if Product.code_min is not empty %}
  1288.                             <div class=\"ec-productRole__code\">
  1289.                                 {{ '商品コード'|trans }}: <span class=\"product-code-default\">{{ Product.code_min }}{% if Product.code_min != Product.code_max %} ~ {{ Product.code_max }}{% endif %}</span>
  1290.                             </div>
  1291.                         {% endif %}
  1292.                         {# 関連カテゴリ #}
  1293.                         {% if Product.ProductCategories is not empty %}
  1294.                             <div class=\"ec-productRole__category\">
  1295.                                 <div>{{ '関連カテゴリ'|trans }}</div>
  1296.                                 {% for ProductCategory in Product.ProductCategories %}
  1297.                                     <ul>
  1298.                                         <li>
  1299.                                             {% for Category in ProductCategory.Category.path %}
  1300.                                                 <a href=\"{{ url('product_list') }}?category_id={{ Category.id }}\">{{ Category.name }}</a> {%- if loop.last == false %}
  1301.                                                 <span>></span>{% endif -%}
  1302.                                             {% endfor %}
  1303.                                         </li>
  1304.                                     </ul>
  1305.                                 {% endfor %}
  1306.                             </div>
  1307.                         {% endif %}
  1308.                     {% endif %}
  1309.                     <form action=\"{{ url('product_add_cart', {id:Product.id}) }}\" method=\"post\" id=\"form1\" name=\"form1\">
  1310.                         {% if Product.stock_find %}
  1311.                             <div class=\"ec-productRole__actions\">
  1312.                                 {% if form.classcategory_id1 is defined %}
  1313.                                     <div class=\"ec-select\">
  1314.                                         {{ form_row(form.classcategory_id1) }}
  1315.                                         {{ form_errors(form.classcategory_id1) }}
  1316.                                     </div>
  1317.                                     {% if form.classcategory_id2 is defined %}
  1318.                                         <div class=\"ec-select\">
  1319.                                             {{ form_row(form.classcategory_id2) }}
  1320.                                             {{ form_errors(form.classcategory_id2) }}
  1321.                                         </div>
  1322.                                     {% endif %}
  1323.                                 {% endif %}
  1324.                                 <div class=\"ec-productRole__description\">{{ Product.description_detail|raw|nl2br }}</div>
  1325.                                 {% if ( false ) %}
  1326.                                 {# 通常価格 #}
  1327.                                     {% if Product.hasProductClass -%}
  1328.                                         <div class=\"ec-productRole__priceRegular\">
  1329.                                             {% if Product.getPrice01Min is not null and Product.getPrice01IncTaxMin == Product.getPrice01IncTaxMax %}
  1330.                                                 <span class=\"ec-productRole__priceRegularPrice\">{{ '通常価格'|trans }}:<span class=\"price01-default\">{{ Product.getPrice01IncTaxMin|price }}</span></span>
  1331.                                                 <span class=\"ec-productRole__priceRegularTax\">{{ '税込'|trans }}</span>
  1332.                                             {% elseif Product.getPrice01Min is not null and Product.getPrice01Max is not null %}
  1333.                                                 <span class=\"ec-productRole__priceRegularPrice\">{{ '通常価格'|trans }}:<span class=\"price01-default\">{{ Product.getPrice01IncTaxMin|price }}~ {{ Product.getPrice01IncTaxMax|price }}</span></span>
  1334.                                                 <span class=\"ec-productRole__priceRegularTax\">{{ '税込'|trans }}</span>
  1335.                                             {% endif %}
  1336.                                         </div>
  1337.                                     {% else %}
  1338.                                         {% if Product.getPrice01Max is not null %}
  1339.                                             <span class=\"ec-productRole__priceRegularPrice\">{{ '通常価格'|trans }}:{{ Product.getPrice01IncTaxMin|price }}</span>
  1340.                                             <span class=\"ec-productRole__priceRegularTax\">{{ '税込'|trans }}</span>
  1341.                                         {% endif %}
  1342.                                     {% endif %}
  1343.                                 {% endif %}
  1344.                                 {# 販売価格 #}
  1345.                                 <div class=\"ec-productRole__price\">
  1346.                                     {% if Product.hasProductClass -%}
  1347.                                         {% if Product.getPrice02IncTaxMin == Product.getPrice02IncTaxMax %}
  1348.                                             <div class=\"ec-price\">
  1349.                                                 <span class=\"ec-price__price price02-default\">{{ Product.getPrice02IncTaxMin|price }}</span>
  1350.                                                 <span class=\"ec-price__tax\">{{ '税込'|trans }}</span>
  1351.                                             </div>
  1352.                                         {% else %}
  1353.                                             <div class=\"ec-price\">
  1354.                                                 <span class=\"ec-price__price price02-default\">{{ Product.getPrice02IncTaxMin|price }} ~ {{ Product.getPrice02IncTaxMax|price }}</span>
  1355.                                                 <span class=\"ec-price__tax\">{{ '税込'|trans }}</span>
  1356.                                             </div>
  1357.                                         {% endif %}
  1358.                                     {% else %}
  1359.                                         <div class=\"ec-price\">
  1360.                                             <span class=\"ec-price__price\">{{ Product.getPrice02IncTaxMin|price }}</span>
  1361.                                             <span class=\"ec-price__tax\">{{ '税込'|trans }}</span>
  1362.                                         </div>
  1363.                                     {% endif %}
  1364.                                 </div>
  1365.                                 <div class=\"myTemplate-ec-numberInput\">
  1366.                                     <span>{{ '数量'|trans }}</span>
  1367.                                     {{ form_widget(form.quantity) }}
  1368.                                     {{ form_errors(form.quantity) }}
  1369.                                 </div>
  1370.                                 <div class=\"myTemplate-options\">
  1371.                                     {{ form_rest(form) }}
  1372.                                 </div>
  1373.                             </div>
  1374.                             <div class=\"ec-productRole__btn\">
  1375.                                 <button type=\"submit\" class=\"ec-blockBtn--action add-cart\">
  1376.                                     {{ 'ADD CART'|trans }}
  1377.                                 </button>
  1378.                             </div>
  1379.                         {% else %}
  1380.                             <div class=\"ec-productRole__btn\">
  1381.                                 <button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
  1382.                                     {{ 'ただいま品切れ中です。'|trans }}
  1383.                                 </button>
  1384.                             </div>
  1385.                         {% endif %}
  1386.                     </form>
  1387.                     {{ include('Product/option_description.twig') }}<div class=\"ec-modal\">
  1388.                         <div class=\"ec-modal-overlay\">
  1389.                             <div class=\"ec-modal-wrap\">
  1390.                                 <span class=\"ec-modal-close\"><span class=\"ec-icon\"><img src=\"{{ asset('assets/icon/cross-dark.svg') }}\" alt=\"\"/></span></span>
  1391.                                 <div id=\"ec-modal-header\" class=\"text-center\">{{ 'カートに追加しました。'|trans }}</div>
  1392.                                 <div class=\"ec-modal-box\">
  1393.                                     <div class=\"ec-role\">
  1394.                                         <span class=\"ec-inlineBtn--cancel\">{{ 'お買い物を続ける'|trans }}</span>
  1395.                                         <a href=\"{{ url('cart') }}\" class=\"ec-inlineBtn--action\">{{ 'カートへ進む'|trans }}</a>
  1396.                                     </div>
  1397.                                 </div>
  1398.                             </div>
  1399.                         </div>
  1400.                     </div>
  1401.                     {% if BaseInfo.option_favorite_product %}
  1402.                         <form action=\"{{ url('product_add_favorite', {id:Product.id}) }}\" method=\"post\">
  1403.                             <div class=\"ec-productRole__btn\">
  1404.                                 {% if is_favorite == false %}
  1405.                                     <button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel\">
  1406.                                         {{ 'お気に入りに追加'|trans }}
  1407.                                     </button>
  1408.                                 {% else %}
  1409.                                     <button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel\"
  1410.                                             disabled=\"disabled\">{{ 'お気に入りに追加済です。'|trans }}
  1411.                                     </button>
  1412.                                 {% endif %}
  1413.                             </div>
  1414.                         </form>
  1415.                     {% endif %}
  1416.                 </div>
  1417.             </div>
  1418.         </div>
  1419.         {% if Product.freearea %}
  1420.              <div class=\"ec-productRole__description\">
  1421.                  {{ include(template_from_string(Product.freearea)) }}
  1422.             </div>
  1423.         {% endif %}
  1424.     </div>
  1425. {% endblock %}""__string_template__f87294302d7a8625262f6ddb5301e93f""");
  1426.     }
  1427. }