var/cache/dev/twig/93/934bd6caf29a78564028bb15951ffcf08b5569bcfcf713739bdd0794d47fb605.php line 54

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. /* Product/detail.twig */
  14. class __TwigTemplate_9bbd4ced6074fd22ad653bd6f735c57ba907af5127e578a9314aa4e3b841256d 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.             'tracking_script' => [$this'block_tracking_script'],
  24.             'stylesheet' => [$this'block_stylesheet'],
  25.             'javascript' => [$this'block_javascript'],
  26.             'main' => [$this'block_main'],
  27.         ];
  28.     }
  29.     protected function doGetParent(array $context)
  30.     {
  31.         // line 11
  32.         return "default_frame.twig";
  33.     }
  34.     protected function doDisplay(array $context, array $blocks = [])
  35.     {
  36.         $macros $this->macros;
  37.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  38.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Product/detail.twig"));
  39.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  40.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Product/detail.twig"));
  41.         // line 13
  42.         $context["body_class"] = "product_page";
  43.         // line 11
  44.         $this->parent $this->loadTemplate("default_frame.twig""Product/detail.twig"11);
  45.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  46.         
  47.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  48.         
  49.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  50.     }
  51.     // line 15
  52.     public function block_tracking_script($context, array $blocks = [])
  53.     {
  54.         $macros $this->macros;
  55.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  56.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""tracking_script"));
  57.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  58.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""tracking_script"));
  59.         // line 16
  60.         echo "<script>
  61.     gtag('event', 'view_item', {
  62.         currency: 'JPY',
  63.         value: ";
  64.         // line 19
  65.         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.'19$this->source); })()), "getPrice02IncTaxMin", [], "any"falsefalsefalse19), "html"nulltrue);
  66.         echo ",
  67.         items: [{
  68.         item_id: '";
  69.         // line 21
  70.         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.'21$this->source); })()), "id", [], "any"falsefalsefalse21), "html"nulltrue);
  71.         echo "',
  72.         item_name: '";
  73.         // line 22
  74.         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.'22$this->source); })()), "name", [], "any"falsefalsefalse22), "html"nulltrue);
  75.         echo "',
  76.         price: ";
  77.         // line 23
  78.         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.'23$this->source); })()), "getPrice02IncTaxMin", [], "any"falsefalsefalse23), "html"nulltrue);
  79.         echo ",
  80.             currency: 'JPY'
  81.         }]
  82.     });
  83. </script>
  84. ";
  85.         
  86.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  87.         
  88.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  89.     }
  90.     // line 30
  91.     public function block_stylesheet($context, array $blocks = [])
  92.     {
  93.         $macros $this->macros;
  94.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  95.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheet"));
  96.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  97.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheet"));
  98.         // line 31
  99.         echo "    <style>
  100.         .slick-slider {
  101.             margin-bottom: 30px;
  102.         }
  103.         .slick-dots {
  104.             position: absolute;
  105.             bottom: -45px;
  106.             display: block;
  107.             width: 100%;
  108.             padding: 0;
  109.             list-style: none;
  110.             text-align: center;
  111.         }
  112.         .slick-dots li {
  113.             position: relative;
  114.             display: inline-block;
  115.             width: 20px;
  116.             height: 20px;
  117.             margin: 0 5px;
  118.             padding: 0;
  119.             cursor: pointer;
  120.         }
  121.         .slick-dots li button {
  122.             font-size: 0;
  123.             line-height: 0;
  124.             display: block;
  125.             width: 20px;
  126.             height: 20px;
  127.             padding: 5px;
  128.             cursor: pointer;
  129.             color: transparent;
  130.             border: 0;
  131.             outline: none;
  132.             background: transparent;
  133.         }
  134.         .slick-dots li button:hover,
  135.         .slick-dots li button:focus {
  136.             outline: none;
  137.         }
  138.         .slick-dots li button:hover:before,
  139.         .slick-dots li button:focus:before {
  140.             opacity: 1;
  141.         }
  142.         .slick-dots li button:before {
  143.             content: \" \";
  144.             line-height: 20px;
  145.             position: absolute;
  146.             top: 0;
  147.             left: 0;
  148.             width: 12px;
  149.             height: 12px;
  150.             text-align: center;
  151.             opacity: .25;
  152.             background-color: black;
  153.             border-radius: 50%;
  154.         }
  155.         .slick-dots li.slick-active button:before {
  156.             opacity: .75;
  157.             background-color: black;
  158.         }
  159.         .slick-dots li button.thumbnail img {
  160.             width: 0;
  161.             height: 0;
  162.         }
  163.         .freearea-modal-wrap {
  164.             position: fixed;
  165.             top: 0;
  166.             left: 0;
  167.             z-index: 99999;
  168.             width: 100%;
  169.             height: 100%;
  170.         }
  171.         .freearea-modal-overlay {
  172.             display: flex;
  173.             justify-content: center;
  174.             align-items: center;
  175.             width: 100%;
  176.             height: 100%;
  177.         }
  178.         .freearea-modal-layer-mask {
  179.             position: absolute;
  180.             z-index: 0;
  181.             background-color: rgba(0, 0, 0, 0.3);
  182.             width: 100%;
  183.             height: 100vh;
  184.         }
  185.         .freearea-modal-cont {
  186.             position: relative;
  187.             border-radius: 6px;
  188.             border: 1px solid #333;
  189.             background: #eee;
  190.             width: 100%;
  191.             max-width: 620px;
  192.             margin: 0 10px;
  193.             padding: 25px 15px 10px;
  194.             text-align: center;
  195.         }
  196.         .freearea-modal-inner-wrap {
  197.             margin: 20px 0 35px;
  198.         }
  199.         .freearea-modal-close-wrap {
  200.             text-align: right;
  201.         }
  202.         .freearea-modal-close {
  203.             background: #DE5D50;
  204.             border: none;
  205.             border-radius: 3px;
  206.         }
  207.     </style>
  208. ";
  209.         
  210.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  211.         
  212.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  213.     }
  214.     // line 154
  215.     public function block_javascript($context, array $blocks = [])
  216.     {
  217.         $macros $this->macros;
  218.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  219.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascript"));
  220.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  221.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascript"));
  222.         // line 155
  223.         echo "    <script>
  224.         eccube.classCategories = ";
  225.         // line 156
  226.         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.'156$this->source); })()));
  227.         echo ";
  228.         // 規格2に選択肢を割り当てる。
  229.         function fnSetClassCategories(form, classcat_id2_selected) {
  230.             var \$form = \$(form);
  231.             var product_id = \$form.find('input[name=product_id]').val();
  232.             var \$sele1 = \$form.find('select[name=classcategory_id1]');
  233.             var \$sele2 = \$form.find('select[name=classcategory_id2]');
  234.             eccube.setClassCategories(\$form, product_id, \$sele1, \$sele2, classcat_id2_selected);
  235.         }
  236.         ";
  237.         // line 167
  238.         if (twig_get_attribute($this->env$this->source, ($context["form"] ?? null), "classcategory_id2", [], "any"truetruefalse167)) {
  239.             // line 168
  240.             echo "        fnSetClassCategories(
  241.             \$('#form1'), ";
  242.             // line 169
  243.             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.'169$this->source); })()), "classcategory_id2", [], "any"falsefalsefalse169), "vars", [], "any"falsefalsefalse169), "value", [], "any"falsefalsefalse169));
  244.             echo "
  245.         );
  246.         ";
  247.         } elseif (twig_get_attribute($this->env$this->source,         // line 171
  248. ($context["form"] ?? null), "classcategory_id1", [], "any"truetruefalse171)) {
  249.             // line 172
  250.             echo "        eccube.checkStock(\$('#form1'), ";
  251.             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.'172$this->source); })()), "id", [], "any"falsefalsefalse172), "html"nulltrue);
  252.             echo ", ";
  253.             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.'172$this->source); })()), "classcategory_id1", [], "any"falsefalsefalse172), "vars", [], "any"falsefalsefalse172), "value", [], "any"falsefalsefalse172));
  254.             echo ", null);
  255.         ";
  256.         }
  257.         // line 174
  258.         echo "    </script>
  259.     <script>
  260.         \$(function() {
  261.             // bfcache無効化
  262.             \$(window).bind('pageshow', function(event) {
  263.                 if (event.originalEvent.persisted) {
  264.                     location.reload(true);
  265.                 }
  266.             });
  267.             \$('.item_visual').slick({
  268.                 dots: false,
  269.                 arrows: false,
  270.                 responsive: [{
  271.                     breakpoint: 768,
  272.                     settings: {
  273.                         dots: true
  274.                     }
  275.                 }]
  276.             });
  277.             \$('.slideThumb').on('click', function() {
  278.                 var index = \$(this).attr('data-index');
  279.                 \$('.item_visual').slick('slickGoTo', index, false);
  280.             })
  281.         });
  282.     </script>
  283.     <script>
  284.         \$(function() {
  285.             \$('.add-cart').on('click', function(event) {
  286.                 ";
  287.         // line 204
  288.         if (twig_get_attribute($this->env$this->source, ($context["form"] ?? null), "classcategory_id1", [], "any"truetruefalse204)) {
  289.             // line 205
  290.             echo "                // 規格1フォームの必須チェック
  291.                 if (\$('#classcategory_id1').val() == '__unselected' || \$('#classcategory_id1').val() == '') {
  292.                     \$('#classcategory_id1')[0].setCustomValidity('";
  293.             // line 207
  294.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("項目が選択されていません"), "html"nulltrue);
  295.             echo "');
  296.                     return true;
  297.                 } else {
  298.                     \$('#classcategory_id1')[0].setCustomValidity('');
  299.                 }
  300.                 ";
  301.         }
  302.         // line 213
  303.         echo "
  304.                 ";
  305.         // line 214
  306.         if (twig_get_attribute($this->env$this->source, ($context["form"] ?? null), "classcategory_id2", [], "any"truetruefalse214)) {
  307.             // line 215
  308.             echo "                // 規格2フォームの必須チェック
  309.                 if (\$('#classcategory_id2').val() == '__unselected' || \$('#classcategory_id2').val() == '') {
  310.                     \$('#classcategory_id2')[0].setCustomValidity('";
  311.             // line 217
  312.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("項目が選択されていません"), "html"nulltrue);
  313.             echo "');
  314.                     return true;
  315.                 } else {
  316.                     \$('#classcategory_id2')[0].setCustomValidity('');
  317.                 }
  318.                 ";
  319.         }
  320.         // line 223
  321.         echo "
  322.                 // 個数フォームのチェック
  323.                 if (\$('#quantity').val() < 1) {
  324.                     \$('#quantity')[0].setCustomValidity('";
  325.         // line 226
  326.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("1以上で入力してください。"), "html"nulltrue);
  327.         echo "');
  328.                     return true;
  329.                 } else {
  330.                     \$('#quantity')[0].setCustomValidity('');
  331.                 }
  332.                 event.preventDefault();
  333.                 \$form = \$('#form1');
  334.                 \$.ajax({
  335.                     url: \$form.attr('action'),
  336.                     type: \$form.attr('method'),
  337.                     data: \$form.serialize(),
  338.                     dataType: 'json',
  339.                     beforeSend: function(xhr, settings) {
  340.                         // Buttonを無効にする
  341.                         \$('.add-cart').prop('disabled', true);
  342.                     }
  343.                 }).done(function(data) {
  344.                     // レスポンス内のメッセージをalertで表示
  345.                     \$.each(data.messages, function() {
  346.                         \$('#ec-modal-header').html(this);
  347.                     });
  348.                     \$('.ec-modal').show()
  349.                     // カートブロックを更新する
  350.                     \$.ajax({
  351.                         url: \"";
  352.         // line 253
  353.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("block_cart");
  354.         echo "\",
  355.                         type: 'GET',
  356.                         dataType: 'html'
  357.                     }).done(function(html) {
  358.                         \$('.ec-headerRole__cart').html(html);
  359.                     });
  360.                 }).fail(function(data) {
  361.                     alert('";
  362.         // line 260
  363.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへの追加に失敗しました。"), "html"nulltrue);
  364.         echo "');
  365.                 }).always(function(data) {
  366.                     // Buttonを有効にする
  367.                     \$('.add-cart').prop('disabled', false);
  368.                 });
  369.             });
  370.         });
  371.         \$('.ec-modal-wrap').on('click', function(e) {
  372.             // モーダル内の処理は外側にバブリングさせない
  373.             e.stopPropagation();
  374.         });
  375.         \$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
  376.             \$('.ec-modal').hide()
  377.         });
  378.         window.addEventListener('DOMContentLoaded', () =>
  379.         {
  380.             const modalWrap = document.querySelector('.freearea-modal-wrap')
  381.             if(modalWrap) {
  382.                 const closeModalButton = document.querySelector('.freearea-modal-close')
  383.                 closeModalButton.addEventListener('click', () => modalWrap.remove())
  384.             }
  385.         })
  386.     </script>
  387.     <script type=\"application/ld+json\">
  388.     {
  389.         \"@context\": \"https://schema.org/\",
  390.         \"@type\": \"Product\",
  391.         \"name\": \"";
  392.         // line 290
  393.         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.'290$this->source); })()), "name", [], "any"falsefalsefalse290), "html"nulltrue);
  394.         echo "\",
  395.         \"image\": [
  396.             ";
  397.         // line 292
  398.         $context['_parent'] = $context;
  399.         $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.'292$this->source); })()), "ProductImage", [], "any"falsefalsefalse292));
  400.         $context['_iterated'] = false;
  401.         $context['loop'] = [
  402.           'parent' => $context['_parent'],
  403.           'index0' => 0,
  404.           'index'  => 1,
  405.           'first'  => true,
  406.         ];
  407.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  408.             $length count($context['_seq']);
  409.             $context['loop']['revindex0'] = $length 1;
  410.             $context['loop']['revindex'] = $length;
  411.             $context['loop']['length'] = $length;
  412.             $context['loop']['last'] = === $length;
  413.         }
  414.         foreach ($context['_seq'] as $context["_key"] => $context["img"]) {
  415.             // line 293
  416.             echo "                \"";
  417.             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.'293$this->source); })()), "request", [], "any"falsefalsefalse293), "schemeAndHttpHost", [], "any"falsefalsefalse293), "html"nulltrue);
  418.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($context["img"], "save_image"), "html"nulltrue);
  419.             echo "\"";
  420.             if ( !twig_get_attribute($this->env$this->source$context["loop"], "last", [], "any"falsefalsefalse293)) {
  421.                 echo ",";
  422.             }
  423.             // line 294
  424.             echo "
  425.             ";
  426.             $context['_iterated'] = true;
  427.             ++$context['loop']['index0'];
  428.             ++$context['loop']['index'];
  429.             $context['loop']['first'] = false;
  430.             if (isset($context['loop']['length'])) {
  431.                 --$context['loop']['revindex0'];
  432.                 --$context['loop']['revindex'];
  433.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  434.             }
  435.         }
  436.         if (!$context['_iterated']) {
  437.             // line 296
  438.             echo "                \"";
  439.             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.'296$this->source); })()), "request", [], "any"falsefalsefalse296), "schemeAndHttpHost", [], "any"falsefalsefalse296), "html"nulltrue);
  440.             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);
  441.             echo "\"
  442.             ";
  443.         }
  444.         $_parent $context['_parent'];
  445.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['img'], $context['_parent'], $context['loop']);
  446.         $context array_intersect_key($context$_parent) + $_parent;
  447.         // line 298
  448.         echo "        ],
  449.         \"description\": \"";
  450.         // line 299
  451.         echo twig_escape_filter($this->envtwig_slice($this->envtwig_replace_filter(((twig_get_attribute($this->env$this->source, ($context["Product"] ?? null), "description_list", [], "any"truetruefalse299)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source, ($context["Product"] ?? null), "description_list", [], "any"falsefalsefalse299), 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.'299$this->source); })()), "description_detail", [], "any"falsefalsefalse299))) : (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.'299$this->source); })()), "description_detail", [], "any"falsefalsefalse299))), ["
  452. => """ " => ""]), 0300), "html"nulltrue);
  453.         echo "\",
  454.         ";
  455.         // line 300
  456.         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.'300$this->source); })()), "code_min", [], "any"falsefalsefalse300)) {
  457.             // line 301
  458.             echo "        \"sku\": \"";
  459.             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.'301$this->source); })()), "code_min", [], "any"falsefalsefalse301), "html"nulltrue);
  460.             echo "\",
  461.         ";
  462.         }
  463.         // line 303
  464.         echo "        \"offers\": {
  465.             \"@type\": \"Offer\",
  466.             \"url\": \"";
  467.         // line 305
  468.         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.'305$this->source); })()), "id", [], "any"falsefalsefalse305)]), "html"nulltrue);
  469.         echo "\",
  470.             \"priceCurrency\": \"";
  471.         // line 306
  472.         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.'306$this->source); })()), "currency", [], "any"falsefalsefalse306), "html"nulltrue);
  473.         echo "\",
  474.             \"price\": ";
  475.         // line 307
  476.         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.'307$this->source); })()), "getPrice02IncTaxMin", [], "any"falsefalsefalse307), "html"nulltrue);
  477.         echo ",
  478.             \"availability\": \"";
  479.         // line 308
  480.         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.'308$this->source); })()), "stock_find", [], "any"falsefalsefalse308)) ? ("InStock") : ("OutOfStock"));
  481.         echo "\"
  482.         }
  483.     }
  484.     </script>
  485. ";
  486.         
  487.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  488.         
  489.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  490.     }
  491.     // line 314
  492.     public function block_main($context, array $blocks = [])
  493.     {
  494.         $macros $this->macros;
  495.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  496.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  497.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  498.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  499.         // line 315
  500.         echo "    <div class=\"ec-productRole\">
  501.         <div class=\"ec-grid2\">
  502.             <div class=\"ec-grid2__cell\">
  503.                 <div class=\"ec-sliderItemRole\">
  504.                     <div class=\"item_visual\">
  505.                         ";
  506.         // line 321
  507.         $context['_parent'] = $context;
  508.         $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.'321$this->source); })()), "ProductImage", [], "any"falsefalsefalse321));
  509.         $context['_iterated'] = false;
  510.         $context['loop'] = [
  511.           'parent' => $context['_parent'],
  512.           'index0' => 0,
  513.           'index'  => 1,
  514.           'first'  => true,
  515.         ];
  516.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  517.             $length count($context['_seq']);
  518.             $context['loop']['revindex0'] = $length 1;
  519.             $context['loop']['revindex'] = $length;
  520.             $context['loop']['length'] = $length;
  521.             $context['loop']['last'] = === $length;
  522.         }
  523.         foreach ($context['_seq'] as $context["_key"] => $context["ProductImage"]) {
  524.             // line 322
  525.             echo "                            <div class=\"slide-item\"><img src=\"";
  526.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($context["ProductImage"], "save_image"), "html"nulltrue);
  527.             echo "\" alt=\"";
  528.             ((twig_get_attribute($this->env$this->source$context["loop"], "first", [], "any"falsefalsefalse322)) ? (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.'322$this->source); })()), "name", [], "any"falsefalsefalse322), "html"nulltrue))) : (print ("")));
  529.             echo "\"></div>
  530.                         ";
  531.             $context['_iterated'] = true;
  532.             ++$context['loop']['index0'];
  533.             ++$context['loop']['index'];
  534.             $context['loop']['first'] = false;
  535.             if (isset($context['loop']['length'])) {
  536.                 --$context['loop']['revindex0'];
  537.                 --$context['loop']['revindex'];
  538.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  539.             }
  540.         }
  541.         if (!$context['_iterated']) {
  542.             // line 324
  543.             echo "                            <div class=\"slide-item\"><img src=\"";
  544.             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);
  545.             echo "\" alt=\"";
  546.             ((twig_get_attribute($this->env$this->source$context["loop"], "first", [], "any"falsefalsefalse324)) ? (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.'324$this->source); })()), "name", [], "any"falsefalsefalse324), "html"nulltrue))) : (print ("")));
  547.             echo "\" /></div>
  548.                         ";
  549.         }
  550.         $_parent $context['_parent'];
  551.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ProductImage'], $context['_parent'], $context['loop']);
  552.         $context array_intersect_key($context$_parent) + $_parent;
  553.         // line 326
  554.         echo "                    </div>
  555.                     <div class=\"item_nav\">
  556.                         ";
  557.         // line 328
  558.         $context['_parent'] = $context;
  559.         $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.'328$this->source); })()), "ProductImage", [], "any"falsefalsefalse328));
  560.         $context['loop'] = [
  561.           'parent' => $context['_parent'],
  562.           'index0' => 0,
  563.           'index'  => 1,
  564.           'first'  => true,
  565.         ];
  566.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  567.             $length count($context['_seq']);
  568.             $context['loop']['revindex0'] = $length 1;
  569.             $context['loop']['revindex'] = $length;
  570.             $context['loop']['length'] = $length;
  571.             $context['loop']['last'] = === $length;
  572.         }
  573.         foreach ($context['_seq'] as $context["_key"] => $context["ProductImage"]) {
  574.             // line 329
  575.             echo "                            <div class=\"slideThumb\" data-index=\"";
  576.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["loop"], "index0", [], "any"falsefalsefalse329), "html"nulltrue);
  577.             echo "\"><img src=\"";
  578.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($context["ProductImage"], "save_image"), "html"nulltrue);
  579.             echo "\" alt=\"\"></div>
  580.                         ";
  581.             ++$context['loop']['index0'];
  582.             ++$context['loop']['index'];
  583.             $context['loop']['first'] = false;
  584.             if (isset($context['loop']['length'])) {
  585.                 --$context['loop']['revindex0'];
  586.                 --$context['loop']['revindex'];
  587.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  588.             }
  589.         }
  590.         $_parent $context['_parent'];
  591.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ProductImage'], $context['_parent'], $context['loop']);
  592.         $context array_intersect_key($context$_parent) + $_parent;
  593.         // line 331
  594.         echo "                    </div>
  595.                 </div>
  596.             </div>
  597.             <div class=\"ec-grid2__cell\">
  598.                 <div class=\"ec-productRole__profile\">
  599.                     ";
  600.         // line 337
  601.         echo "                    <div class=\"ec-productRole__title\">
  602.                         <h2 class=\"ec-headingTitle\">";
  603.         // line 338
  604.         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.'338$this->source); })()), "name", [], "any"falsefalsefalse338), "html"nulltrue);
  605.         echo "</h2>
  606.                     </div>
  607.                     ";
  608.         // line 341
  609.         echo "                    <ul class=\"ec-productRole__tags\">
  610.                         ";
  611.         // line 342
  612.         $context['_parent'] = $context;
  613.         $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.'342$this->source); })()), "Tags", [], "any"falsefalsefalse342));
  614.         foreach ($context['_seq'] as $context["_key"] => $context["Tag"]) {
  615.             // line 343
  616.             echo "                            <li class=\"ec-productRole__tag tag_";
  617.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Tag"], "id", [], "any"falsefalsefalse343), "html"nulltrue);
  618.             echo "\">";
  619.             echo twig_escape_filter($this->env$context["Tag"], "html"nulltrue);
  620.             echo "</li>
  621.                         ";
  622.         }
  623.         $_parent $context['_parent'];
  624.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Tag'], $context['_parent'], $context['loop']);
  625.         $context array_intersect_key($context$_parent) + $_parent;
  626.         // line 345
  627.         echo "                    </ul>
  628.                     ";
  629.         // line 347
  630.         echo "                    ";
  631.         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.'347$this->source); })()), "hasProductClass", [], "any"falsefalsefalse347)) {
  632.             // line 348
  633.             echo "<div class=\"ec-productRole__priceRegular\">
  634.                             ";
  635.             // line 349
  636.             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.'349$this->source); })()), "getPrice01Min", [], "any"falsefalsefalse349)) && (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.'349$this->source); })()), "getPrice01IncTaxMin", [], "any"falsefalsefalse349) == 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.'349$this->source); })()), "getPrice01IncTaxMax", [], "any"falsefalsefalse349)))) {
  637.                 // line 350
  638.                 echo "                                <span class=\"f-small\">寄付金額</span>
  639.                                 <span class=\"ec-productRole__priceRegularPrice\">";
  640.                 // line 351
  641.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("通常価格"), "html"nulltrue);
  642.                 echo ":<span class=\"price01-default\">";
  643.                 echo twig_escape_filter($this->envtwig_number_format_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.'351$this->source); })()), "getPrice01IncTaxMin", [], "any"falsefalsefalse351)), "html"nulltrue);
  644.                 echo "</span></span>
  645.                                 ";
  646.                 // line 353
  647.                 echo "                            ";
  648.             } elseif (( !(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.'353$this->source); })()), "getPrice01Min", [], "any"falsefalsefalse353)) &&  !(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.'353$this->source); })()), "getPrice01Max", [], "any"falsefalsefalse353)))) {
  649.                 // line 354
  650.                 echo "                                <span class=\"f-small\">寄付金額</span>
  651.                                 <span class=\"ec-productRole__priceRegularPrice\">";
  652.                 // line 355
  653.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("通常価格"), "html"nulltrue);
  654.                 echo ":<span class=\"price01-default\">";
  655.                 echo twig_escape_filter($this->envtwig_number_format_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.'355$this->source); })()), "getPrice01IncTaxMin", [], "any"falsefalsefalse355)), "html"nulltrue);
  656.                 echo "~ ";
  657.                 echo twig_escape_filter($this->envtwig_number_format_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.'355$this->source); })()), "getPrice01IncTaxMax", [], "any"falsefalsefalse355)), "html"nulltrue);
  658.                 echo "</span></span>
  659.                                 ";
  660.                 // line 357
  661.                 echo "                            ";
  662.             }
  663.             // line 358
  664.             echo "                        </div>
  665.                     ";
  666.         } else {
  667.             // line 360
  668.             echo "                        ";
  669.             // line 364
  670.             echo "                    ";
  671.         }
  672.         // line 365
  673.         echo "                    ";
  674.         // line 366
  675.         echo "                    <div class=\"ec-productRole__price\">
  676.                         ";
  677.         // line 367
  678.         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.'367$this->source); })()), "hasProductClass", [], "any"falsefalsefalse367)) {
  679.             // line 368
  680.             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.'368$this->source); })()), "getPrice02IncTaxMin", [], "any"falsefalsefalse368) == 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.'368$this->source); })()), "getPrice02IncTaxMax", [], "any"falsefalsefalse368))) {
  681.                 // line 369
  682.                 echo "                                <div class=\"ec-price\">
  683.                                     <span class=\"f-small\">寄付金額</span>
  684.                                     <span class=\"ec-price__price price02-default\">";
  685.                 // line 371
  686.                 echo twig_escape_filter($this->envtwig_number_format_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.'371$this->source); })()), "getPrice02IncTaxMin", [], "any"falsefalsefalse371)), "html"nulltrue);
  687.                 echo "円</span>
  688.                                     ";
  689.                 // line 373
  690.                 echo "                                </div>
  691.                             ";
  692.             } else {
  693.                 // line 375
  694.                 echo "                                <div class=\"ec-price\">
  695.                                     <span class=\"f-small\">寄付金額</span>
  696.                                     <span class=\"ec-price__price price02-default\">";
  697.                 // line 377
  698.                 echo twig_escape_filter($this->envtwig_number_format_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.'377$this->source); })()), "getPrice02IncTaxMin", [], "any"falsefalsefalse377)), "html"nulltrue);
  699.                 echo " ~ ";
  700.                 echo twig_escape_filter($this->envtwig_number_format_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.'377$this->source); })()), "getPrice02IncTaxMax", [], "any"falsefalsefalse377)), "html"nulltrue);
  701.                 echo "円</span>
  702.                                     ";
  703.                 // line 379
  704.                 echo "                                </div>
  705.                             ";
  706.             }
  707.             // line 381
  708.             echo "                        ";
  709.         } else {
  710.             // line 382
  711.             echo "                            <div class=\"ec-price\">
  712.                                 <span class=\"f-small\">寄付金額</span>
  713.                                 <span class=\"ec-price__price\">";
  714.             // line 384
  715.             echo twig_escape_filter($this->envtwig_number_format_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.'384$this->source); })()), "getPrice02IncTaxMin", [], "any"falsefalsefalse384)), "html"nulltrue);
  716.             echo "円</span>
  717.                                 ";
  718.             // line 386
  719.             echo "                            </div>
  720.                         ";
  721.         }
  722.         // line 388
  723.         echo "                    </div>
  724.                     ";
  725.         // line 390
  726.         echo "                    ";
  727.         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.'390$this->source); })()), "code_min", [], "any"falsefalsefalse390))) {
  728.             // line 391
  729.             echo "                        <div class=\"ec-productRole__code\">
  730.                             ";
  731.             // line 392
  732.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("商品コード"), "html"nulltrue);
  733.             echo ": <span class=\"product-code-default\">";
  734.             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.'392$this->source); })()), "code_min", [], "any"falsefalsefalse392), "html"nulltrue);
  735.             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.'392$this->source); })()), "code_min", [], "any"falsefalsefalse392) != 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.'392$this->source); })()), "code_max", [], "any"falsefalsefalse392))) {
  736.                 echo " ~ ";
  737.                 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.'392$this->source); })()), "code_max", [], "any"falsefalsefalse392), "html"nulltrue);
  738.             }
  739.             echo "</span>
  740.                         </div>
  741.                     ";
  742.         }
  743.         // line 395
  744.         echo "                    ";
  745.         // line 396
  746.         echo "                    ";
  747.         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.'396$this->source); })()), "ProductCategories", [], "any"falsefalsefalse396))) {
  748.             // line 397
  749.             echo "                        <div class=\"ec-productRole__category\">
  750.                             <div>";
  751.             // line 398
  752.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("関連カテゴリ"), "html"nulltrue);
  753.             echo "</div>
  754.                             ";
  755.             // line 399
  756.             $context['_parent'] = $context;
  757.             $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.'399$this->source); })()), "ProductCategories", [], "any"falsefalsefalse399));
  758.             foreach ($context['_seq'] as $context["_key"] => $context["ProductCategory"]) {
  759.                 // line 400
  760.                 echo "                                <ul>
  761.                                     <li>
  762.                                         ";
  763.                 // line 402
  764.                 $context['_parent'] = $context;
  765.                 $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["ProductCategory"], "Category", [], "any"falsefalsefalse402), "path", [], "any"falsefalsefalse402));
  766.                 $context['loop'] = [
  767.                   'parent' => $context['_parent'],
  768.                   'index0' => 0,
  769.                   'index'  => 1,
  770.                   'first'  => true,
  771.                 ];
  772.                 if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  773.                     $length count($context['_seq']);
  774.                     $context['loop']['revindex0'] = $length 1;
  775.                     $context['loop']['revindex'] = $length;
  776.                     $context['loop']['length'] = $length;
  777.                     $context['loop']['last'] = === $length;
  778.                 }
  779.                 foreach ($context['_seq'] as $context["_key"] => $context["Category"]) {
  780.                     // line 403
  781.                     echo "                                            <a href=\"";
  782.                     echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
  783.                     echo "?category_id=";
  784.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Category"], "id", [], "any"falsefalsefalse403), "html"nulltrue);
  785.                     echo "\">";
  786.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Category"], "name", [], "any"falsefalsefalse403), "html"nulltrue);
  787.                     echo "</a>";
  788.                     if ((twig_get_attribute($this->env$this->source$context["loop"], "last", [], "any"falsefalsefalse403) == false)) {
  789.                         // line 404
  790.                         echo "                                            <span>></span>";
  791.                     }
  792.                     ++$context['loop']['index0'];
  793.                     ++$context['loop']['index'];
  794.                     $context['loop']['first'] = false;
  795.                     if (isset($context['loop']['length'])) {
  796.                         --$context['loop']['revindex0'];
  797.                         --$context['loop']['revindex'];
  798.                         $context['loop']['last'] = === $context['loop']['revindex0'];
  799.                     }
  800.                 }
  801.                 $_parent $context['_parent'];
  802.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Category'], $context['_parent'], $context['loop']);
  803.                 $context array_intersect_key($context$_parent) + $_parent;
  804.                 // line 406
  805.                 echo "                                    </li>
  806.                                 </ul>
  807.                             ";
  808.             }
  809.             $_parent $context['_parent'];
  810.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ProductCategory'], $context['_parent'], $context['loop']);
  811.             $context array_intersect_key($context$_parent) + $_parent;
  812.             // line 409
  813.             echo "                        </div>
  814.                     ";
  815.         }
  816.         // line 411
  817.         echo "                    <form action=\"";
  818.         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.'411$this->source); })()), "id", [], "any"falsefalsefalse411)]), "html"nulltrue);
  819.         echo "\" method=\"post\" id=\"form1\" name=\"form1\">
  820.                         ";
  821.         // line 412
  822.         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.'412$this->source); })()), "stock_find", [], "any"falsefalsefalse412)) {
  823.             // line 413
  824.             echo "                            <div class=\"ec-productRole__actions\">
  825.                                 ";
  826.             // line 414
  827.             if (twig_get_attribute($this->env$this->source, ($context["form"] ?? null), "classcategory_id1", [], "any"truetruefalse414)) {
  828.                 // line 415
  829.                 echo "                                    <div class=\"ec-select\">
  830.                                         ";
  831.                 // line 416
  832.                 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.'416$this->source); })()), "classcategory_id1", [], "any"falsefalsefalse416), 'widget');
  833.                 echo "
  834.                                         ";
  835.                 // line 417
  836.                 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.'417$this->source); })()), "classcategory_id1", [], "any"falsefalsefalse417), 'errors');
  837.                 echo "
  838.                                     </div>
  839.                                     ";
  840.                 // line 419
  841.                 if (twig_get_attribute($this->env$this->source, ($context["form"] ?? null), "classcategory_id2", [], "any"truetruefalse419)) {
  842.                     // line 420
  843.                     echo "                                        <div class=\"ec-select\">
  844.                                             ";
  845.                     // line 421
  846.                     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.'421$this->source); })()), "classcategory_id2", [], "any"falsefalsefalse421), 'widget');
  847.                     echo "
  848.                                             ";
  849.                     // line 422
  850.                     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.'422$this->source); })()), "classcategory_id2", [], "any"falsefalsefalse422), 'errors');
  851.                     echo "
  852.                                         </div>
  853.                                     ";
  854.                 }
  855.                 // line 425
  856.                 echo "                                ";
  857.             }
  858.             // line 426
  859.             echo "                                <div class=\"ec-numberInput\"><span>";
  860.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("数量"), "html"nulltrue);
  861.             echo "</span>
  862.                                     ";
  863.             // line 427
  864.             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.'427$this->source); })()), "quantity", [], "any"falsefalsefalse427), 'widget');
  865.             echo "
  866.                                     ";
  867.             // line 428
  868.             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.'428$this->source); })()), "quantity", [], "any"falsefalsefalse428), 'errors');
  869.             echo "
  870.                                 </div>
  871.                             </div>
  872.                             ";
  873.             // line 432
  874.             $context["now_date"] = twig_date_format_filter($this->env"now""Y/m/d");
  875.             // line 433
  876.             echo "                            ";
  877.             $context["set_period"] = 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.'433$this->source); })()), "period_range", [], "any"falsefalsefalse433);
  878.             // line 434
  879.             echo "
  880.                             ";
  881.             // line 435
  882.             if ( !(null === (isset($context["set_period"]) || array_key_exists("set_period"$context) ? $context["set_period"] : (function () { throw new RuntimeError('Variable "set_period" does not exist.'435$this->source); })()))) {
  883.                 // line 436
  884.                 echo "                                ";
  885.                 $context["expiration_date"] = twig_date_modify_filter($this->env, (isset($context["now_date"]) || array_key_exists("now_date"$context) ? $context["now_date"] : (function () { throw new RuntimeError('Variable "now_date" does not exist.'436$this->source); })()), (("+" . (isset($context["set_period"]) || array_key_exists("set_period"$context) ? $context["set_period"] : (function () { throw new RuntimeError('Variable "set_period" does not exist.'436$this->source); })())) . " months -1 day"));
  886.                 // line 437
  887.                 echo "                                ";
  888.                 $context["year"] = twig_round(((isset($context["set_period"]) || array_key_exists("set_period"$context) ? $context["set_period"] : (function () { throw new RuntimeError('Variable "set_period" does not exist.'437$this->source); })()) / 12), 0"floor");
  889.                 // line 438
  890.                 echo "                                ";
  891.                 $context["month"] = ((isset($context["set_period"]) || array_key_exists("set_period"$context) ? $context["set_period"] : (function () { throw new RuntimeError('Variable "set_period" does not exist.'438$this->source); })()) % 12);
  892.                 // line 439
  893.                 echo "                                <div>有効期限:寄付完了日から<span style=\"color: #DE5D50;\">";
  894.                 if (((isset($context["year"]) || array_key_exists("year"$context) ? $context["year"] : (function () { throw new RuntimeError('Variable "year" does not exist.'439$this->source); })()) > 0)) {
  895.                     echo twig_escape_filter($this->env, (isset($context["year"]) || array_key_exists("year"$context) ? $context["year"] : (function () { throw new RuntimeError('Variable "year" does not exist.'439$this->source); })()), "html"nulltrue);
  896.                     echo "年";
  897.                 }
  898.                 if (((isset($context["month"]) || array_key_exists("month"$context) ? $context["month"] : (function () { throw new RuntimeError('Variable "month" does not exist.'439$this->source); })()) > 0)) {
  899.                     echo twig_escape_filter($this->env, (isset($context["month"]) || array_key_exists("month"$context) ? $context["month"] : (function () { throw new RuntimeError('Variable "month" does not exist.'439$this->source); })()), "html"nulltrue);
  900.                     echo "ヶ月";
  901.                 }
  902.                 echo "</span></div>
  903.                                 <div>本日付で寄付された場合の有効期限は<span style=\"color: #DE5D50;\">";
  904.                 // line 440
  905.                 echo twig_escape_filter($this->envtwig_date_format_filter($this->env, (isset($context["expiration_date"]) || array_key_exists("expiration_date"$context) ? $context["expiration_date"] : (function () { throw new RuntimeError('Variable "expiration_date" does not exist.'440$this->source); })()), "Y/m/d"), "html"nulltrue);
  906.                 echo "</span>までとなります。</div>
  907.                             ";
  908.             }
  909.             // line 442
  910.             echo "
  911.                             <div class=\"ec-productRole__btn\">
  912.                                 <button type=\"submit\" class=\"ec-blockBtn--action add-cart\">
  913.                                     ";
  914.             // line 445
  915.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに入れる"), "html"nulltrue);
  916.             echo "
  917.                                 </button>
  918.                             </div>
  919.                         ";
  920.         } else {
  921.             // line 449
  922.             echo "                            <div class=\"ec-productRole__btn\">
  923.                                 <button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
  924.                                     ";
  925.             // line 451
  926.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ただいま品切れ中です。"), "html"nulltrue);
  927.             echo "
  928.                                 </button>
  929.                             </div>
  930.                         ";
  931.         }
  932.         // line 455
  933.         echo "
  934.                         ";
  935.         // line 456
  936.         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.'456$this->source); })()), 'rest');
  937.         echo "
  938.                     </form>
  939.                     <div class=\"ec-modal\">
  940.                         <div class=\"ec-modal-overlay\">
  941.                             <div class=\"ec-modal-wrap\">
  942.                                 <span class=\"ec-modal-close\"><span class=\"ec-icon\"><img src=\"";
  943.         // line 461
  944.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/icon/cross-dark.svg"), "html"nulltrue);
  945.         echo "\" alt=\"\"/></span></span>
  946.                                 <div id=\"ec-modal-header\" class=\"text-center\">";
  947.         // line 462
  948.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに追加しました。"), "html"nulltrue);
  949.         echo "</div>
  950.                                 <div class=\"ec-modal-box\">
  951.                                     <div class=\"ec-role\">
  952.                                         <span class=\"ec-inlineBtn--cancel\">";
  953.         // line 465
  954.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お買い物を続ける"), "html"nulltrue);
  955.         echo "</span>
  956.                                         <a href=\"";
  957.         // line 466
  958.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("cart");
  959.         echo "\" class=\"ec-inlineBtn--action\">";
  960.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへ進む"), "html"nulltrue);
  961.         echo "</a>
  962.                                     </div>
  963.                                 </div>
  964.                             </div>
  965.                         </div>
  966.                     </div>
  967.                     ";
  968.         // line 472
  969.         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.'472$this->source); })()), "option_favorite_product", [], "any"falsefalsefalse472)) {
  970.             // line 473
  971.             echo "                        <form action=\"";
  972.             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.'473$this->source); })()), "id", [], "any"falsefalsefalse473)]), "html"nulltrue);
  973.             echo "\" method=\"post\">
  974.                             <div class=\"ec-productRole__btn\">
  975.                                 ";
  976.             // line 475
  977.             if (((isset($context["is_favorite"]) || array_key_exists("is_favorite"$context) ? $context["is_favorite"] : (function () { throw new RuntimeError('Variable "is_favorite" does not exist.'475$this->source); })()) == false)) {
  978.                 // line 476
  979.                 echo "                                    <button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel\">
  980.                                         ";
  981.                 // line 477
  982.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お気に入りに追加"), "html"nulltrue);
  983.                 echo "
  984.                                     </button>
  985.                                 ";
  986.             } else {
  987.                 // line 480
  988.                 echo "                                    <button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel\"
  989.                                             disabled=\"disabled\">";
  990.                 // line 481
  991.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お気に入りに追加済です。"), "html"nulltrue);
  992.                 echo "
  993.                                     </button>
  994.                                 ";
  995.             }
  996.             // line 484
  997.             echo "                            </div>
  998.                         </form>
  999.                     ";
  1000.         }
  1001.         // line 487
  1002.         echo "                    <div class=\"ec-productRole__description\">
  1003.                         ";
  1004.         // line 488
  1005.         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.'488$this->source); })()), "description_detail", [], "any"falsefalsefalse488));
  1006.         echo "
  1007.                     </div>
  1008.                 </div>
  1009.             </div>
  1010.         </div>
  1011.         ";
  1012.         // line 493
  1013.         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.'493$this->source); })()), "freearea", [], "any"falsefalsefalse493)) {
  1014.             // line 494
  1015.             echo "            <div class=\"freearea-modal-wrap\">
  1016.                 <div class=\"freearea-modal-overlay\">
  1017.                     <div class=\"freearea-modal-layer-mask\"></div>
  1018.                     <div class=\"freearea-modal-cont\">
  1019.                         <div class=\"freearea-modal-inner-wrap\">
  1020.                             ";
  1021.             // line 499
  1022.             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.'499$this->source); })()), "freearea", [], "any"falsefalsefalse499)));
  1023.             echo "
  1024.                         </div>
  1025.                         <div class=\"freearea-modal-close-wrap\">
  1026.                             <button class=\"freearea-modal-close ec-inlineBtn--action\">確認</button>
  1027.                         </div>
  1028.                     </div>
  1029.                 </div>
  1030.             </div>
  1031.         ";
  1032.         }
  1033.         // line 508
  1034.         echo "    </div>
  1035. ";
  1036.         
  1037.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  1038.         
  1039.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  1040.     }
  1041.     public function getTemplateName()
  1042.     {
  1043.         return "Product/detail.twig";
  1044.     }
  1045.     public function isTraitable()
  1046.     {
  1047.         return false;
  1048.     }
  1049.     public function getDebugInfo()
  1050.     {
  1051.         return array (  1087 => 508,  1075 => 499,  1068 => 494,  1066 => 493,  1058 => 488,  1055 => 487,  1050 => 484,  1044 => 481,  1041 => 480,  1035 => 477,  1032 => 476,  1030 => 475,  1024 => 473,  1022 => 472,  1011 => 466,  1007 => 465,  1001 => 462,  997 => 461,  989 => 456,  986 => 455,  979 => 451,  975 => 449,  968 => 445,  963 => 442,  958 => 440,  946 => 439,  943 => 438,  940 => 437,  937 => 436,  935 => 435,  932 => 434,  929 => 433,  927 => 432,  920 => 428,  916 => 427,  911 => 426,  908 => 425,  902 => 422,  898 => 421,  895 => 420,  893 => 419,  888 => 417,  884 => 416,  881 => 415,  879 => 414,  876 => 413,  874 => 412,  869 => 411,  865 => 409,  857 => 406,  842 => 404,  833 => 403,  816 => 402,  812 => 400,  808 => 399,  804 => 398,  801 => 397,  798 => 396,  796 => 395,  784 => 392,  781 => 391,  778 => 390,  775 => 388,  771 => 386,  767 => 384,  763 => 382,  760 => 381,  756 => 379,  750 => 377,  746 => 375,  742 => 373,  738 => 371,  734 => 369,  732 => 368,  730 => 367,  727 => 366,  725 => 365,  722 => 364,  720 => 360,  716 => 358,  713 => 357,  705 => 355,  702 => 354,  699 => 353,  693 => 351,  690 => 350,  688 => 349,  685 => 348,  682 => 347,  679 => 345,  668 => 343,  664 => 342,  661 => 341,  656 => 338,  653 => 337,  646 => 331,  627 => 329,  610 => 328,  606 => 326,  595 => 324,  577 => 322,  559 => 321,  551 => 315,  541 => 314,  526 => 308,  522 => 307,  518 => 306,  514 => 305,  510 => 303,  504 => 301,  502 => 300,  497 => 299,  494 => 298,  484 => 296,  470 => 294,  462 => 293,  444 => 292,  439 => 290,  406 => 260,  396 => 253,  366 => 226,  361 => 223,  352 => 217,  348 => 215,  346 => 214,  343 => 213,  334 => 207,  330 => 205,  328 => 204,  296 => 174,  288 => 172,  286 => 171,  281 => 169,  278 => 168,  276 => 167,  262 => 156,  259 => 155,  249 => 154,  118 => 31,  108 => 30,  92 => 23,  88 => 22,  84 => 21,  79 => 19,  74 => 16,  64 => 15,  53 => 11,  51 => 13,  38 => 11,);
  1052.     }
  1053.     public function getSourceContext()
  1054.     {
  1055.         return new Source("{#
  1056. This file is part of EC-CUBE
  1057. Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  1058. http://www.ec-cube.co.jp/
  1059. For the full copyright and license information, please view the LICENSE
  1060. file that was distributed with this source code.
  1061. #}
  1062. {% extends 'default_frame.twig' %}
  1063. {% set body_class = 'product_page' %}
  1064. {% block tracking_script %}
  1065. <script>
  1066.     gtag('event', 'view_item', {
  1067.         currency: 'JPY',
  1068.         value: {{ Product.getPrice02IncTaxMin }},
  1069.         items: [{
  1070.         item_id: '{{ Product.id }}',
  1071.         item_name: '{{ Product.name }}',
  1072.         price: {{ Product.getPrice02IncTaxMin }},
  1073.             currency: 'JPY'
  1074.         }]
  1075.     });
  1076. </script>
  1077. {% endblock %}
  1078. {% block stylesheet %}
  1079.     <style>
  1080.         .slick-slider {
  1081.             margin-bottom: 30px;
  1082.         }
  1083.         .slick-dots {
  1084.             position: absolute;
  1085.             bottom: -45px;
  1086.             display: block;
  1087.             width: 100%;
  1088.             padding: 0;
  1089.             list-style: none;
  1090.             text-align: center;
  1091.         }
  1092.         .slick-dots li {
  1093.             position: relative;
  1094.             display: inline-block;
  1095.             width: 20px;
  1096.             height: 20px;
  1097.             margin: 0 5px;
  1098.             padding: 0;
  1099.             cursor: pointer;
  1100.         }
  1101.         .slick-dots li button {
  1102.             font-size: 0;
  1103.             line-height: 0;
  1104.             display: block;
  1105.             width: 20px;
  1106.             height: 20px;
  1107.             padding: 5px;
  1108.             cursor: pointer;
  1109.             color: transparent;
  1110.             border: 0;
  1111.             outline: none;
  1112.             background: transparent;
  1113.         }
  1114.         .slick-dots li button:hover,
  1115.         .slick-dots li button:focus {
  1116.             outline: none;
  1117.         }
  1118.         .slick-dots li button:hover:before,
  1119.         .slick-dots li button:focus:before {
  1120.             opacity: 1;
  1121.         }
  1122.         .slick-dots li button:before {
  1123.             content: \" \";
  1124.             line-height: 20px;
  1125.             position: absolute;
  1126.             top: 0;
  1127.             left: 0;
  1128.             width: 12px;
  1129.             height: 12px;
  1130.             text-align: center;
  1131.             opacity: .25;
  1132.             background-color: black;
  1133.             border-radius: 50%;
  1134.         }
  1135.         .slick-dots li.slick-active button:before {
  1136.             opacity: .75;
  1137.             background-color: black;
  1138.         }
  1139.         .slick-dots li button.thumbnail img {
  1140.             width: 0;
  1141.             height: 0;
  1142.         }
  1143.         .freearea-modal-wrap {
  1144.             position: fixed;
  1145.             top: 0;
  1146.             left: 0;
  1147.             z-index: 99999;
  1148.             width: 100%;
  1149.             height: 100%;
  1150.         }
  1151.         .freearea-modal-overlay {
  1152.             display: flex;
  1153.             justify-content: center;
  1154.             align-items: center;
  1155.             width: 100%;
  1156.             height: 100%;
  1157.         }
  1158.         .freearea-modal-layer-mask {
  1159.             position: absolute;
  1160.             z-index: 0;
  1161.             background-color: rgba(0, 0, 0, 0.3);
  1162.             width: 100%;
  1163.             height: 100vh;
  1164.         }
  1165.         .freearea-modal-cont {
  1166.             position: relative;
  1167.             border-radius: 6px;
  1168.             border: 1px solid #333;
  1169.             background: #eee;
  1170.             width: 100%;
  1171.             max-width: 620px;
  1172.             margin: 0 10px;
  1173.             padding: 25px 15px 10px;
  1174.             text-align: center;
  1175.         }
  1176.         .freearea-modal-inner-wrap {
  1177.             margin: 20px 0 35px;
  1178.         }
  1179.         .freearea-modal-close-wrap {
  1180.             text-align: right;
  1181.         }
  1182.         .freearea-modal-close {
  1183.             background: #DE5D50;
  1184.             border: none;
  1185.             border-radius: 3px;
  1186.         }
  1187.     </style>
  1188. {% endblock %}
  1189. {% block javascript %}
  1190.     <script>
  1191.         eccube.classCategories = {{ class_categories_as_json(Product)|raw }};
  1192.         // 規格2に選択肢を割り当てる。
  1193.         function fnSetClassCategories(form, classcat_id2_selected) {
  1194.             var \$form = \$(form);
  1195.             var product_id = \$form.find('input[name=product_id]').val();
  1196.             var \$sele1 = \$form.find('select[name=classcategory_id1]');
  1197.             var \$sele2 = \$form.find('select[name=classcategory_id2]');
  1198.             eccube.setClassCategories(\$form, product_id, \$sele1, \$sele2, classcat_id2_selected);
  1199.         }
  1200.         {% if form.classcategory_id2 is defined %}
  1201.         fnSetClassCategories(
  1202.             \$('#form1'), {{ form.classcategory_id2.vars.value|json_encode|raw }}
  1203.         );
  1204.         {% elseif form.classcategory_id1 is defined %}
  1205.         eccube.checkStock(\$('#form1'), {{ Product.id }}, {{ form.classcategory_id1.vars.value|json_encode|raw }}, null);
  1206.         {% endif %}
  1207.     </script>
  1208.     <script>
  1209.         \$(function() {
  1210.             // bfcache無効化
  1211.             \$(window).bind('pageshow', function(event) {
  1212.                 if (event.originalEvent.persisted) {
  1213.                     location.reload(true);
  1214.                 }
  1215.             });
  1216.             \$('.item_visual').slick({
  1217.                 dots: false,
  1218.                 arrows: false,
  1219.                 responsive: [{
  1220.                     breakpoint: 768,
  1221.                     settings: {
  1222.                         dots: true
  1223.                     }
  1224.                 }]
  1225.             });
  1226.             \$('.slideThumb').on('click', function() {
  1227.                 var index = \$(this).attr('data-index');
  1228.                 \$('.item_visual').slick('slickGoTo', index, false);
  1229.             })
  1230.         });
  1231.     </script>
  1232.     <script>
  1233.         \$(function() {
  1234.             \$('.add-cart').on('click', function(event) {
  1235.                 {% if form.classcategory_id1 is defined %}
  1236.                 // 規格1フォームの必須チェック
  1237.                 if (\$('#classcategory_id1').val() == '__unselected' || \$('#classcategory_id1').val() == '') {
  1238.                     \$('#classcategory_id1')[0].setCustomValidity('{{ '項目が選択されていません'|trans }}');
  1239.                     return true;
  1240.                 } else {
  1241.                     \$('#classcategory_id1')[0].setCustomValidity('');
  1242.                 }
  1243.                 {% endif %}
  1244.                 {% if form.classcategory_id2 is defined %}
  1245.                 // 規格2フォームの必須チェック
  1246.                 if (\$('#classcategory_id2').val() == '__unselected' || \$('#classcategory_id2').val() == '') {
  1247.                     \$('#classcategory_id2')[0].setCustomValidity('{{ '項目が選択されていません'|trans }}');
  1248.                     return true;
  1249.                 } else {
  1250.                     \$('#classcategory_id2')[0].setCustomValidity('');
  1251.                 }
  1252.                 {% endif %}
  1253.                 // 個数フォームのチェック
  1254.                 if (\$('#quantity').val() < 1) {
  1255.                     \$('#quantity')[0].setCustomValidity('{{ '1以上で入力してください。'|trans }}');
  1256.                     return true;
  1257.                 } else {
  1258.                     \$('#quantity')[0].setCustomValidity('');
  1259.                 }
  1260.                 event.preventDefault();
  1261.                 \$form = \$('#form1');
  1262.                 \$.ajax({
  1263.                     url: \$form.attr('action'),
  1264.                     type: \$form.attr('method'),
  1265.                     data: \$form.serialize(),
  1266.                     dataType: 'json',
  1267.                     beforeSend: function(xhr, settings) {
  1268.                         // Buttonを無効にする
  1269.                         \$('.add-cart').prop('disabled', true);
  1270.                     }
  1271.                 }).done(function(data) {
  1272.                     // レスポンス内のメッセージをalertで表示
  1273.                     \$.each(data.messages, function() {
  1274.                         \$('#ec-modal-header').html(this);
  1275.                     });
  1276.                     \$('.ec-modal').show()
  1277.                     // カートブロックを更新する
  1278.                     \$.ajax({
  1279.                         url: \"{{ url('block_cart') }}\",
  1280.                         type: 'GET',
  1281.                         dataType: 'html'
  1282.                     }).done(function(html) {
  1283.                         \$('.ec-headerRole__cart').html(html);
  1284.                     });
  1285.                 }).fail(function(data) {
  1286.                     alert('{{ 'カートへの追加に失敗しました。'|trans }}');
  1287.                 }).always(function(data) {
  1288.                     // Buttonを有効にする
  1289.                     \$('.add-cart').prop('disabled', false);
  1290.                 });
  1291.             });
  1292.         });
  1293.         \$('.ec-modal-wrap').on('click', function(e) {
  1294.             // モーダル内の処理は外側にバブリングさせない
  1295.             e.stopPropagation();
  1296.         });
  1297.         \$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
  1298.             \$('.ec-modal').hide()
  1299.         });
  1300.         window.addEventListener('DOMContentLoaded', () =>
  1301.         {
  1302.             const modalWrap = document.querySelector('.freearea-modal-wrap')
  1303.             if(modalWrap) {
  1304.                 const closeModalButton = document.querySelector('.freearea-modal-close')
  1305.                 closeModalButton.addEventListener('click', () => modalWrap.remove())
  1306.             }
  1307.         })
  1308.     </script>
  1309.     <script type=\"application/ld+json\">
  1310.     {
  1311.         \"@context\": \"https://schema.org/\",
  1312.         \"@type\": \"Product\",
  1313.         \"name\": \"{{ Product.name }}\",
  1314.         \"image\": [
  1315.             {% for img in Product.ProductImage %}
  1316.                 \"{{ app.request.schemeAndHttpHost }}{{ asset(img, 'save_image') }}\"{% if not loop.last %},{% endif %}
  1317.             {% else %}
  1318.                 \"{{ app.request.schemeAndHttpHost }}{{ asset(''|no_image_product, 'save_image') }}\"
  1319.             {% endfor %}
  1320.         ],
  1321.         \"description\": \"{{ Product.description_list | default(Product.description_detail) | replace({'\\n': '', '\\r': ''}) | slice(0,300) }}\",
  1322.         {% if Product.code_min %}
  1323.         \"sku\": \"{{ Product.code_min }}\",
  1324.         {% endif %}
  1325.         \"offers\": {
  1326.             \"@type\": \"Offer\",
  1327.             \"url\": \"{{ url('product_detail', {'id': Product.id}) }}\",
  1328.             \"priceCurrency\": \"{{ eccube_config.currency }}\",
  1329.             \"price\": {{ Product.getPrice02IncTaxMin }},
  1330.             \"availability\": \"{{ Product.stock_find ? \"InStock\" : \"OutOfStock\" }}\"
  1331.         }
  1332.     }
  1333.     </script>
  1334. {% endblock %}
  1335. {% block main %}
  1336.     <div class=\"ec-productRole\">
  1337.         <div class=\"ec-grid2\">
  1338.             <div class=\"ec-grid2__cell\">
  1339.                 <div class=\"ec-sliderItemRole\">
  1340.                     <div class=\"item_visual\">
  1341.                         {% for ProductImage in Product.ProductImage %}
  1342.                             <div class=\"slide-item\"><img src=\"{{ asset(ProductImage, 'save_image') }}\" alt=\"{{ loop.first ? Product.name : '' }}\"></div>
  1343.                         {% else %}
  1344.                             <div class=\"slide-item\"><img src=\"{{ asset(''|no_image_product, 'save_image') }}\" alt=\"{{ loop.first ? Product.name : '' }}\" /></div>
  1345.                         {% endfor %}
  1346.                     </div>
  1347.                     <div class=\"item_nav\">
  1348.                         {% for ProductImage in Product.ProductImage %}
  1349.                             <div class=\"slideThumb\" data-index=\"{{ loop.index0 }}\"><img src=\"{{ asset(ProductImage, 'save_image') }}\" alt=\"\"></div>
  1350.                         {% endfor %}
  1351.                     </div>
  1352.                 </div>
  1353.             </div>
  1354.             <div class=\"ec-grid2__cell\">
  1355.                 <div class=\"ec-productRole__profile\">
  1356.                     {# 商品名 #}
  1357.                     <div class=\"ec-productRole__title\">
  1358.                         <h2 class=\"ec-headingTitle\">{{ Product.name }}</h2>
  1359.                     </div>
  1360.                     {# タグ #}
  1361.                     <ul class=\"ec-productRole__tags\">
  1362.                         {% for Tag in Product.Tags %}
  1363.                             <li class=\"ec-productRole__tag tag_{{ Tag.id }}\">{{ Tag }}</li>
  1364.                         {% endfor %}
  1365.                     </ul>
  1366.                     {# 通常価格 #}
  1367.                     {% if Product.hasProductClass -%}
  1368.                         <div class=\"ec-productRole__priceRegular\">
  1369.                             {% if Product.getPrice01Min is not null and Product.getPrice01IncTaxMin == Product.getPrice01IncTaxMax %}
  1370.                                 <span class=\"f-small\">寄付金額</span>
  1371.                                 <span class=\"ec-productRole__priceRegularPrice\">{{ '通常価格'|trans }}:<span class=\"price01-default\">{{ Product.getPrice01IncTaxMin|number_format }}</span></span>
  1372.                                 {# <span class=\"ec-productRole__priceRegularTax\">{{ '税込'|trans }}</span> #}
  1373.                             {% elseif Product.getPrice01Min is not null and Product.getPrice01Max is not null %}
  1374.                                 <span class=\"f-small\">寄付金額</span>
  1375.                                 <span class=\"ec-productRole__priceRegularPrice\">{{ '通常価格'|trans }}:<span class=\"price01-default\">{{ Product.getPrice01IncTaxMin|number_format }}~ {{ Product.getPrice01IncTaxMax|number_format }}</span></span>
  1376.                                 {# <span class=\"ec-productRole__priceRegularTax\">{{ '税込'|trans }}</span> #}
  1377.                             {% endif %}
  1378.                         </div>
  1379.                     {% else %}
  1380.                         {# {% if Product.getPrice01Max is not null %}
  1381.                             <span class=\"ec-productRole__priceRegularPrice\">{{ '通常価格'|trans }}:{{ Product.getPrice01IncTaxMin|number_format }}</span>
  1382.                             <span class=\"ec-productRole__priceRegularTax\">{{ '税込'|trans }}</span>
  1383.                         {% endif %} #}
  1384.                     {% endif %}
  1385.                     {# 販売価格 #}
  1386.                     <div class=\"ec-productRole__price\">
  1387.                         {% if Product.hasProductClass -%}
  1388.                             {% if Product.getPrice02IncTaxMin == Product.getPrice02IncTaxMax %}
  1389.                                 <div class=\"ec-price\">
  1390.                                     <span class=\"f-small\">寄付金額</span>
  1391.                                     <span class=\"ec-price__price price02-default\">{{ Product.getPrice02IncTaxMin|number_format }}円</span>
  1392.                                     {# <span class=\"ec-price__tax\">{{ '税込'|trans }}</span> #}
  1393.                                 </div>
  1394.                             {% else %}
  1395.                                 <div class=\"ec-price\">
  1396.                                     <span class=\"f-small\">寄付金額</span>
  1397.                                     <span class=\"ec-price__price price02-default\">{{ Product.getPrice02IncTaxMin|number_format }} ~ {{ Product.getPrice02IncTaxMax|number_format }}円</span>
  1398.                                     {# <span class=\"ec-price__tax\">{{ '税込'|trans }}</span> #}
  1399.                                 </div>
  1400.                             {% endif %}
  1401.                         {% else %}
  1402.                             <div class=\"ec-price\">
  1403.                                 <span class=\"f-small\">寄付金額</span>
  1404.                                 <span class=\"ec-price__price\">{{ Product.getPrice02IncTaxMin|number_format }}円</span>
  1405.                                 {# <span class=\"ec-price__tax\">{{ '税込'|trans }}</span> #}
  1406.                             </div>
  1407.                         {% endif %}
  1408.                     </div>
  1409.                     {# 商品コード #}
  1410.                     {% if Product.code_min is not empty %}
  1411.                         <div class=\"ec-productRole__code\">
  1412.                             {{ '商品コード'|trans }}: <span class=\"product-code-default\">{{ Product.code_min }}{% if Product.code_min != Product.code_max %} ~ {{ Product.code_max }}{% endif %}</span>
  1413.                         </div>
  1414.                     {% endif %}
  1415.                     {# 関連カテゴリ #}
  1416.                     {% if Product.ProductCategories is not empty %}
  1417.                         <div class=\"ec-productRole__category\">
  1418.                             <div>{{ '関連カテゴリ'|trans }}</div>
  1419.                             {% for ProductCategory in Product.ProductCategories %}
  1420.                                 <ul>
  1421.                                     <li>
  1422.                                         {% for Category in ProductCategory.Category.path %}
  1423.                                             <a href=\"{{ url('product_list') }}?category_id={{ Category.id }}\">{{ Category.name }}</a> {%- if loop.last == false %}
  1424.                                             <span>></span>{% endif -%}
  1425.                                         {% endfor %}
  1426.                                     </li>
  1427.                                 </ul>
  1428.                             {% endfor %}
  1429.                         </div>
  1430.                     {% endif %}
  1431.                     <form action=\"{{ url('product_add_cart', {id:Product.id}) }}\" method=\"post\" id=\"form1\" name=\"form1\">
  1432.                         {% if Product.stock_find %}
  1433.                             <div class=\"ec-productRole__actions\">
  1434.                                 {% if form.classcategory_id1 is defined %}
  1435.                                     <div class=\"ec-select\">
  1436.                                         {{ form_widget(form.classcategory_id1) }}
  1437.                                         {{ form_errors(form.classcategory_id1) }}
  1438.                                     </div>
  1439.                                     {% if form.classcategory_id2 is defined %}
  1440.                                         <div class=\"ec-select\">
  1441.                                             {{ form_widget(form.classcategory_id2) }}
  1442.                                             {{ form_errors(form.classcategory_id2) }}
  1443.                                         </div>
  1444.                                     {% endif %}
  1445.                                 {% endif %}
  1446.                                 <div class=\"ec-numberInput\"><span>{{ '数量'|trans }}</span>
  1447.                                     {{ form_widget(form.quantity) }}
  1448.                                     {{ form_errors(form.quantity) }}
  1449.                                 </div>
  1450.                             </div>
  1451.                             {% set now_date = 'now'|date('Y/m/d') %}
  1452.                             {% set set_period = Product.period_range %}
  1453.                             {% if set_period is not null %}
  1454.                                 {% set expiration_date = now_date|date_modify('+' ~ set_period ~ ' months -1 day') %}
  1455.                                 {% set year = (set_period / 12)|round(0, 'floor') %}
  1456.                                 {% set month = set_period % 12 %}
  1457.                                 <div>有効期限:寄付完了日から<span style=\"color: #DE5D50;\">{% if year > 0 %}{{ year }}年{% endif %}{% if month > 0 %}{{ month }}ヶ月{% endif %}</span></div>
  1458.                                 <div>本日付で寄付された場合の有効期限は<span style=\"color: #DE5D50;\">{{ expiration_date|date('Y/m/d') }}</span>までとなります。</div>
  1459.                             {% endif %}
  1460.                             <div class=\"ec-productRole__btn\">
  1461.                                 <button type=\"submit\" class=\"ec-blockBtn--action add-cart\">
  1462.                                     {{ 'カートに入れる'|trans }}
  1463.                                 </button>
  1464.                             </div>
  1465.                         {% else %}
  1466.                             <div class=\"ec-productRole__btn\">
  1467.                                 <button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
  1468.                                     {{ 'ただいま品切れ中です。'|trans }}
  1469.                                 </button>
  1470.                             </div>
  1471.                         {% endif %}
  1472.                         {{ form_rest(form) }}
  1473.                     </form>
  1474.                     <div class=\"ec-modal\">
  1475.                         <div class=\"ec-modal-overlay\">
  1476.                             <div class=\"ec-modal-wrap\">
  1477.                                 <span class=\"ec-modal-close\"><span class=\"ec-icon\"><img src=\"{{ asset('assets/icon/cross-dark.svg') }}\" alt=\"\"/></span></span>
  1478.                                 <div id=\"ec-modal-header\" class=\"text-center\">{{ 'カートに追加しました。'|trans }}</div>
  1479.                                 <div class=\"ec-modal-box\">
  1480.                                     <div class=\"ec-role\">
  1481.                                         <span class=\"ec-inlineBtn--cancel\">{{ 'お買い物を続ける'|trans }}</span>
  1482.                                         <a href=\"{{ url('cart') }}\" class=\"ec-inlineBtn--action\">{{ 'カートへ進む'|trans }}</a>
  1483.                                     </div>
  1484.                                 </div>
  1485.                             </div>
  1486.                         </div>
  1487.                     </div>
  1488.                     {% if BaseInfo.option_favorite_product %}
  1489.                         <form action=\"{{ url('product_add_favorite', {id:Product.id}) }}\" method=\"post\">
  1490.                             <div class=\"ec-productRole__btn\">
  1491.                                 {% if is_favorite == false %}
  1492.                                     <button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel\">
  1493.                                         {{ 'お気に入りに追加'|trans }}
  1494.                                     </button>
  1495.                                 {% else %}
  1496.                                     <button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel\"
  1497.                                             disabled=\"disabled\">{{ 'お気に入りに追加済です。'|trans }}
  1498.                                     </button>
  1499.                                 {% endif %}
  1500.                             </div>
  1501.                         </form>
  1502.                     {% endif %}
  1503.                     <div class=\"ec-productRole__description\">
  1504.                         {{ Product.description_detail|raw|nl2br }}
  1505.                     </div>
  1506.                 </div>
  1507.             </div>
  1508.         </div>
  1509.         {% if Product.freearea %}
  1510.             <div class=\"freearea-modal-wrap\">
  1511.                 <div class=\"freearea-modal-overlay\">
  1512.                     <div class=\"freearea-modal-layer-mask\"></div>
  1513.                     <div class=\"freearea-modal-cont\">
  1514.                         <div class=\"freearea-modal-inner-wrap\">
  1515.                             {{ include(template_from_string(Product.freearea)) }}
  1516.                         </div>
  1517.                         <div class=\"freearea-modal-close-wrap\">
  1518.                             <button class=\"freearea-modal-close ec-inlineBtn--action\">確認</button>
  1519.                         </div>
  1520.                     </div>
  1521.                 </div>
  1522.             </div>
  1523.         {% endif %}
  1524.     </div>
  1525. {% endblock %}""Product/detail.twig""/home/cajiya/fjdksla.com/public_html/cocofuru.fjdksla.com/src/Eccube/Resource/template/default/Product/detail.twig");
  1526.     }
  1527. }