<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* Product/detail.twig */
class __TwigTemplate_f8323847ccbfc05f7213b846afe26efc extends \Eccube\Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'javascript' => [$this, 'block_javascript'],
'main' => [$this, 'block_main'],
];
$this->sandbox = $this->env->getExtension('\Twig\Extension\SandboxExtension');
$this->checkSecurity();
}
protected function doGetParent(array $context)
{
// line 11
return "default_frame.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Product/detail.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Product/detail.twig"));
// line 13
$context["body_class"] = "product_page";
// line 11
$this->parent = $this->loadTemplate("default_frame.twig", "Product/detail.twig", 11);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 15
public function block_javascript($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascript"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascript"));
// line 16
echo " <script>
eccube.classCategories = ";
// line 17
echo $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getClassCategoriesAsJson($this->sandbox->ensureToStringAllowed((isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 17, $this->source); })()), 17, $this->source));
echo ";
// 規格2に選択肢を割り当てる。
function fnSetClassCategories(form, classcat_id2_selected) {
var \$form = \$(form);
var product_id = \$form.find('input[name=product_id]').val();
var \$sele1 = \$form.find('select[name=classcategory_id1]');
var \$sele2 = \$form.find('select[name=classcategory_id2]');
eccube.setClassCategories(\$form, product_id, \$sele1, \$sele2, classcat_id2_selected);
}
";
// line 28
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id2", [], "any", true, true, true, 28)) {
// line 29
echo " fnSetClassCategories(
\$('#form1'), ";
// line 30
echo json_encode($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, 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.', 30, $this->source); })()), "classcategory_id2", [], "any", false, false, true, 30), "vars", [], "any", false, false, true, 30), "value", [], "any", false, false, true, 30), 30, $this->source));
echo "
);
";
} elseif (twig_get_attribute($this->env, $this->source, // line 32
($context["form"] ?? null), "classcategory_id1", [], "any", true, true, true, 32)) {
// line 33
echo " eccube.checkStock(\$('#form1'), ";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 33, $this->source); })()), "id", [], "any", false, false, true, 33), 33, $this->source), "html", null, true);
echo ", ";
echo json_encode($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, 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.', 33, $this->source); })()), "classcategory_id1", [], "any", false, false, true, 33), "vars", [], "any", false, false, true, 33), "value", [], "any", false, false, true, 33), 33, $this->source));
echo ", null);
";
}
// line 35
echo " </script>
<script>
\$(function() {
// bfcache無効化
\$(window).bind('pageshow', function(event) {
if (event.originalEvent.persisted) {
location.reload(true);
}
});
// Core Web Vital の Cumulative Layout Shift(CLS)対策のため
// img タグに width, height が付与されている.
// 630px 未満の画面サイズでは縦横比が壊れるための対策
// see https://github.com/EC-CUBE/ec-cube/pull/5023
\$('.product-slider').hide();
var removeSize = function () {
\$('.product-slide-item').height('');
\$('.product-slide-item img')
.removeAttr('width')
.removeAttr('height')
.removeAttr('style');
};
var slickInitial = function(slick) {
\$('.product-slider').fadeIn(1500);
var baseHeight = \$(slick.target).height();
var baseWidth = \$(slick.target).width();
var rate = baseWidth / baseHeight;
\$('.product-slide-item').height(baseHeight * rate); // 余白を削除する
// transform を使用することでCLSの影響を受けないようにする
\$('.product-slide-item img')
.css(
{
'transform-origin': 'top left',
'transform': 'scaleY(' + rate + ')',
'transition': 'transform .1s'
}
);
// 正しいサイズに近くなったら属性を解除する
setTimeout(removeSize, 500);
};
\$('.product-slide').on('init', slickInitial);
// リサイズ時は CLS の影響を受けないため属性を解除する
\$(window).resize(removeSize);
\$('.product-slide').slick({
dots: false,
arrows: false,
responsive: [{
breakpoint: 769,
settings: {
dots: true
}
}],
});
let switchThumb = function(index) {
\$('.product-thumb-item').removeClass('is-active');
\$('.product-thumb-item').each(function() {
let targetIndex = \$(this).data('index');
if(index == targetIndex) {
\$(this).addClass('is-active');
}
})
}
\$('.product-slide').on('afterChange', function(event, slick, direction) {
switchThumb(direction);
})
\$('.product-thumb-item').eq(0).addClass('is-active');
\$('.product-thumb-item').on('click', function() {
var index = \$(this).attr('data-index');
\$('.product-slide').slick('slickGoTo', index, false);
\$('.product-thumb-item').removeClass('is-active');
\$(this).addClass('is-active');
})
});
</script>
<script>
\$(function() {
\$('.add-cart').on('click', function(event) {
";
// line 116
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id1", [], "any", true, true, true, 116)) {
// line 117
echo " // 規格1フォームの必須チェック
if (\$('#classcategory_id1').val() == '__unselected' || \$('#classcategory_id1').val() == '') {
\$('#classcategory_id1')[0].setCustomValidity('";
// line 119
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("項目が選択されていません"), "html", null, true);
echo "');
return true;
} else {
\$('#classcategory_id1')[0].setCustomValidity('');
}
";
}
// line 125
echo "
";
// line 126
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id2", [], "any", true, true, true, 126)) {
// line 127
echo " // 規格2フォームの必須チェック
if (\$('#classcategory_id2').val() == '__unselected' || \$('#classcategory_id2').val() == '') {
\$('#classcategory_id2')[0].setCustomValidity('";
// line 129
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("項目が選択されていません"), "html", null, true);
echo "');
return true;
} else {
\$('#classcategory_id2')[0].setCustomValidity('');
}
";
}
// line 135
echo "
// 個数フォームのチェック
if (\$('#quantity').val() < 1) {
\$('#quantity')[0].setCustomValidity('";
// line 138
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("1以上で入力してください。"), "html", null, true);
echo "');
return true;
} else {
\$('#quantity')[0].setCustomValidity('');
}
event.preventDefault();
\$form = \$('#form1');
\$.ajax({
url: \$form.attr('action'),
type: \$form.attr('method'),
data: \$form.serialize(),
dataType: 'json',
beforeSend: function(xhr, settings) {
// Buttonを無効にする
\$('.add-cart').prop('disabled', true);
}
}).done(function(data) {
// レスポンス内のメッセージをalertで表示
\$.each(data.messages, function() {
\$('#ec-modal-header').text(this);
});
\$('.ec-modal').show()
// カートブロックを更新する
\$.ajax({
url: \"";
// line 165
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("block_cart");
echo "\",
type: 'GET',
dataType: 'html'
}).done(function(html) {
\$('.ec-headerRole__cart').html(html);
});
}).fail(function(data) {
alert('";
// line 172
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへの追加に失敗しました。"), "html", null, true);
echo "');
}).always(function(data) {
// Buttonを有効にする
\$('.add-cart').prop('disabled', false);
});
});
});
\$('.ec-modal-wrap').on('click', function(e) {
// モーダル内の処理は外側にバブリングさせない
e.stopPropagation();
});
\$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .modal-button-cancel').on('click', function() {
\$('.ec-modal').hide()
});
</script>
<script type=\"application/ld+json\">
{
\"@context\": \"https://schema.org/\",
\"@type\": \"Product\",
\"name\": \"";
// line 192
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 192, $this->source); })()), "name", [], "any", false, false, true, 192), 192, $this->source), "html", null, true);
echo "\",
\"image\": [
";
// line 194
$context['_parent'] = $context;
$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.', 194, $this->source); })()), "ProductImage", [], "any", false, false, true, 194));
$context['_iterated'] = false;
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["img"]) {
// line 195
echo " \"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 195, $this->source); })()), "request", [], "any", false, false, true, 195), "schemeAndHttpHost", [], "any", false, false, true, 195), 195, $this->source), "html", null, true);
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->sandbox->ensureToStringAllowed($context["img"], 195, $this->source), "save_image"), "html", null, true);
echo "\"";
if ( !twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, true, 195)) {
echo ",";
}
// line 196
echo "
";
$context['_iterated'] = true;
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
if (!$context['_iterated']) {
// line 198
echo " \"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_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.', 198, $this->source); })()), "request", [], "any", false, false, true, 198), "schemeAndHttpHost", [], "any", false, false, true, 198), 198, $this->source), "html", null, true);
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->extensions['Eccube\Twig\Extension\EccubeExtension']->getNoImageProduct(""), "save_image"), "html", null, true);
echo "\"
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['img'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 200
echo " ],
\"description\": \"";
// line 201
echo twig_escape_filter($this->env, twig_slice($this->env, twig_replace_filter(((twig_get_attribute($this->env, $this->source, ($context["Product"] ?? null), "description_list", [], "any", true, true, true, 201)) ? (_twig_default_filter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, ($context["Product"] ?? null), "description_list", [], "any", false, false, true, 201), 201, $this->source), $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 201, $this->source); })()), "description_detail", [], "any", false, false, true, 201), 201, $this->source))) : (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.', 201, $this->source); })()), "description_detail", [], "any", false, false, true, 201))), ["
" => "", "
" => ""]), 0, 300), "html", null, true);
echo "\",
";
// line 202
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.', 202, $this->source); })()), "code_min", [], "any", false, false, true, 202)) {
// line 203
echo " \"sku\": \"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 203, $this->source); })()), "code_min", [], "any", false, false, true, 203), 203, $this->source), "html", null, true);
echo "\",
";
}
// line 205
echo " \"offers\": {
\"@type\": \"Offer\",
\"url\": \"";
// line 207
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.', 207, $this->source); })()), "id", [], "any", false, false, true, 207)]), "html", null, true);
echo "\",
\"priceCurrency\": \"";
// line 208
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_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.', 208, $this->source); })()), "currency", [], "any", false, false, true, 208), 208, $this->source), "html", null, true);
echo "\",
\"price\": ";
// line 209
((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.', 209, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, true, 209)) ? (print (twig_escape_filter($this->env, 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.', 209, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, true, 209), "html", null, true))) : (print (0)));
echo ",
\"availability\": \"";
// line 210
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.', 210, $this->source); })()), "stock_find", [], "any", false, false, true, 210)) ? ("InStock") : ("OutOfStock"));
echo "\"
}
}
</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 216
public function block_main($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "main"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "main"));
// line 217
echo " <section class=\"p-lower-mv\">
<div class=\"inner\">
<div class=\"under bread_wrap\">
<ol itemscope itemtype=\"https://schema.org/BreadcrumbList\">
<li itemprop=\"itemListElement\" itemscope itemtype=\"https://schema.org/ListItem\">
<a itemprop=\"item\" href=\"";
// line 222
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("homepage");
echo "\">
<span class=\"freight-neo-pro\" itemprop=\"name\">TOP</span>
</a>
<meta itemprop=\"position\" content=\"1\" />
</li>
<li itemprop=\"itemListElement\" itemscope itemtype=\"https://schema.org/ListItem\">
<a itemprop=\"item\" href=\"";
// line 228
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
echo "\">
<span class=\"freight-neo-pro\" itemprop=\"name\">商品一覧</span>
</a>
<meta itemprop=\"position\" content=\"2\" />
</li>
<li itemprop=\"itemListElement\" itemscope itemtype=\"https://schema.org/ListItem\">
<a itemprop=\"item\">
<span class=\"freight-neo-pro\" itemprop=\"name\">";
// line 235
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 235, $this->source); })()), "name", [], "any", false, false, true, 235), 235, $this->source), "html", null, true);
echo "</span>
</a>
<meta itemprop=\"position\" content=\"3\" />
</li>
</ol>
</div>
<!-- /.bread_wrap -->
</div>
</section>
<section class=\"product-detail\">
<div class=\"inner\">
<div class=\"product-detail-wrap\">
<div class=\"product-slider\">
<div class=\"product-slide\">
";
// line 249
$context['_parent'] = $context;
$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.', 249, $this->source); })()), "ProductImage", [], "any", false, false, true, 249));
$context['_iterated'] = false;
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["ProductImage"]) {
// line 250
echo " <div class=\"product-slide-item\"><img src=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->sandbox->ensureToStringAllowed($context["ProductImage"], 250, $this->source), "save_image"), "html", null, true);
echo "\" alt=\"";
((twig_get_attribute($this->env, $this->source, $context["loop"], "first", [], "any", false, false, true, 250)) ? (print (twig_escape_filter($this->env, 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.', 250, $this->source); })()), "name", [], "any", false, false, true, 250), "html", null, true))) : (print ("")));
echo "\" width=\"550\" height=\"550\"";
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, true, 250) > 1)) {
echo " loading=\"lazy\"";
}
echo "></div>
";
$context['_iterated'] = true;
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
if (!$context['_iterated']) {
// line 252
echo " <div class=\"product-slide-item\"><img src=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->extensions['Eccube\Twig\Extension\EccubeExtension']->getNoImageProduct(""), "save_image"), "html", null, true);
echo "\" alt=\"";
((twig_get_attribute($this->env, $this->source, $context["loop"], "first", [], "any", false, false, true, 252)) ? (print (twig_escape_filter($this->env, 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.', 252, $this->source); })()), "name", [], "any", false, false, true, 252), "html", null, true))) : (print ("")));
echo "\" width=\"550\" height=\"550\"></div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ProductImage'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 254
echo " </div>
<div class=\"product-thumb\">
";
// line 256
$context['_parent'] = $context;
$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.', 256, $this->source); })()), "ProductImage", [], "any", false, false, true, 256));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["ProductImage"]) {
// line 257
echo " ";
// line 261
echo " <div class=\"product-thumb-item\" data-index=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["loop"], "index0", [], "any", false, false, true, 261), 261, $this->source), "html", null, true);
echo "\">
<img src=\"";
// line 262
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->sandbox->ensureToStringAllowed($context["ProductImage"], 262, $this->source), "save_image"), "html", null, true);
echo "\" alt=\"\" width=\"133\" height=\"133\" loading=\"lazy\">
</div>
";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ProductImage'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 265
echo " </div>
</div>
<div class=\"product-info\">
";
// line 269
echo " <h2 class=\"product-name\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 269, $this->source); })()), "name", [], "any", false, false, true, 269), 269, $this->source), "html", null, true);
echo "</h2>
";
// line 271
echo " <!-- <ul class=\"ec-productRole__tags\">
";
// line 272
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 272, $this->source); })()), "Tags", [], "any", false, false, true, 272));
foreach ($context['_seq'] as $context["_key"] => $context["Tag"]) {
// line 273
echo " <li class=\"ec-productRole__tag tag_";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Tag"], "id", [], "any", false, false, true, 273), 273, $this->source), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed($context["Tag"], 273, $this->source), "html", null, true);
echo "</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Tag'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 275
echo " </ul> -->
";
// line 277
echo " ";
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.', 277, $this->source); })()), "freearea", [], "any", false, false, true, 277)) {
// line 278
echo " <p class=\"product-free-text\">";
echo $this->extensions['Eccube\Twig\Extension\IgnoreTwigSandboxErrorExtension']->twig_include($this->env, $context, twig_template_from_string($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 278, $this->source); })()), "freearea", [], "any", false, false, true, 278), 278, $this->source)), array(), true, false, true);
echo "</p>
";
}
// line 280
echo " ";
// line 281
echo " <div class=\"product-text\">";
echo twig_nl2br($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 281, $this->source); })()), "description_detail", [], "any", false, false, true, 281), 281, $this->source));
echo "</div>
";
// line 283
echo " <div class=\"product-price-wrap\">
";
// line 284
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.', 284, $this->source); })()), "hasProductClass", [], "any", false, false, true, 284)) {
// line 285
echo "<p class=\"product-regular-price\">
";
// line 286
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.', 286, $this->source); })()), "getPrice01Min", [], "any", false, false, true, 286)) && (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.', 286, $this->source); })()), "getPrice01IncTaxMin", [], "any", false, false, true, 286) == 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.', 286, $this->source); })()), "getPrice01IncTaxMax", [], "any", false, false, true, 286)))) {
// line 287
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("通常価格"), "html", null, true);
echo ":<span class=\"price\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 287, $this->source); })()), "getPrice01IncTaxMin", [], "any", false, false, true, 287), 287, $this->source), "html", null, true);
echo "</span><span class=\"tax\">円(税込)</span>
";
} elseif (( !(null === twig_get_attribute($this->env, $this->source, // line 288
(isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 288, $this->source); })()), "getPrice01Min", [], "any", false, false, true, 288)) && !(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.', 288, $this->source); })()), "getPrice01Max", [], "any", false, false, true, 288)))) {
// line 289
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("通常価格"), "html", null, true);
echo ":<span class=\"price\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 289, $this->source); })()), "getPrice01IncTaxMin", [], "any", false, false, true, 289), 289, $this->source), "html", null, true);
echo "~ ";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 289, $this->source); })()), "getPrice01IncTaxMax", [], "any", false, false, true, 289), 289, $this->source), "html", null, true);
echo "</span><span class=\"tax\">円(税込)</span>
";
}
// line 291
echo " </p>
";
} else {
// line 293
echo " ";
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.', 293, $this->source); })()), "getPrice01Max", [], "any", false, false, true, 293))) {
// line 294
echo " <p class=\"product-regular-price\">
";
// line 295
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("通常価格"), "html", null, true);
echo ":<span class=\"price\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 295, $this->source); })()), "getPrice01IncTaxMin", [], "any", false, false, true, 295), 295, $this->source), "html", null, true);
echo "</span><span class=\"tax\">円(税込)</span>
</p>
";
}
// line 298
echo " ";
}
// line 299
echo " ";
// line 300
echo " ";
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); })()), "hasProductClass", [], "any", false, false, true, 300)) {
// line 301
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.', 301, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, true, 301) == twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 301, $this->source); })()), "getPrice02IncTaxMax", [], "any", false, false, true, 301))) {
// line 302
echo " <p class=\"product-price\">
<span class=\"price\">";
// line 303
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 303, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, true, 303), 303, $this->source), "html", null, true);
echo "</span>
<span class=\"tax\">円(税込)</span>
</p>
";
} else {
// line 307
echo " <p class=\"product-price\">
<span class=\"price\">";
// line 308
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 308, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, true, 308), 308, $this->source), "html", null, true);
echo " ~ ";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 308, $this->source); })()), "getPrice02IncTaxMax", [], "any", false, false, true, 308), 308, $this->source), "html", null, true);
echo "</span>
<span class=\"tax\">円(税込)</span>
</p>
";
}
// line 312
echo " ";
} else {
// line 313
echo " <p class=\"product-price\">
<span class=\"price\">";
// line 314
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 314, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, true, 314), 314, $this->source), "html", null, true);
echo "</span>
<span class=\"tax\">円(税込)</span>
</p>
";
}
// line 318
echo " </div>
";
// line 320
echo " ";
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.', 320, $this->source); })()), "code_min", [], "any", false, false, true, 320))) {
// line 321
echo " <!-- <div class=\"ec-productRole__code\">
";
// line 322
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("商品コード"), "html", null, true);
echo ": <span class=\"product-code-default\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 322, $this->source); })()), "code_min", [], "any", false, false, true, 322), 322, $this->source), "html", null, true);
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.', 322, $this->source); })()), "code_min", [], "any", false, false, true, 322) != 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.', 322, $this->source); })()), "code_max", [], "any", false, false, true, 322))) {
echo " ~ ";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 322, $this->source); })()), "code_max", [], "any", false, false, true, 322), 322, $this->source), "html", null, true);
}
echo "</span>
</div> -->
";
}
// line 325
echo " ";
// line 326
echo " ";
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.', 326, $this->source); })()), "ProductCategories", [], "any", false, false, true, 326))) {
// line 327
echo " <!-- <div class=\"ec-productRole__category\">
<div>";
// line 328
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("関連カテゴリ"), "html", null, true);
echo "</div>
";
// line 329
$context['_parent'] = $context;
$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.', 329, $this->source); })()), "ProductCategories", [], "any", false, false, true, 329));
foreach ($context['_seq'] as $context["_key"] => $context["ProductCategory"]) {
// line 330
echo " <ul>
<li>
";
// line 332
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["ProductCategory"], "Category", [], "any", false, false, true, 332), "path", [], "any", false, false, true, 332));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["Category"]) {
// line 333
echo " <a href=\"";
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
echo "?category_id=";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Category"], "id", [], "any", false, false, true, 333), 333, $this->source), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Category"], "name", [], "any", false, false, true, 333), 333, $this->source), "html", null, true);
echo "</a>";
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, true, 333) == false)) {
// line 334
echo " <span>></span>";
}
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Category'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 336
echo " </li>
</ul>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ProductCategory'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 339
echo " </div> -->
";
}
// line 341
echo " <form action=\"";
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.', 341, $this->source); })()), "id", [], "any", false, false, true, 341)]), "html", null, true);
echo "\" method=\"post\" id=\"form1\" name=\"form1\">
<div class=\"product-cart-wrap\">
";
// line 343
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.', 343, $this->source); })()), "stock_find", [], "any", false, false, true, 343)) {
// line 344
echo " <div class=\"product-cart-amount\">
";
// line 345
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id1", [], "any", true, true, true, 345)) {
// line 346
echo " <div class=\"ec-select\">
";
// line 347
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(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.', 347, $this->source); })()), "classcategory_id1", [], "any", false, false, true, 347), 347, $this->source), 'row');
echo "
";
// line 348
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(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.', 348, $this->source); })()), "classcategory_id1", [], "any", false, false, true, 348), 348, $this->source), 'errors');
echo "
</div>
";
// line 350
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id2", [], "any", true, true, true, 350)) {
// line 351
echo " <div class=\"ec-select\">
";
// line 352
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(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.', 352, $this->source); })()), "classcategory_id2", [], "any", false, false, true, 352), 352, $this->source), 'row');
echo "
";
// line 353
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(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.', 353, $this->source); })()), "classcategory_id2", [], "any", false, false, true, 353), 353, $this->source), 'errors');
echo "
</div>
";
}
// line 356
echo " ";
}
// line 357
echo " <div class=\"ec-numberInput\"><span>";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("数量"), "html", null, true);
echo "</span>
";
// line 358
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(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.', 358, $this->source); })()), "quantity", [], "any", false, false, true, 358), 358, $this->source), 'widget');
echo "
";
// line 359
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(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.', 359, $this->source); })()), "quantity", [], "any", false, false, true, 359), 359, $this->source), 'errors');
echo "
</div>
</div>
<button type=\"submit\" class=\"product-cart-button add-cart\">
<span>";
// line 363
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに入れる"), "html", null, true);
echo "</span>
</button>
";
} else {
// line 366
echo " <button type=\"button\" class=\"product-cart-button\" disabled=\"disabled\">
<span>";
// line 367
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ただいま品切れ中です。"), "html", null, true);
echo "</span>
</button>
";
}
// line 370
echo "
";
// line 371
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 371, $this->source); })()), 371, $this->source), 'rest');
echo "
</div>
</form>
<div class=\"ec-modal\">
<div class=\"ec-modal-overlay\">
<div class=\"ec-modal-wrap\">
<span class=\"ec-modal-close\"><span class=\"ec-icon\"><img src=\"";
// line 377
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/icon/cross-dark.svg"), "html", null, true);
echo "\" alt=\"\"/></span></span>
<div id=\"ec-modal-header\" class=\"text-center\">";
// line 378
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに追加しました。"), "html", null, true);
echo "</div>
<div class=\"modal-button-wrap\">
<span class=\"modal-button-cancel\">";
// line 380
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お買い物を続ける"), "html", null, true);
echo "</span>
<div class=\"modal-button-cart\">
<a href=\"";
// line 382
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("cart");
echo "\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへ進む"), "html", null, true);
echo "</a>
</div>
</div>
</div>
</div>
</div>
";
// line 388
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.', 388, $this->source); })()), "option_favorite_product", [], "any", false, false, true, 388)) {
// line 389
echo " <form action=\"";
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.', 389, $this->source); })()), "id", [], "any", false, false, true, 389)]), "html", null, true);
echo "\" method=\"post\">
";
// line 390
if (((isset($context["is_favorite"]) || array_key_exists("is_favorite", $context) ? $context["is_favorite"] : (function () { throw new RuntimeError('Variable "is_favorite" does not exist.', 390, $this->source); })()) == false)) {
// line 391
echo " <button type=\"submit\" id=\"favorite\" class=\"favorite-button\">
<span>";
// line 392
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お気に入りに追加"), "html", null, true);
echo "</span>
</button>
";
} else {
// line 395
echo " <button type=\"submit\" id=\"favorite\" class=\"favorite-button is-active\" disabled=\"disabled\">
<span>";
// line 396
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お気に入りに追加済です。"), "html", null, true);
echo "</span>
</button>
";
}
// line 399
echo " </form>
";
}
// line 401
echo " </div>
</div>
";
// line 403
if ((twig_length_filter($this->env, 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.', 403, $this->source); })()), "ProductSpecs", [], "any", false, false, true, 403)) > 0)) {
// line 404
echo " <dl class=\"product-detail-list\">
";
// line 405
$context['_parent'] = $context;
$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.', 405, $this->source); })()), "ProductSpecs", [], "any", false, false, true, 405));
foreach ($context['_seq'] as $context["_key"] => $context["spec"]) {
// line 406
echo " <dt class=\"product-detail-title\">";
echo twig_nl2br($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["spec"], "title", [], "any", false, false, true, 406), 406, $this->source));
echo "</dt>
<dd class=\"product-detail-desc\">";
// line 407
echo twig_nl2br($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["spec"], "content", [], "any", false, false, true, 407), 407, $this->source));
echo "</dd>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['spec'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 409
echo " </dl>
";
}
// line 411
echo " </div>
</section>
";
// line 413
$this->loadTemplate("Block/recommend_product_block.twig", "Product/detail.twig", 413)->display($context);
// line 414
echo " ";
$this->loadTemplate("Block/recommend_recipe.twig", "Product/detail.twig", 414)->display(twig_array_merge($context, ["Product" => (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 414, $this->source); })()), "recommend_recipe_title" => "この商品を使ったレシピ"]));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "Product/detail.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 957 => 414, 955 => 413, 951 => 411, 947 => 409, 939 => 407, 934 => 406, 930 => 405, 927 => 404, 925 => 403, 921 => 401, 917 => 399, 911 => 396, 908 => 395, 902 => 392, 899 => 391, 897 => 390, 892 => 389, 890 => 388, 879 => 382, 874 => 380, 869 => 378, 865 => 377, 856 => 371, 853 => 370, 847 => 367, 844 => 366, 838 => 363, 831 => 359, 827 => 358, 822 => 357, 819 => 356, 813 => 353, 809 => 352, 806 => 351, 804 => 350, 799 => 348, 795 => 347, 792 => 346, 790 => 345, 787 => 344, 785 => 343, 779 => 341, 775 => 339, 767 => 336, 752 => 334, 743 => 333, 726 => 332, 722 => 330, 718 => 329, 714 => 328, 711 => 327, 708 => 326, 706 => 325, 694 => 322, 691 => 321, 688 => 320, 685 => 318, 678 => 314, 675 => 313, 672 => 312, 663 => 308, 660 => 307, 653 => 303, 650 => 302, 648 => 301, 645 => 300, 643 => 299, 640 => 298, 632 => 295, 629 => 294, 626 => 293, 622 => 291, 612 => 289, 610 => 288, 603 => 287, 601 => 286, 598 => 285, 596 => 284, 593 => 283, 588 => 281, 586 => 280, 580 => 278, 577 => 277, 574 => 275, 563 => 273, 559 => 272, 556 => 271, 551 => 269, 546 => 265, 529 => 262, 524 => 261, 522 => 257, 505 => 256, 501 => 254, 490 => 252, 468 => 250, 450 => 249, 433 => 235, 423 => 228, 414 => 222, 407 => 217, 397 => 216, 382 => 210, 378 => 209, 374 => 208, 370 => 207, 366 => 205, 360 => 203, 358 => 202, 353 => 201, 350 => 200, 340 => 198, 326 => 196, 318 => 195, 300 => 194, 295 => 192, 272 => 172, 262 => 165, 232 => 138, 227 => 135, 218 => 129, 214 => 127, 212 => 126, 209 => 125, 200 => 119, 196 => 117, 194 => 116, 111 => 35, 103 => 33, 101 => 32, 96 => 30, 93 => 29, 91 => 28, 77 => 17, 74 => 16, 64 => 15, 53 => 11, 51 => 13, 38 => 11,);
}
public function getSourceContext()
{
return new Source("{#
This file is part of EC-CUBE
Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
http://www.ec-cube.co.jp/
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
{% extends 'default_frame.twig' %}
{% set body_class = 'product_page' %}
{% block javascript %}
<script>
eccube.classCategories = {{ class_categories_as_json(Product)|raw }};
// 規格2に選択肢を割り当てる。
function fnSetClassCategories(form, classcat_id2_selected) {
var \$form = \$(form);
var product_id = \$form.find('input[name=product_id]').val();
var \$sele1 = \$form.find('select[name=classcategory_id1]');
var \$sele2 = \$form.find('select[name=classcategory_id2]');
eccube.setClassCategories(\$form, product_id, \$sele1, \$sele2, classcat_id2_selected);
}
{% if form.classcategory_id2 is defined %}
fnSetClassCategories(
\$('#form1'), {{ form.classcategory_id2.vars.value|json_encode|raw }}
);
{% elseif form.classcategory_id1 is defined %}
eccube.checkStock(\$('#form1'), {{ Product.id }}, {{ form.classcategory_id1.vars.value|json_encode|raw }}, null);
{% endif %}
</script>
<script>
\$(function() {
// bfcache無効化
\$(window).bind('pageshow', function(event) {
if (event.originalEvent.persisted) {
location.reload(true);
}
});
// Core Web Vital の Cumulative Layout Shift(CLS)対策のため
// img タグに width, height が付与されている.
// 630px 未満の画面サイズでは縦横比が壊れるための対策
// see https://github.com/EC-CUBE/ec-cube/pull/5023
\$('.product-slider').hide();
var removeSize = function () {
\$('.product-slide-item').height('');
\$('.product-slide-item img')
.removeAttr('width')
.removeAttr('height')
.removeAttr('style');
};
var slickInitial = function(slick) {
\$('.product-slider').fadeIn(1500);
var baseHeight = \$(slick.target).height();
var baseWidth = \$(slick.target).width();
var rate = baseWidth / baseHeight;
\$('.product-slide-item').height(baseHeight * rate); // 余白を削除する
// transform を使用することでCLSの影響を受けないようにする
\$('.product-slide-item img')
.css(
{
'transform-origin': 'top left',
'transform': 'scaleY(' + rate + ')',
'transition': 'transform .1s'
}
);
// 正しいサイズに近くなったら属性を解除する
setTimeout(removeSize, 500);
};
\$('.product-slide').on('init', slickInitial);
// リサイズ時は CLS の影響を受けないため属性を解除する
\$(window).resize(removeSize);
\$('.product-slide').slick({
dots: false,
arrows: false,
responsive: [{
breakpoint: 769,
settings: {
dots: true
}
}],
});
let switchThumb = function(index) {
\$('.product-thumb-item').removeClass('is-active');
\$('.product-thumb-item').each(function() {
let targetIndex = \$(this).data('index');
if(index == targetIndex) {
\$(this).addClass('is-active');
}
})
}
\$('.product-slide').on('afterChange', function(event, slick, direction) {
switchThumb(direction);
})
\$('.product-thumb-item').eq(0).addClass('is-active');
\$('.product-thumb-item').on('click', function() {
var index = \$(this).attr('data-index');
\$('.product-slide').slick('slickGoTo', index, false);
\$('.product-thumb-item').removeClass('is-active');
\$(this).addClass('is-active');
})
});
</script>
<script>
\$(function() {
\$('.add-cart').on('click', function(event) {
{% if form.classcategory_id1 is defined %}
// 規格1フォームの必須チェック
if (\$('#classcategory_id1').val() == '__unselected' || \$('#classcategory_id1').val() == '') {
\$('#classcategory_id1')[0].setCustomValidity('{{ '項目が選択されていません'|trans }}');
return true;
} else {
\$('#classcategory_id1')[0].setCustomValidity('');
}
{% endif %}
{% if form.classcategory_id2 is defined %}
// 規格2フォームの必須チェック
if (\$('#classcategory_id2').val() == '__unselected' || \$('#classcategory_id2').val() == '') {
\$('#classcategory_id2')[0].setCustomValidity('{{ '項目が選択されていません'|trans }}');
return true;
} else {
\$('#classcategory_id2')[0].setCustomValidity('');
}
{% endif %}
// 個数フォームのチェック
if (\$('#quantity').val() < 1) {
\$('#quantity')[0].setCustomValidity('{{ '1以上で入力してください。'|trans }}');
return true;
} else {
\$('#quantity')[0].setCustomValidity('');
}
event.preventDefault();
\$form = \$('#form1');
\$.ajax({
url: \$form.attr('action'),
type: \$form.attr('method'),
data: \$form.serialize(),
dataType: 'json',
beforeSend: function(xhr, settings) {
// Buttonを無効にする
\$('.add-cart').prop('disabled', true);
}
}).done(function(data) {
// レスポンス内のメッセージをalertで表示
\$.each(data.messages, function() {
\$('#ec-modal-header').text(this);
});
\$('.ec-modal').show()
// カートブロックを更新する
\$.ajax({
url: \"{{ url('block_cart') }}\",
type: 'GET',
dataType: 'html'
}).done(function(html) {
\$('.ec-headerRole__cart').html(html);
});
}).fail(function(data) {
alert('{{ 'カートへの追加に失敗しました。'|trans }}');
}).always(function(data) {
// Buttonを有効にする
\$('.add-cart').prop('disabled', false);
});
});
});
\$('.ec-modal-wrap').on('click', function(e) {
// モーダル内の処理は外側にバブリングさせない
e.stopPropagation();
});
\$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .modal-button-cancel').on('click', function() {
\$('.ec-modal').hide()
});
</script>
<script type=\"application/ld+json\">
{
\"@context\": \"https://schema.org/\",
\"@type\": \"Product\",
\"name\": \"{{ Product.name }}\",
\"image\": [
{% for img in Product.ProductImage %}
\"{{ app.request.schemeAndHttpHost }}{{ asset(img, 'save_image') }}\"{% if not loop.last %},{% endif %}
{% else %}
\"{{ app.request.schemeAndHttpHost }}{{ asset(''|no_image_product, 'save_image') }}\"
{% endfor %}
],
\"description\": \"{{ Product.description_list | default(Product.description_detail) | replace({'\\n': '', '\\r': ''}) | slice(0,300) }}\",
{% if Product.code_min %}
\"sku\": \"{{ Product.code_min }}\",
{% endif %}
\"offers\": {
\"@type\": \"Offer\",
\"url\": \"{{ url('product_detail', {'id': Product.id}) }}\",
\"priceCurrency\": \"{{ eccube_config.currency }}\",
\"price\": {{ Product.getPrice02IncTaxMin ? Product.getPrice02IncTaxMin : 0}},
\"availability\": \"{{ Product.stock_find ? \"InStock\" : \"OutOfStock\" }}\"
}
}
</script>
{% endblock %}
{% block main %}
<section class=\"p-lower-mv\">
<div class=\"inner\">
<div class=\"under bread_wrap\">
<ol itemscope itemtype=\"https://schema.org/BreadcrumbList\">
<li itemprop=\"itemListElement\" itemscope itemtype=\"https://schema.org/ListItem\">
<a itemprop=\"item\" href=\"{{ url('homepage') }}\">
<span class=\"freight-neo-pro\" itemprop=\"name\">TOP</span>
</a>
<meta itemprop=\"position\" content=\"1\" />
</li>
<li itemprop=\"itemListElement\" itemscope itemtype=\"https://schema.org/ListItem\">
<a itemprop=\"item\" href=\"{{ url('product_list') }}\">
<span class=\"freight-neo-pro\" itemprop=\"name\">商品一覧</span>
</a>
<meta itemprop=\"position\" content=\"2\" />
</li>
<li itemprop=\"itemListElement\" itemscope itemtype=\"https://schema.org/ListItem\">
<a itemprop=\"item\">
<span class=\"freight-neo-pro\" itemprop=\"name\">{{ Product.name }}</span>
</a>
<meta itemprop=\"position\" content=\"3\" />
</li>
</ol>
</div>
<!-- /.bread_wrap -->
</div>
</section>
<section class=\"product-detail\">
<div class=\"inner\">
<div class=\"product-detail-wrap\">
<div class=\"product-slider\">
<div class=\"product-slide\">
{% for ProductImage in Product.ProductImage %}
<div class=\"product-slide-item\"><img src=\"{{ asset(ProductImage, 'save_image') }}\" alt=\"{{ loop.first ? Product.name : '' }}\" width=\"550\" height=\"550\"{% if loop.index > 1 %} loading=\"lazy\"{% endif %}></div>
{% else %}
<div class=\"product-slide-item\"><img src=\"{{ asset(''|no_image_product, 'save_image') }}\" alt=\"{{ loop.first ? Product.name : '' }}\" width=\"550\" height=\"550\"></div>
{% endfor %}
</div>
<div class=\"product-thumb\">
{% for ProductImage in Product.ProductImage %}
{# {% if loop.index0 == 0 %}
<div class=\"product-thumb-item is-active\" data-index=\"{{ loop.index0 }}\"><img src=\"{{ asset(ProductImage, 'save_image') }}\" alt=\"\" width=\"133\" height=\"133\" loading=\"lazy\"></div>
{% else %}
{% endif %} #}
<div class=\"product-thumb-item\" data-index=\"{{ loop.index0 }}\">
<img src=\"{{ asset(ProductImage, 'save_image') }}\" alt=\"\" width=\"133\" height=\"133\" loading=\"lazy\">
</div>
{% endfor %}
</div>
</div>
<div class=\"product-info\">
{# 商品名 #}
<h2 class=\"product-name\">{{ Product.name }}</h2>
{# タグ #}
<!-- <ul class=\"ec-productRole__tags\">
{% for Tag in Product.Tags %}
<li class=\"ec-productRole__tag tag_{{ Tag.id }}\">{{ Tag }}</li>
{% endfor %}
</ul> -->
{# フリーエリア #}
{% if Product.freearea %}
<p class=\"product-free-text\">{{ include(template_from_string(Product.freearea), sandboxed = true) }}</p>
{% endif %}
{# 商品説明 #}
<div class=\"product-text\">{{ Product.description_detail|raw|nl2br }}</div>
{# 通常価格 #}
<div class=\"product-price-wrap\">
{% if Product.hasProductClass -%}
<p class=\"product-regular-price\">
{% if Product.getPrice01Min is not null and Product.getPrice01IncTaxMin == Product.getPrice01IncTaxMax %}
{{ '通常価格'|trans }}:<span class=\"price\">{{ Product.getPrice01IncTaxMin }}</span><span class=\"tax\">円(税込)</span>
{% elseif Product.getPrice01Min is not null and Product.getPrice01Max is not null %}
{{ '通常価格'|trans }}:<span class=\"price\">{{ Product.getPrice01IncTaxMin }}~ {{ Product.getPrice01IncTaxMax }}</span><span class=\"tax\">円(税込)</span>
{% endif %}
</p>
{% else %}
{% if Product.getPrice01Max is not null %}
<p class=\"product-regular-price\">
{{ '通常価格'|trans }}:<span class=\"price\">{{ Product.getPrice01IncTaxMin }}</span><span class=\"tax\">円(税込)</span>
</p>
{% endif %}
{% endif %}
{# 販売価格 #}
{% if Product.hasProductClass -%}
{% if Product.getPrice02IncTaxMin == Product.getPrice02IncTaxMax %}
<p class=\"product-price\">
<span class=\"price\">{{ Product.getPrice02IncTaxMin }}</span>
<span class=\"tax\">円(税込)</span>
</p>
{% else %}
<p class=\"product-price\">
<span class=\"price\">{{ Product.getPrice02IncTaxMin }} ~ {{ Product.getPrice02IncTaxMax }}</span>
<span class=\"tax\">円(税込)</span>
</p>
{% endif %}
{% else %}
<p class=\"product-price\">
<span class=\"price\">{{ Product.getPrice02IncTaxMin }}</span>
<span class=\"tax\">円(税込)</span>
</p>
{% endif %}
</div>
{# 商品コード #}
{% if Product.code_min is not empty %}
<!-- <div class=\"ec-productRole__code\">
{{ '商品コード'|trans }}: <span class=\"product-code-default\">{{ Product.code_min }}{% if Product.code_min != Product.code_max %} ~ {{ Product.code_max }}{% endif %}</span>
</div> -->
{% endif %}
{# 関連カテゴリ #}
{% if Product.ProductCategories is not empty %}
<!-- <div class=\"ec-productRole__category\">
<div>{{ '関連カテゴリ'|trans }}</div>
{% for ProductCategory in Product.ProductCategories %}
<ul>
<li>
{% for Category in ProductCategory.Category.path %}
<a href=\"{{ url('product_list') }}?category_id={{ Category.id }}\">{{ Category.name }}</a> {%- if loop.last == false %}
<span>></span>{% endif -%}
{% endfor %}
</li>
</ul>
{% endfor %}
</div> -->
{% endif %}
<form action=\"{{ url('product_add_cart', {id:Product.id}) }}\" method=\"post\" id=\"form1\" name=\"form1\">
<div class=\"product-cart-wrap\">
{% if Product.stock_find %}
<div class=\"product-cart-amount\">
{% if form.classcategory_id1 is defined %}
<div class=\"ec-select\">
{{ form_row(form.classcategory_id1) }}
{{ form_errors(form.classcategory_id1) }}
</div>
{% if form.classcategory_id2 is defined %}
<div class=\"ec-select\">
{{ form_row(form.classcategory_id2) }}
{{ form_errors(form.classcategory_id2) }}
</div>
{% endif %}
{% endif %}
<div class=\"ec-numberInput\"><span>{{ '数量'|trans }}</span>
{{ form_widget(form.quantity) }}
{{ form_errors(form.quantity) }}
</div>
</div>
<button type=\"submit\" class=\"product-cart-button add-cart\">
<span>{{ 'カートに入れる'|trans }}</span>
</button>
{% else %}
<button type=\"button\" class=\"product-cart-button\" disabled=\"disabled\">
<span>{{ 'ただいま品切れ中です。'|trans }}</span>
</button>
{% endif %}
{{ form_rest(form) }}
</div>
</form>
<div class=\"ec-modal\">
<div class=\"ec-modal-overlay\">
<div class=\"ec-modal-wrap\">
<span class=\"ec-modal-close\"><span class=\"ec-icon\"><img src=\"{{ asset('assets/icon/cross-dark.svg') }}\" alt=\"\"/></span></span>
<div id=\"ec-modal-header\" class=\"text-center\">{{ 'カートに追加しました。'|trans }}</div>
<div class=\"modal-button-wrap\">
<span class=\"modal-button-cancel\">{{ 'お買い物を続ける'|trans }}</span>
<div class=\"modal-button-cart\">
<a href=\"{{ url('cart') }}\">{{ 'カートへ進む'|trans }}</a>
</div>
</div>
</div>
</div>
</div>
{% if BaseInfo.option_favorite_product %}
<form action=\"{{ url('product_add_favorite', {id:Product.id}) }}\" method=\"post\">
{% if is_favorite == false %}
<button type=\"submit\" id=\"favorite\" class=\"favorite-button\">
<span>{{ 'お気に入りに追加'|trans }}</span>
</button>
{% else %}
<button type=\"submit\" id=\"favorite\" class=\"favorite-button is-active\" disabled=\"disabled\">
<span>{{ 'お気に入りに追加済です。'|trans }}</span>
</button>
{% endif %}
</form>
{% endif %}
</div>
</div>
{% if Product.ProductSpecs|length > 0 %}
<dl class=\"product-detail-list\">
{% for spec in Product.ProductSpecs %}
<dt class=\"product-detail-title\">{{ spec.title|raw|nl2br }}</dt>
<dd class=\"product-detail-desc\">{{ spec.content|raw|nl2br }}</dd>
{% endfor %}
</dl>
{% endif %}
</div>
</section>
{% include 'Block/recommend_product_block.twig' %}
{% include 'Block/recommend_recipe.twig' with {'Product': Product, 'recommend_recipe_title': 'この商品を使ったレシピ'} %}
{% endblock %}
", "Product/detail.twig", "/home/hirota-s.com/public_html/app/template/default/Product/detail.twig");
}
public function checkSecurity()
{
static $tags = array("set" => 13, "if" => 28, "for" => 194, "include" => 413);
static $filters = array("raw" => 17, "json_encode" => 30, "escape" => 33, "trans" => 119, "no_image_product" => 198, "slice" => 201, "replace" => 201, "default" => 201, "nl2br" => 281, "length" => 403);
static $functions = array("class_categories_as_json" => 17, "url" => 165, "asset" => 195, "include" => 278, "template_from_string" => 278, "form_row" => 347, "form_errors" => 348, "form_widget" => 358, "form_rest" => 371);
try {
$this->sandbox->checkSecurity(
['set', 'if', 'for', 'include'],
['raw', 'json_encode', 'escape', 'trans', 'no_image_product', 'slice', 'replace', 'default', 'nl2br', 'length'],
['class_categories_as_json', 'url', 'asset', 'include', 'template_from_string', 'form_row', 'form_errors', 'form_widget', 'form_rest']
);
} catch (SecurityError $e) {
$e->setSourceContext($this->source);
if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
$e->setTemplateLine($tags[$e->getTagName()]);
} elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
$e->setTemplateLine($filters[$e->getFilterName()]);
} elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
$e->setTemplateLine($functions[$e->getFunctionName()]);
}
throw $e;
}
}
}