<?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_2af1fa1c38faa3caf96a2f4a5495503e extends \Eccube\Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'stylesheet' => [$this, 'block_stylesheet'],
'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_stylesheet($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", "stylesheet"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheet"));
// line 16
echo " <link rel=\"stylesheet\" href=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/css/productdetail.css", "user_data"), "html", null, true);
echo "\">
<link rel=\"stylesheet\" href=\"";
// line 17
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/css/lightbox.css", "user_data"), "html", null, true);
echo "\">
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 20
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 21
echo " <script>
eccube.classCategories = ";
// line 22
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.', 22, $this->source); })()), 22, $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 31
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id2", [], "any", true, true, true, 31)) {
// line 32
echo " fnSetClassCategories(
\$('#form1'), ";
// line 33
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_id2", [], "any", false, false, true, 33), "vars", [], "any", false, false, true, 33), "value", [], "any", false, false, true, 33), 33, $this->source));
echo "
);
";
} elseif (twig_get_attribute($this->env, $this->source, // line 35
($context["form"] ?? null), "classcategory_id1", [], "any", true, true, true, 35)) {
// line 36
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.', 36, $this->source); })()), "id", [], "any", false, false, true, 36), 36, $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.', 36, $this->source); })()), "classcategory_id1", [], "any", false, false, true, 36), "vars", [], "any", false, false, true, 36), "value", [], "any", false, false, true, 36), 36, $this->source));
echo ", null);
";
}
// line 38
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
//\$('.ec-grid2__cell').hide();
var removeSize = function () {
\$('.slide-item').height('');
\$('.slide-item img')
.removeAttr('width')
.removeAttr('height')
.removeAttr('style');
};
var slickInitial = function(slick) {
var baseHeight = \$(slick.target).height();
var baseWidth = \$(slick.target).width();
var rate = baseWidth / baseHeight;
\$('.slide-item').height(baseHeight * rate); // 余白を削除する
// transform を使用することでCLSの影響を受けないようにする
\$('.slide-item img')
.css(
{
'transform-origin': 'top left',
'transform': 'scaleY(' + rate + ')',
}
);
removeSize();
\$('.ec-grid2__cell').addClass('is_active');
};
\$('.item_visual').on('init', slickInitial);
// リサイズ時は CLS の影響を受けないため属性を解除する
\$(window).resize(removeSize);
\$('.item_visual').slick({
dots: false,
arrows: false,
fade: true,
responsive: [{
breakpoint: 768,
settings: {
arrows: true
}
}]
});
\$('.slideThumb').on('click', function() {
var index = \$(this).attr('data-index');
\$('.item_visual').slick('slickGoTo', index, false);
})
});
</script>
<script>
var scrollPos;
\$(function() {
\$('.add-cart').on('click', function(event) {
";
// line 99
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id1", [], "any", true, true, true, 99)) {
// line 100
echo " // 規格1フォームの必須チェック
if (\$('#classcategory_id1').val() == '__unselected' || \$('#classcategory_id1').val() == '') {
\$('#classcategory_id1')[0].setCustomValidity('";
// line 102
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 108
echo " ";
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id2", [], "any", true, true, true, 108)) {
// line 109
echo " // 規格2フォームの必須チェック
if (\$('#classcategory_id2').val() == '__unselected' || \$('#classcategory_id2').val() == '') {
\$('#classcategory_id2')[0].setCustomValidity('";
// line 111
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 117
echo " // 個数フォームのチェック
if (\$('#quantity').val() < 1) {
\$('#quantity')[0].setCustomValidity('";
// line 119
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()
\$('.ec-modal').fadeIn(800)
scrollPos = \$(window).scrollTop();
\t\t\t \$('body').addClass('have_ec-modal').css('top',-scrollPos + 'px');
// カートブロックを更新する
\$.ajax({
url: \"";
// line 146
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 153
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, .ec-inlineBtn--cancel').on('click', function() {
//\$('.ec-modal').hide()
\$('.ec-modal').fadeOut(800)
\$('body').removeClass('have_ec-modal').css('top',0 + 'px');
\t\t\twindow.scrollTo( 0 , scrollPos );\t\t
});
</script>
<script type=\"application/ld+json\">
{
\"@context\": \"https://schema.org/\",
\"@type\": \"Product\",
\"name\": \"";
// line 175
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.', 175, $this->source); })()), "name", [], "any", false, false, true, 175), 175, $this->source), "html", null, true);
echo "\",
\"image\": [
";
// line 177
$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.', 177, $this->source); })()), "ProductImage", [], "any", false, false, true, 177));
$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 178
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.', 178, $this->source); })()), "request", [], "any", false, false, true, 178), "schemeAndHttpHost", [], "any", false, false, true, 178), 178, $this->source), "html", null, true);
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->sandbox->ensureToStringAllowed($context["img"], 178, $this->source), "save_image"), "html", null, true);
echo "\"";
if ( !twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, true, 178)) {
echo ",";
}
// line 179
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 181
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.', 181, $this->source); })()), "request", [], "any", false, false, true, 181), "schemeAndHttpHost", [], "any", false, false, true, 181), 181, $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 183
echo " ],
\"description\": \"";
// line 184
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, 184)) ? (_twig_default_filter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, ($context["Product"] ?? null), "description_list", [], "any", false, false, true, 184), 184, $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.', 184, $this->source); })()), "description_detail", [], "any", false, false, true, 184), 184, $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.', 184, $this->source); })()), "description_detail", [], "any", false, false, true, 184))), ["
" => "", "
" => ""]), 0, 300), "html", null, true);
echo "\",
";
// line 185
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.', 185, $this->source); })()), "code_min", [], "any", false, false, true, 185)) {
// line 186
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.', 186, $this->source); })()), "code_min", [], "any", false, false, true, 186), 186, $this->source), "html", null, true);
echo "\",
";
}
// line 188
echo " \"offers\": {
\"@type\": \"Offer\",
\"url\": \"";
// line 190
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.', 190, $this->source); })()), "id", [], "any", false, false, true, 190)]), "html", null, true);
echo "\",
\"priceCurrency\": \"";
// line 191
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.', 191, $this->source); })()), "currency", [], "any", false, false, true, 191), 191, $this->source), "html", null, true);
echo "\",
\"price\": ";
// line 192
((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); })()), "getPrice02IncTaxMin", [], "any", false, false, true, 192)) ? (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.', 192, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, true, 192), "html", null, true))) : (print (0)));
echo ",
\"availability\": \"";
// line 193
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.', 193, $this->source); })()), "stock_find", [], "any", false, false, true, 193)) ? ("InStock") : ("OutOfStock"));
echo "\"
}
}
</script>
<script src=\"";
// line 197
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/js/lightbox.js", "user_data"), "html", null, true);
echo "\"></script>
<script>
lightbox.option({
'resizeDuration': 800,
'imageFadeDuration': 800,
'resizeDuration': 800,
'positionFromTop': 0,
'alwaysShowNavOnTouchDevices': true,
'wrapAround': true,
'disableScrolling': true,
'showImageNumberLabel': false
})
</script>
<script>
\$(function() {
\$('.form-control').each(function() {
var el = \$(this);
var add = \$('.spinner-add');
var sub = \$('.spinner-sub');
// substract
el.parent().on('click', '.spinner-sub', function() {
if (el.val() > parseInt(el.attr('min'))) {
el.val(function(i, oldval) {
return --oldval;
});
}
// disabled
if (el.val() == parseInt(el.attr('min'))) {
el.prev(sub).addClass('disabled');
}
if (el.val() < parseInt(el.attr('max'))) {
el.next(add).removeClass('disabled');
}
});
// increment
el.parent().on('click', '.spinner-add', function() {
el.val(function(i, oldval) {
return ++oldval;
});
// disabled
if (el.val() > parseInt(el.attr('min'))) {
el.prev(sub).removeClass('disabled');
}
if (el.val() == parseInt(el.attr('max'))) {
el.next(add).addClass('disabled');
}
});
});
});
</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 249
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 250
echo " <div class=\"ec-productRole\">
<div class=\"ec-grid2\">
<div class=\"ec-grid2__cell\">
<div class=\"ec-sliderItemRole\">
<div class=\"item_visual\">
";
// line 255
$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.', 255, $this->source); })()), "ProductImage", [], "any", false, false, true, 255));
$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 256
echo " <div class=\"slide-item\">
<a href=\"";
// line 257
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->sandbox->ensureToStringAllowed($context["ProductImage"], 257, $this->source), "save_image"), "html", null, true);
echo "\" data-lightbox=\"productdetailimg\">
<img src=\"";
// line 258
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->sandbox->ensureToStringAllowed($context["ProductImage"], 258, $this->source), "save_image"), "html", null, true);
echo "\" alt=\"";
((twig_get_attribute($this->env, $this->source, $context["loop"], "first", [], "any", false, false, true, 258)) ? (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.', 258, $this->source); })()), "name", [], "any", false, false, true, 258), "html", null, true))) : (print ("")));
echo "\" width=\"500\" height=\"500\"";
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, true, 258) > 1)) {
echo " loading=\"lazy\"";
}
echo ">
</a>
</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 262
echo " <div class=\"slide-item\">
<img src=\"";
// line 263
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, 263)) ? (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.', 263, $this->source); })()), "name", [], "any", false, false, true, 263), "html", null, true))) : (print ("")));
echo "\" width=\"500\" height=\"500\">
</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 266
echo " </div>
";
// line 267
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.', 267, $this->source); })()), "ProductImage", [], "any", false, false, true, 267)) > 1)) {
// line 268
echo " <div class=\"item_nav\">
";
// line 269
$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.', 269, $this->source); })()), "ProductImage", [], "any", false, false, true, 269));
$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 270
echo " <div class=\"slideThumb\" 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, 270), 270, $this->source), "html", null, true);
echo "\"><img src=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->sandbox->ensureToStringAllowed($context["ProductImage"], 270, $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 272
echo " </div>
";
}
// line 274
echo " </div>
<div class=\"related_product_wrap related_pc\">
</div>
</div>
<div class=\"ec-grid2__cell\">
<div class=\"ec-productRole__profile\">
";
// line 282
echo " <div class=\"ec-productRole__title\">
<h1 class=\"ec-headingTitle\">";
// line 283
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.', 283, $this->source); })()), "name", [], "any", false, false, true, 283), 283, $this->source), "html", null, true);
echo "</h1>
</div>
";
// line 286
echo " <ul class=\"ec-productRole__tags\">
";
// line 287
$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.', 287, $this->source); })()), "Tags", [], "any", false, false, true, 287));
foreach ($context['_seq'] as $context["_key"] => $context["Tag"]) {
// line 288
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, 288), 288, $this->source), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed($context["Tag"], 288, $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 290
echo " </ul>
";
// line 292
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.', 292, $this->source); })()), "hasProductClass", [], "any", false, false, true, 292)) {
// line 293
echo "<div class=\"ec-productRole__priceRegular\">
";
// line 294
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.', 294, $this->source); })()), "getPrice01Min", [], "any", false, false, true, 294)) && (twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 294, $this->source); })()), "getPrice01IncTaxMin", [], "any", false, false, true, 294) == twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 294, $this->source); })()), "getPrice01IncTaxMax", [], "any", false, false, true, 294)))) {
// line 295
echo " <span class=\"ec-productRole__priceRegularPrice\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("通常価格"), "html", null, true);
echo ":<span class=\"price01-default\">";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($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>
<span class=\"ec-productRole__priceRegularTax\">";
// line 296
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html", null, true);
echo "</span>
";
} elseif (( !(null === twig_get_attribute($this->env, $this->source, // line 297
(isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 297, $this->source); })()), "getPrice01Min", [], "any", false, false, true, 297)) && !(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.', 297, $this->source); })()), "getPrice01Max", [], "any", false, false, true, 297)))) {
// line 298
echo " <span class=\"ec-productRole__priceRegularPrice\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("通常価格"), "html", null, true);
echo ":<span class=\"price01-default\">";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($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.', 298, $this->source); })()), "getPrice01IncTaxMin", [], "any", false, false, true, 298), 298, $this->source)), "html", null, true);
echo "~ ";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($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.', 298, $this->source); })()), "getPrice01IncTaxMax", [], "any", false, false, true, 298), 298, $this->source)), "html", null, true);
echo "</span></span>
<span class=\"ec-productRole__priceRegularTax\">";
// line 299
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html", null, true);
echo "</span>
";
}
// line 301
echo " </div>
";
} else {
// line 303
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.', 303, $this->source); })()), "getPrice01Max", [], "any", false, false, true, 303))) {
// line 304
echo " <span class=\"ec-productRole__priceRegularPrice\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("通常価格"), "html", null, true);
echo ":";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($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.', 304, $this->source); })()), "getPrice01IncTaxMin", [], "any", false, false, true, 304), 304, $this->source)), "html", null, true);
echo "</span>
<span class=\"ec-productRole__priceRegularTax\">";
// line 305
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html", null, true);
echo "</span>
";
}
// line 307
echo " ";
}
// line 308
echo " ";
// line 309
echo " <div class=\"ec-productRole__price\">
";
// line 310
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.', 310, $this->source); })()), "hasProductClass", [], "any", false, false, true, 310)) {
// line 311
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.', 311, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, true, 311) == 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.', 311, $this->source); })()), "getPrice02IncTaxMax", [], "any", false, false, true, 311))) {
// line 312
echo " <div class=\"ec-price\">
<span class=\"ec-price__price price02-default\">";
// line 313
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($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.', 313, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, true, 313), 313, $this->source)), "html", null, true);
echo "</span>
<span class=\"ec-price__tax\">";
// line 314
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html", null, true);
echo "</span>
</div>
";
} else {
// line 317
echo " <div class=\"ec-price\">
<span class=\"ec-price__price price02-default\">";
// line 318
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($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.', 318, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, true, 318), 318, $this->source)), "html", null, true);
echo " ~ ";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($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.', 318, $this->source); })()), "getPrice02IncTaxMax", [], "any", false, false, true, 318), 318, $this->source)), "html", null, true);
echo "</span>
<span class=\"ec-price__tax\">";
// line 319
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html", null, true);
echo "</span>
</div>
";
}
// line 322
echo " ";
} else {
// line 323
echo " <div class=\"ec-price\">
<span class=\"ec-price__price\">";
// line 324
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($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.', 324, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, true, 324), 324, $this->source)), "html", null, true);
echo "</span>
<span class=\"ec-price__tax\">";
// line 325
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html", null, true);
echo "</span>
</div>
";
}
// line 328
echo " </div>
<form action=\"";
// line 329
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.', 329, $this->source); })()), "id", [], "any", false, false, true, 329)]), "html", null, true);
echo "\" method=\"post\" id=\"form1\" name=\"form1\">
";
// line 330
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.', 330, $this->source); })()), "stock_find", [], "any", false, false, true, 330)) {
// line 331
echo " <div class=\"ec-productRole__actions\">
";
// line 332
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id1", [], "any", true, true, true, 332)) {
// line 333
echo " <div class=\"ec-select\">
";
// line 334
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.', 334, $this->source); })()), "classcategory_id1", [], "any", false, false, true, 334), 334, $this->source), 'row');
echo "
";
// line 335
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.', 335, $this->source); })()), "classcategory_id1", [], "any", false, false, true, 335), 335, $this->source), 'errors');
echo "
</div>
";
// line 337
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id2", [], "any", true, true, true, 337)) {
// line 338
echo " <div class=\"ec-select\">
";
// line 339
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.', 339, $this->source); })()), "classcategory_id2", [], "any", false, false, true, 339), 339, $this->source), 'row');
echo "
";
// line 340
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.', 340, $this->source); })()), "classcategory_id2", [], "any", false, false, true, 340), 340, $this->source), 'errors');
echo "
</div>
";
}
// line 343
echo " ";
}
// line 344
echo " <div class=\"ec-numberInput\">
<span class=\"numberInput_title\">";
// line 345
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("数量"), "html", null, true);
echo "</span>
<div class=\"number_wrap\">
<span class=\"spinner-sub disabled\"><i class=\"fas fa-minus-circle\"></i></span>
";
// 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); })()), "quantity", [], "any", false, false, true, 348), 348, $this->source), 'widget');
echo "
";
// line 349
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.', 349, $this->source); })()), "quantity", [], "any", false, false, true, 349), 349, $this->source), 'errors');
echo "
<span class=\"spinner-add\"><i class=\"fas fa-plus-circle\"></i></span>
</div>
</div>
</div>
<div class=\"ec-productRole__btn\">
<button type=\"submit\" class=\"ec-blockBtn--action add-cart\">
";
// line 356
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに入れる"), "html", null, true);
echo "
</button>
</div>
";
} else {
// line 360
echo " <div class=\"ec-productRole__btn\">
<button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
";
// line 362
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ただいま品切れ中です。"), "html", null, true);
echo "
</button>
</div>
";
}
// line 366
echo " ";
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.', 366, $this->source); })()), 366, $this->source), 'rest');
echo "
</form>
<div class=\"description_wrap\">
<div class=\"ec-productRole__description\">";
// line 369
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.', 369, $this->source); })()), "description_detail", [], "any", false, false, true, 369), 369, $this->source));
echo "</div>
";
// line 370
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.', 370, $this->source); })()), "freearea", [], "any", false, false, true, 370)) {
// line 371
echo " <div class=\"ec-productRole__description freearea\">
";
// line 372
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.', 372, $this->source); })()), "freearea", [], "any", false, false, true, 372), 372, $this->source)));
echo "
</div>
";
}
// line 375
echo " ";
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.', 375, $this->source); })()), "option_favorite_product", [], "any", false, false, true, 375)) {
// line 376
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.', 376, $this->source); })()), "id", [], "any", false, false, true, 376)]), "html", null, true);
echo "\" method=\"post\">
<div class=\"ec-productRole__btn\">
";
// line 378
if (((isset($context["is_favorite"]) || array_key_exists("is_favorite", $context) ? $context["is_favorite"] : (function () { throw new RuntimeError('Variable "is_favorite" does not exist.', 378, $this->source); })()) == false)) {
// line 379
echo " <button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel\">
";
// line 380
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お気に入りに追加"), "html", null, true);
echo "
</button>
";
} else {
// line 383
echo " <button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel\" disabled=\"disabled\">
";
// line 384
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お気に入りに追加済です。"), "html", null, true);
echo "
</button>
";
}
// line 387
echo " </div>
</form>
";
}
// line 390
echo " </div>
";
// line 392
echo " ";
// line 397
echo " <div class=\"related_product_wrap related_sp\">
</div>
";
// line 401
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.', 401, $this->source); })()), "ProductCategories", [], "any", false, false, true, 401))) {
// line 402
echo " <div class=\"ec-productRole__category\">
<p><a href=\"";
// line 403
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
echo "\" class=\"all_category\">宇宙グッズ一覧</a></p>
";
// line 404
$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.', 404, $this->source); })()), "ProductCategories", [], "any", false, false, true, 404));
foreach ($context['_seq'] as $context["_key"] => $context["ProductCategory"]) {
// line 405
echo " ";
if ((twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["ProductCategory"], "Category", [], "any", false, false, true, 405), "children", [], "any", false, false, true, 405)) == 0)) {
// line 406
echo " ";
$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, 406), "path", [], "any", false, false, true, 406));
$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 407
echo " ";
if ((twig_get_attribute($this->env, $this->source, $context["Category"], "id", [], "any", false, false, true, 407) > 178)) {
// line 408
echo " <p><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, 408), 408, $this->source), "html", null, true);
echo "\" class=\"list_category_";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, true, 408), 408, $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, 408), 408, $this->source), "html", null, true);
echo "</a></p>
<script>
\$(\".category_id_";
// line 410
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Category"], "id", [], "any", false, false, true, 410), 410, $this->source), "html", null, true);
echo "\").addClass(\"is-active\").css(\"display\",\"block\");
";
// line 411
if (twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, true, 411)) {
// line 412
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, 412), 412, $this->source), "html", null, true);
echo "\").addClass(\"is-active_last\");
";
}
// line 414
echo " </script>
";
}
// line 416
echo " ";
++$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 417
echo " ";
}
// line 418
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ProductCategory'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 419
echo " </div>
";
}
// line 421
echo " </div>
</div>
</div>
</div>
";
$__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 ( 974 => 421, 970 => 419, 964 => 418, 961 => 417, 947 => 416, 943 => 414, 937 => 412, 935 => 411, 931 => 410, 919 => 408, 916 => 407, 898 => 406, 895 => 405, 891 => 404, 887 => 403, 884 => 402, 881 => 401, 876 => 397, 874 => 392, 871 => 390, 866 => 387, 860 => 384, 857 => 383, 851 => 380, 848 => 379, 846 => 378, 840 => 376, 837 => 375, 831 => 372, 828 => 371, 826 => 370, 822 => 369, 815 => 366, 808 => 362, 804 => 360, 797 => 356, 787 => 349, 783 => 348, 777 => 345, 774 => 344, 771 => 343, 765 => 340, 761 => 339, 758 => 338, 756 => 337, 751 => 335, 747 => 334, 744 => 333, 742 => 332, 739 => 331, 737 => 330, 733 => 329, 730 => 328, 724 => 325, 720 => 324, 717 => 323, 714 => 322, 708 => 319, 702 => 318, 699 => 317, 693 => 314, 689 => 313, 686 => 312, 684 => 311, 682 => 310, 679 => 309, 677 => 308, 674 => 307, 669 => 305, 662 => 304, 659 => 303, 655 => 301, 650 => 299, 641 => 298, 639 => 297, 635 => 296, 628 => 295, 626 => 294, 623 => 293, 620 => 292, 617 => 290, 606 => 288, 602 => 287, 599 => 286, 594 => 283, 591 => 282, 582 => 274, 578 => 272, 559 => 270, 542 => 269, 539 => 268, 537 => 267, 534 => 266, 523 => 263, 520 => 262, 497 => 258, 493 => 257, 490 => 256, 472 => 255, 465 => 250, 455 => 249, 394 => 197, 387 => 193, 383 => 192, 379 => 191, 375 => 190, 371 => 188, 365 => 186, 363 => 185, 358 => 184, 355 => 183, 345 => 181, 331 => 179, 323 => 178, 305 => 177, 300 => 175, 275 => 153, 265 => 146, 235 => 119, 231 => 117, 222 => 111, 218 => 109, 215 => 108, 206 => 102, 202 => 100, 200 => 99, 137 => 38, 129 => 36, 127 => 35, 122 => 33, 119 => 32, 117 => 31, 105 => 22, 102 => 21, 92 => 20, 80 => 17, 75 => 16, 65 => 15, 54 => 11, 52 => 13, 39 => 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 stylesheet %}
<link rel=\"stylesheet\" href=\"{{ asset('assets/css/productdetail.css', 'user_data') }}\">
<link rel=\"stylesheet\" href=\"{{ asset('assets/css/lightbox.css', 'user_data') }}\">
{% endblock %}
{% 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
//\$('.ec-grid2__cell').hide();
var removeSize = function () {
\$('.slide-item').height('');
\$('.slide-item img')
.removeAttr('width')
.removeAttr('height')
.removeAttr('style');
};
var slickInitial = function(slick) {
var baseHeight = \$(slick.target).height();
var baseWidth = \$(slick.target).width();
var rate = baseWidth / baseHeight;
\$('.slide-item').height(baseHeight * rate); // 余白を削除する
// transform を使用することでCLSの影響を受けないようにする
\$('.slide-item img')
.css(
{
'transform-origin': 'top left',
'transform': 'scaleY(' + rate + ')',
}
);
removeSize();
\$('.ec-grid2__cell').addClass('is_active');
};
\$('.item_visual').on('init', slickInitial);
// リサイズ時は CLS の影響を受けないため属性を解除する
\$(window).resize(removeSize);
\$('.item_visual').slick({
dots: false,
arrows: false,
fade: true,
responsive: [{
breakpoint: 768,
settings: {
arrows: true
}
}]
});
\$('.slideThumb').on('click', function() {
var index = \$(this).attr('data-index');
\$('.item_visual').slick('slickGoTo', index, false);
})
});
</script>
<script>
var scrollPos;
\$(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()
\$('.ec-modal').fadeIn(800)
scrollPos = \$(window).scrollTop();
\t\t\t \$('body').addClass('have_ec-modal').css('top',-scrollPos + 'px');
// カートブロックを更新する
\$.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, .ec-inlineBtn--cancel').on('click', function() {
//\$('.ec-modal').hide()
\$('.ec-modal').fadeOut(800)
\$('body').removeClass('have_ec-modal').css('top',0 + 'px');
\t\t\twindow.scrollTo( 0 , scrollPos );\t\t
});
</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>
<script src=\"{{ asset('assets/js/lightbox.js', 'user_data') }}\"></script>
<script>
lightbox.option({
'resizeDuration': 800,
'imageFadeDuration': 800,
'resizeDuration': 800,
'positionFromTop': 0,
'alwaysShowNavOnTouchDevices': true,
'wrapAround': true,
'disableScrolling': true,
'showImageNumberLabel': false
})
</script>
<script>
\$(function() {
\$('.form-control').each(function() {
var el = \$(this);
var add = \$('.spinner-add');
var sub = \$('.spinner-sub');
// substract
el.parent().on('click', '.spinner-sub', function() {
if (el.val() > parseInt(el.attr('min'))) {
el.val(function(i, oldval) {
return --oldval;
});
}
// disabled
if (el.val() == parseInt(el.attr('min'))) {
el.prev(sub).addClass('disabled');
}
if (el.val() < parseInt(el.attr('max'))) {
el.next(add).removeClass('disabled');
}
});
// increment
el.parent().on('click', '.spinner-add', function() {
el.val(function(i, oldval) {
return ++oldval;
});
// disabled
if (el.val() > parseInt(el.attr('min'))) {
el.prev(sub).removeClass('disabled');
}
if (el.val() == parseInt(el.attr('max'))) {
el.next(add).addClass('disabled');
}
});
});
});
</script>
{% endblock %}
{% block main %}
<div class=\"ec-productRole\">
<div class=\"ec-grid2\">
<div class=\"ec-grid2__cell\">
<div class=\"ec-sliderItemRole\">
<div class=\"item_visual\">
{% for ProductImage in Product.ProductImage %}
<div class=\"slide-item\">
<a href=\"{{ asset(ProductImage, 'save_image') }}\" data-lightbox=\"productdetailimg\">
<img src=\"{{ asset(ProductImage, 'save_image') }}\" alt=\"{{ loop.first ? Product.name : '' }}\" width=\"500\" height=\"500\"{% if loop.index > 1 %} loading=\"lazy\"{% endif %}>
</a>
</div>
{% else %}
<div class=\"slide-item\">
<img src=\"{{ asset(''|no_image_product, 'save_image') }}\" alt=\"{{ loop.first ? Product.name : '' }}\" width=\"500\" height=\"500\">
</div>
{% endfor %}
</div>
{% if Product.ProductImage|length > 1 %}
<div class=\"item_nav\">
{% for ProductImage in Product.ProductImage %}
<div class=\"slideThumb\" data-index=\"{{ loop.index0 }}\"><img src=\"{{ asset(ProductImage, 'save_image') }}\" alt=\"\" width=\"133\" height=\"133\" loading=\"lazy\"></div>
{% endfor %}
</div>
{% endif %}
</div>
<div class=\"related_product_wrap related_pc\">
</div>
</div>
<div class=\"ec-grid2__cell\">
<div class=\"ec-productRole__profile\">
{# 商品名 #}
<div class=\"ec-productRole__title\">
<h1 class=\"ec-headingTitle\">{{ Product.name }}</h1>
</div>
{# タグ #}
<ul class=\"ec-productRole__tags\">
{% for Tag in Product.Tags %}
<li class=\"ec-productRole__tag tag_{{ Tag.id }}\">{{ Tag }}</li>
{% endfor %}
</ul>
{# 通常価格 #}
{% if Product.hasProductClass -%}
<div class=\"ec-productRole__priceRegular\">
{% if Product.getPrice01Min is not null and Product.getPrice01IncTaxMin == Product.getPrice01IncTaxMax %}
<span class=\"ec-productRole__priceRegularPrice\">{{ '通常価格'|trans }}:<span class=\"price01-default\">{{ Product.getPrice01IncTaxMin|price }}</span></span>
<span class=\"ec-productRole__priceRegularTax\">{{ '税込'|trans }}</span>
{% elseif Product.getPrice01Min is not null and Product.getPrice01Max is not null %}
<span class=\"ec-productRole__priceRegularPrice\">{{ '通常価格'|trans }}:<span class=\"price01-default\">{{ Product.getPrice01IncTaxMin|price }}~ {{ Product.getPrice01IncTaxMax|price }}</span></span>
<span class=\"ec-productRole__priceRegularTax\">{{ '税込'|trans }}</span>
{% endif %}
</div>
{% else %}
{% if Product.getPrice01Max is not null %}
<span class=\"ec-productRole__priceRegularPrice\">{{ '通常価格'|trans }}:{{ Product.getPrice01IncTaxMin|price }}</span>
<span class=\"ec-productRole__priceRegularTax\">{{ '税込'|trans }}</span>
{% endif %}
{% endif %}
{# 販売価格 #}
<div class=\"ec-productRole__price\">
{% if Product.hasProductClass -%}
{% if Product.getPrice02IncTaxMin == Product.getPrice02IncTaxMax %}
<div class=\"ec-price\">
<span class=\"ec-price__price price02-default\">{{ Product.getPrice02IncTaxMin|price }}</span>
<span class=\"ec-price__tax\">{{ '税込'|trans }}</span>
</div>
{% else %}
<div class=\"ec-price\">
<span class=\"ec-price__price price02-default\">{{ Product.getPrice02IncTaxMin|price }} ~ {{ Product.getPrice02IncTaxMax|price }}</span>
<span class=\"ec-price__tax\">{{ '税込'|trans }}</span>
</div>
{% endif %}
{% else %}
<div class=\"ec-price\">
<span class=\"ec-price__price\">{{ Product.getPrice02IncTaxMin|price }}</span>
<span class=\"ec-price__tax\">{{ '税込'|trans }}</span>
</div>
{% endif %}
</div>
<form action=\"{{ url('product_add_cart', {id:Product.id}) }}\" method=\"post\" id=\"form1\" name=\"form1\">
{% if Product.stock_find %}
<div class=\"ec-productRole__actions\">
{% 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 class=\"numberInput_title\">{{ '数量'|trans }}</span>
<div class=\"number_wrap\">
<span class=\"spinner-sub disabled\"><i class=\"fas fa-minus-circle\"></i></span>
{{ form_widget(form.quantity) }}
{{ form_errors(form.quantity) }}
<span class=\"spinner-add\"><i class=\"fas fa-plus-circle\"></i></span>
</div>
</div>
</div>
<div class=\"ec-productRole__btn\">
<button type=\"submit\" class=\"ec-blockBtn--action add-cart\">
{{ 'カートに入れる'|trans }}
</button>
</div>
{% else %}
<div class=\"ec-productRole__btn\">
<button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
{{ 'ただいま品切れ中です。'|trans }}
</button>
</div>
{% endif %}
{{ form_rest(form) }}
</form>
<div class=\"description_wrap\">
<div class=\"ec-productRole__description\">{{ Product.description_detail|raw|nl2br }}</div>
{% if Product.freearea %}
<div class=\"ec-productRole__description freearea\">
{{ include(template_from_string(Product.freearea)) }}
</div>
{% endif %}
{% if BaseInfo.option_favorite_product %}
<form action=\"{{ url('product_add_favorite', {id:Product.id}) }}\" method=\"post\">
<div class=\"ec-productRole__btn\">
{% if is_favorite == false %}
<button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel\">
{{ 'お気に入りに追加'|trans }}
</button>
{% else %}
<button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel\" disabled=\"disabled\">
{{ 'お気に入りに追加済です。'|trans }}
</button>
{% endif %}
</div>
</form>
{% 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 %} #}
<div class=\"related_product_wrap related_sp\">
</div>
{# 関連カテゴリ #}
{% if Product.ProductCategories is not empty %}
<div class=\"ec-productRole__category\">
<p><a href=\"{{ url('product_list') }}\" class=\"all_category\">宇宙グッズ一覧</a></p>
{% for ProductCategory in Product.ProductCategories %}
{% if ProductCategory.Category.children|length == 0 %}
{% for Category in ProductCategory.Category.path %}
{% if Category.id > 178 %}
<p><a href=\"{{ url('product_list') }}?category_id={{ Category.id }}\" class=\"list_category_{{loop.index}}\">{{ Category.name }}</a></p>
<script>
\$(\".category_id_{{ Category.id }}\").addClass(\"is-active\").css(\"display\",\"block\");
{% if loop.last %}
\$(\".category_id_{{ Category.id }}\").addClass(\"is-active_last\");
{% endif %}
</script>
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
</div>
{% endif %}
</div>
</div>
</div>
</div>
{% endblock %}", "Product/detail.twig", "/home/unibo-test/www/html/app/template/default/Product/detail.twig");
}
public function checkSecurity()
{
static $tags = array("set" => 13, "if" => 31, "for" => 177);
static $filters = array("escape" => 16, "raw" => 22, "json_encode" => 33, "trans" => 102, "no_image_product" => 181, "slice" => 184, "replace" => 184, "default" => 184, "length" => 267, "price" => 295, "nl2br" => 369);
static $functions = array("asset" => 16, "class_categories_as_json" => 22, "url" => 146, "form_row" => 334, "form_errors" => 335, "form_widget" => 348, "form_rest" => 366, "include" => 372, "template_from_string" => 372);
try {
$this->sandbox->checkSecurity(
['set', 'if', 'for'],
['escape', 'raw', 'json_encode', 'trans', 'no_image_product', 'slice', 'replace', 'default', 'length', 'price', 'nl2br'],
['asset', 'class_categories_as_json', 'url', 'form_row', 'form_errors', 'form_widget', 'form_rest', 'include', 'template_from_string'],
$this->source
);
} 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;
}
}
}