<?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_06a879a958a3b9cab946e0919607afcf 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'],
];
}
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\" type=\"text/css\" href=\"/html/user_data/assets/css/calendar.css\">
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 19
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 20
echo " <script>
eccube.classCategories = ";
// line 21
echo $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getClassCategoriesAsJson((isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 21, $this->source); })()));
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 32
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id2", [], "any", true, true, false, 32)) {
// line 33
echo " fnSetClassCategories(
\$('#form1'), ";
// line 34
echo json_encode(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.', 34, $this->source); })()), "classcategory_id2", [], "any", false, false, false, 34), "vars", [], "any", false, false, false, 34), "value", [], "any", false, false, false, 34));
echo "
);
";
} elseif (twig_get_attribute($this->env, $this->source, // line 36
($context["form"] ?? null), "classcategory_id1", [], "any", true, true, false, 36)) {
// line 37
echo " eccube.checkStock(\$('#form1'), ";
echo 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.', 37, $this->source); })()), "id", [], "any", false, false, false, 37), "html", null, true);
echo ", ";
echo json_encode(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.', 37, $this->source); })()), "classcategory_id1", [], "any", false, false, false, 37), "vars", [], "any", false, false, false, 37), "value", [], "any", false, false, false, 37));
echo ", null);
";
}
// line 39
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) {
\$('.ec-grid2__cell').fadeIn(1500);
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 + ')',
'transition': 'transform .1s'
}
);
// 正しいサイズに近くなったら属性を解除する
setTimeout(removeSize, 500);
};
\$('.item_visual').on('init', slickInitial);
// リサイズ時は CLS の影響を受けないため属性を解除する
\$(window).resize(removeSize);
\$('.item_visual').slick({
dots: true,
arrows: false,
responsive: [{
breakpoint: 768,
settings: {
dots: true
}
}]
});
\$('.slideThumb').on('click', function() {
var index = \$(this).attr('data-index');
\$('.item_visual').slick('slickGoTo', index, false);
})
});
</script>
<script>
\$(function() {
\$('.add-cart').on('click', function(event) {
";
// line 103
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id1", [], "any", true, true, false, 103)) {
// line 104
echo " // 規格1フォームの必須チェック
if (\$('#classcategory_id1').val() == '__unselected' || \$('#classcategory_id1').val() == '') {
\$('#classcategory_id1')[0].setCustomValidity('";
// line 106
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 112
echo "
";
// line 113
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id2", [], "any", true, true, false, 113)) {
// line 114
echo " // 規格2フォームの必須チェック
if (\$('#classcategory_id2').val() == '__unselected' || \$('#classcategory_id2').val() == '') {
\$('#classcategory_id2')[0].setCustomValidity('";
// line 116
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 122
echo "
// 個数フォームのチェック
if (\$('#quantity').val() < 1) {
\$('#quantity')[0].setCustomValidity('";
// line 125
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 152
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 159
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()
});
</script>
<script type=\"application/ld+json\">
{
\"@context\": \"https://schema.org/\",
\"@type\": \"Product\",
\"name\": \"";
// line 179
echo 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.', 179, $this->source); })()), "name", [], "any", false, false, false, 179), "html", null, true);
echo "\",
\"image\": [
";
// line 181
$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.', 181, $this->source); })()), "ProductImage", [], "any", false, false, false, 181));
$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 182
echo " \"";
echo twig_escape_filter($this->env, 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.', 182, $this->source); })()), "request", [], "any", false, false, false, 182), "schemeAndHttpHost", [], "any", false, false, false, 182), "html", null, true);
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($context["img"], "save_image"), "html", null, true);
echo "\"";
if ( !twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, false, 182)) {
echo ",";
}
// line 183
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 185
echo " \"";
echo twig_escape_filter($this->env, 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.', 185, $this->source); })()), "request", [], "any", false, false, false, 185), "schemeAndHttpHost", [], "any", false, false, false, 185), "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 187
echo " ],
\"description\": \"";
// line 188
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, false, 188)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, ($context["Product"] ?? null), "description_list", [], "any", false, false, false, 188), 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.', 188, $this->source); })()), "description_detail", [], "any", false, false, false, 188))) : (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.', 188, $this->source); })()), "description_detail", [], "any", false, false, false, 188))), ["
" => "", "
" => ""]), 0, 300), "html", null, true);
echo "\",
";
// line 189
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.', 189, $this->source); })()), "code_min", [], "any", false, false, false, 189)) {
// line 190
echo " \"sku\": \"";
echo 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.', 190, $this->source); })()), "code_min", [], "any", false, false, false, 190), "html", null, true);
echo "\",
";
}
// line 192
echo " \"offers\": {
\"@type\": \"Offer\",
\"url\": \"";
// line 194
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.', 194, $this->source); })()), "id", [], "any", false, false, false, 194)]), "html", null, true);
echo "\",
\"priceCurrency\": \"";
// line 195
echo twig_escape_filter($this->env, 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.', 195, $this->source); })()), "currency", [], "any", false, false, false, 195), "html", null, true);
echo "\",
\"price\": ";
// line 196
((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.', 196, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 196)) ? (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.', 196, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 196), "html", null, true))) : (print (0)));
echo ",
\"availability\": \"";
// line 197
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.', 197, $this->source); })()), "stock_find", [], "any", false, false, false, 197)) ? ("InStock") : ("OutOfStock"));
echo "\"
}
}
</script>
<script>
const rental_setting = '";
// line 202
echo twig_escape_filter($this->env, (isset($context["rental_setting"]) || array_key_exists("rental_setting", $context) ? $context["rental_setting"] : (function () { throw new RuntimeError('Variable "rental_setting" does not exist.', 202, $this->source); })()), "html", null, true);
echo "';
</script>
<script src=\"/html/user_data/assets/js/calendar.js\"></script>
<script>
\$(function() {
let name = \$('#product_id').text();
if (name.length == 1) {
name = '0000' + name;
}
else if (name.length == 2) {
name = '000' + name;
}
else if (name.length == 3) {
name = '00' + name;
}
else if (name.length == 4) {
name = '0' + name;
}
\$('#product_id').text(name);
if (\$('#classcategory_id1').length == 0) {
";
// line 224
echo " \$('.ec-periodInput').hide();
}
else {
\$('.ec-numberInput').hide();
let class_id = one_class_id;
";
// line 230
if (((isset($context["is_admin"]) || array_key_exists("is_admin", $context) ? $context["is_admin"] : (function () { throw new RuntimeError('Variable "is_admin" does not exist.', 230, $this->source); })()) == 0)) {
// line 231
echo " ";
// line 232
echo " let del = 0;
\$('#classcategory_id1 option').each(function(index) {
if (\$(this).text().indexOf('当日') > -1) {
del = index;
}
});
\$('#classcategory_id1 option').eq(del).remove();
";
} else {
// line 240
echo " ";
// line 241
echo " class_id = admin_class_id;
";
}
// line 243
echo " \$('#classcategory_id1 option').eq(0).remove();
let realsettings = [];
\$('#classcategory_id1 option').each(function () {
const id = \$(this).val();
for (i = 0; i < settings.length; i++) {
const setting = settings[i];
if (id == setting['id']) {
realsettings.push(setting);
}
}
});
settings = realsettings;
let period = '";
// line 255
echo twig_escape_filter($this->env, (isset($context["period"]) || array_key_exists("period", $context) ? $context["period"] : (function () { throw new RuntimeError('Variable "period" does not exist.', 255, $this->source); })()), "html", null, true);
echo "';
\$('.ec-periodInput input').val(period);
if (period) {
if (period.indexOf('~') > -1) {
period = period.split('|')[0];
period = period.split('~');
let start = period[0].split('/');
let end = period[1].split('/');
start = new Date(start[0], start[1], start[2]);
end = new Date(end[0], end[1], end[2]);
let termDay = (end - start) / 86400000;
for (i = 0; i < settings.length; i++) {
const setting = settings[i];
if (termDay == setting['period'] - 1) {
class_id = setting['id'];
}
}
}
}
else {
class_id = settings[0]['id'];
}
\$('#classcategory_id1').val(class_id).change();
let label = \$('#classcategory_id1').prev();
let number = \$('.ec-periodInput .number');
let cart_btn = \$('.add-cart');
let period_input = \$('#period');
number.hide();
setInterval(function() {
if (\$('#classcategory_id1').val() == '__unselected') {
label.text('未選択');
number.text(0);
}
else {
let price = \$('.price02-default').text();
if (label.text() != price) {
label.text(price);
}
number.text(\$('#classcategory_id1').val());
}
if (period_input.val()) {
cart_btn.show();
}
else {
cart_btn.hide();
}
}, 100);
}
\$('body').addClass('script_loaded');
});
</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 309
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 310
echo "<div class=\"c_inner\">
<div class=\"item_detail\">
";
// line 312
$context["is_gold"] = false;
// line 313
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.', 313, $this->source); })()), "ProductCategories", [], "any", false, false, false, 313))) {
// line 314
echo " <div class=\"head\">
";
// line 315
$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.', 315, $this->source); })()), "ProductCategories", [], "any", false, false, false, 315));
foreach ($context['_seq'] as $context["_key"] => $context["ProductCategory"]) {
// line 316
echo " ";
$context["flag"] = false;
// line 317
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, false, 317), "path", [], "any", false, false, false, 317));
$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 318
echo " ";
if (((twig_get_attribute($this->env, $this->source, $context["loop"], "first", [], "any", false, false, false, 318) == true) && (twig_get_attribute($this->env, $this->source, $context["Category"], "id", [], "any", false, false, false, 318) == 131))) {
echo " ";
$context["flag"] = true;
echo " ";
}
// line 319
echo " ";
if (((twig_get_attribute($this->env, $this->source, $context["loop"], "first", [], "any", false, false, false, 319) == true) && (twig_get_attribute($this->env, $this->source, $context["Category"], "id", [], "any", false, false, false, 319) == 193))) {
echo " ";
$context["is_gold"] = true;
echo " ";
}
// line 320
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 321
echo " ";
if (((isset($context["flag"]) || array_key_exists("flag", $context) ? $context["flag"] : (function () { throw new RuntimeError('Variable "flag" does not exist.', 321, $this->source); })()) == true)) {
// line 322
echo " <p>HOME >
";
// line 323
$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, false, 323), "path", [], "any", false, false, false, 323));
foreach ($context['_seq'] as $context["_key"] => $context["Category"]) {
// line 324
echo " <a href=\"";
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
echo "?category_id=";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Category"], "id", [], "any", false, false, false, 324), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Category"], "name", [], "any", false, false, false, 324), "html", null, true);
echo "</a> >
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Category'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 326
echo " ";
echo 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.', 326, $this->source); })()), "name", [], "any", false, false, false, 326), "html", null, true);
echo "
</p>
";
}
// line 329
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 330
echo " </div>
";
}
// line 332
echo " <div class=\"row2\">
<div class=\"mv\">
<div class=\"item_visual\">
";
// line 335
$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.', 335, $this->source); })()), "ProductImage", [], "any", false, false, false, 335));
$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 336
echo " <div class=\"slide-item\"><img src=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($context["ProductImage"], "save_image"), "html", null, true);
echo "\" alt=\"";
((twig_get_attribute($this->env, $this->source, $context["loop"], "first", [], "any", false, false, false, 336)) ? (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.', 336, $this->source); })()), "name", [], "any", false, false, false, 336), "html", null, true))) : (print ("")));
echo "\" width=\"550\" height=\"550\"";
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 336) > 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 338
echo " <div class=\"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, false, 338)) ? (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.', 338, $this->source); })()), "name", [], "any", false, false, false, 338), "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 340
echo " </div>
<ul class=\"item_nav\">
";
// line 342
$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.', 342, $this->source); })()), "ProductImage", [], "any", false, false, false, 342));
$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 343
echo " <li class=\"slideThumb\" data-index=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["loop"], "index0", [], "any", false, false, false, 343), "html", null, true);
echo "\"><img src=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($context["ProductImage"], "save_image"), "html", null, true);
echo "\" alt=\"\" width=\"133\" height=\"133\" loading=\"lazy\"></li>
";
++$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 345
echo " </ul>
</div>
<div class=\"desc\">
<!--";
// line 348
if (((isset($context["sale_type"]) || array_key_exists("sale_type", $context) ? $context["sale_type"] : (function () { throw new RuntimeError('Variable "sale_type" does not exist.', 348, $this->source); })()) == "3")) {
// line 349
echo " <div id=\"pick_up_only\" style=\"margin-bottom: 1em\"><span>ヤマト便配送不可</span></div>
";
}
// line 350
echo "-->
";
// line 351
if (twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 351, $this->source); })()), "freearea", [], "any", false, false, false, 351)) {
// line 352
echo " <div id=\"pick_up_only\" style=\"margin-bottom: 1em\"><span>";
echo 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.', 352, $this->source); })()), "freearea", [], "any", false, false, false, 352), "html", null, true);
echo "</span></div>
";
}
// line 354
echo " ";
// line 355
echo " <div class=\"ec-productRole__title\">
";
// line 356
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.', 356, $this->source); })()), "brand", [], "any", false, false, false, 356)) {
// line 357
echo " <p>";
echo 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.', 357, $this->source); })()), "brand", [], "any", false, false, false, 357), "html", null, true);
echo "</p>
";
}
// line 359
echo " <h2 class=\"ec-headingTitle\">";
echo 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.', 359, $this->source); })()), "name", [], "any", false, false, false, 359), "html", null, true);
echo "</h2>
</div>
";
// line 362
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.', 362, $this->source); })()), "code_min", [], "any", false, false, false, 362))) {
// line 363
echo " <div class=\"ec-productRole__code\">
";
// line 364
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, 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.', 364, $this->source); })()), "code_min", [], "any", false, false, false, 364), "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.', 364, $this->source); })()), "code_min", [], "any", false, false, false, 364) != 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.', 364, $this->source); })()), "code_max", [], "any", false, false, false, 364))) {
echo " ~ ";
echo 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.', 364, $this->source); })()), "code_max", [], "any", false, false, false, 364), "html", null, true);
}
echo "</span>
</div>
";
}
// line 367
echo "
<p class=\"data\">
<i>品番: ";
// line 369
echo 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.', 369, $this->source); })()), "number", [], "any", false, false, false, 369), "html", null, true);
echo "</i>
<i>ID: <span id=\"product_id\">";
// line 370
echo 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.', 370, $this->source); })()), "id", [], "any", false, false, false, 370), "html", null, true);
echo "</span></i>
</p>
<form action=\"";
// line 372
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.', 372, $this->source); })()), "id", [], "any", false, false, false, 372)]), "html", null, true);
echo "\" method=\"post\" id=\"form1\" name=\"form1\">
";
// line 373
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.', 373, $this->source); })()), "stock_find", [], "any", false, false, false, 373)) {
// line 374
echo " <div class=\"ec-productRole__actions\">
";
// line 375
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id1", [], "any", true, true, false, 375)) {
// line 376
echo " <div class=\"ec-select\">
";
// line 377
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 377, $this->source); })()), "classcategory_id1", [], "any", false, false, false, 377), 'row');
echo "
";
// line 378
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 378, $this->source); })()), "classcategory_id1", [], "any", false, false, false, 378), 'errors');
echo "
</div>
";
// line 380
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id2", [], "any", true, true, false, 380)) {
// line 381
echo " <div class=\"ec-select\">
";
// line 382
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 382, $this->source); })()), "classcategory_id2", [], "any", false, false, false, 382), 'row');
echo "
";
// line 383
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 383, $this->source); })()), "classcategory_id2", [], "any", false, false, false, 383), 'errors');
echo "
</div>
";
}
// line 386
echo " ";
}
// line 387
echo " ";
// line 388
echo " <div class=\"ec-productRole__price\" style=\"display: none;\">
";
// line 389
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.', 389, $this->source); })()), "hasProductClass", [], "any", false, false, false, 389)) {
// line 390
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.', 390, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 390) == twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 390, $this->source); })()), "getPrice02IncTaxMax", [], "any", false, false, false, 390))) {
// line 391
echo " <div class=\"ec-price\">
<span class=\"ec-price__price price02-default\">";
// line 392
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 392, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 392)), "html", null, true);
echo "</span>
<span class=\"ec-price__tax\">";
// line 393
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html", null, true);
echo "</span>
</div>
";
} else {
// line 396
echo " <div class=\"ec-price\">
<span class=\"ec-price__price price02-default\">";
// line 397
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 397, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 397)), "html", null, true);
echo " ~ ";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 397, $this->source); })()), "getPrice02IncTaxMax", [], "any", false, false, false, 397)), "html", null, true);
echo "</span>
<span class=\"ec-price__tax\">";
// line 398
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html", null, true);
echo "</span>
</div>
";
}
// line 401
echo " ";
} else {
// line 402
echo " <div class=\"ec-price\">
<span class=\"ec-price__price\">";
// line 403
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 403, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 403)), "html", null, true);
echo "</span>
<span class=\"ec-price__tax\">";
// line 404
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html", null, true);
echo "</span>
</div>
";
}
// line 407
echo " </div>
<div class=\"ec-numberInput\"><span>";
// line 408
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("数量"), "html", null, true);
echo "</span>
";
// line 409
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 409, $this->source); })()), "quantity", [], "any", false, false, false, 409), 'widget');
echo "
";
// line 410
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 410, $this->source); })()), "quantity", [], "any", false, false, false, 410), 'errors');
echo "
</div>
</div>
";
// line 413
if ((((isset($context["is_gold"]) || array_key_exists("is_gold", $context) ? $context["is_gold"] : (function () { throw new RuntimeError('Variable "is_gold" does not exist.', 413, $this->source); })()) == false) || ((isset($context["user_status"]) || array_key_exists("user_status", $context) ? $context["user_status"] : (function () { throw new RuntimeError('Variable "user_status" does not exist.', 413, $this->source); })()) == 3))) {
// line 414
echo "<div class=\"ec-periodInput\">
<div class=\"cal_root\" data-period=\"";
// line 415
echo twig_escape_filter($this->env, (isset($context["reserved"]) || array_key_exists("reserved", $context) ? $context["reserved"] : (function () { throw new RuntimeError('Variable "reserved" does not exist.', 415, $this->source); })()), "html", null, true);
echo "\">
";
// line 416
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 416, $this->source); })()), "period", [], "any", false, false, false, 416), 'widget');
echo "
";
// line 417
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 417, $this->source); })()), "period", [], "any", false, false, false, 417), 'errors');
echo "
<em>レンタル期間を選択する</em>
<div class=\"cal_wrap\"></div>
<div class=\"number\"></div>
</div>
</div>
<div class=\"ec-productRole__btn\">
<button type=\"submit\" class=\"ec-blockBtn--action add-cart\">
";
// line 425
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("RESERVE"), "html", null, true);
echo "
</button>
</div>
";
} else {
// line 429
echo " <div style=\"display:none\">";
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 429, $this->source); })()), "period", [], "any", false, false, false, 429), 'widget');
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 429, $this->source); })()), "period", [], "any", false, false, false, 429), 'errors');
echo "</div>
";
}
// line 431
echo " ";
} else {
// line 432
echo " <div style=\"display:none\">";
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 432, $this->source); })()), "period", [], "any", false, false, false, 432), 'widget');
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 432, $this->source); })()), "period", [], "any", false, false, false, 432), 'errors');
echo "</div>
<div class=\"ec-productRole__btn\">
<button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
";
// line 435
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ただいま品切れ中です。"), "html", null, true);
echo "
</button>
</div>
";
}
// line 439
echo "
";
// line 440
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 440, $this->source); })()), 'rest');
echo "
</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 445
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 446
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに追加しました。"), "html", null, true);
echo "</div>
<div class=\"ec-modal-box\">
<div class=\"ec-role\">
<span class=\"ec-inlineBtn--cancel\">";
// line 449
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お買い物を続ける"), "html", null, true);
echo "</span>
<a href=\"";
// line 450
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("cart");
echo "\" class=\"ec-inlineBtn--action\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへ進む"), "html", null, true);
echo "</a>
</div>
</div>
</div>
</div>
</div>
<div class=\"contact\">
<a href=\"";
// line 457
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("contact");
echo "?product=";
echo 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.', 457, $this->source); })()), "id", [], "any", false, false, false, 457), "html", null, true);
echo "\">この商品についてお問い合わせ</a>
</div>
";
// line 459
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.', 459, $this->source); })()), "option_favorite_product", [], "any", false, false, false, 459)) {
// line 460
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.', 460, $this->source); })()), "id", [], "any", false, false, false, 460)]), "html", null, true);
echo "\" method=\"post\">
<div class=\"ec-productRole__btn\">
";
// line 462
if (((isset($context["is_favorite"]) || array_key_exists("is_favorite", $context) ? $context["is_favorite"] : (function () { throw new RuntimeError('Variable "is_favorite" does not exist.', 462, $this->source); })()) == false)) {
// line 463
echo " <button type=\"submit\" id=\"favorite\" class=\"favorite\" title=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お気に入りに追加"), "html", null, true);
echo "\"></button>
";
} else {
// line 465
echo " <button type=\"submit\" id=\"favorite\" class=\"favorite done\" disabled=\"disabled\" title=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お気に入りに追加済です。"), "html", null, true);
echo "\"></button>
";
}
// line 467
echo " </div>
</form>
";
}
// line 470
echo " <div class=\"description\">
";
// line 472
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.', 472, $this->source); })()), "stock_min", [], "any", false, false, false, 472)) {
// line 473
echo " <p><b>在庫数</b>";
echo 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.', 473, $this->source); })()), "stock_min", [], "any", false, false, false, 473), "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.', 473, $this->source); })()), "stock_min", [], "any", false, false, false, 473) != twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 473, $this->source); })()), "stock_max", [], "any", false, false, false, 473))) {
echo " ~ ";
echo 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.', 473, $this->source); })()), "stock_max", [], "any", false, false, false, 473), "html", null, true);
}
echo "</p>
";
}
// line 475
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.', 475, $this->source); })()), "size", [], "any", false, false, false, 475)) {
// line 476
echo " <p><b>SIZE</b>";
echo 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.', 476, $this->source); })()), "size", [], "any", false, false, false, 476), "html", null, true);
echo "</p>
";
}
// line 478
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.', 478, $this->source); })()), "material", [], "any", false, false, false, 478)) {
// line 479
echo " <p><b>MATERIAL</b>";
echo 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.', 479, $this->source); })()), "material", [], "any", false, false, false, 479), "html", null, true);
echo "</p>
";
}
// line 481
echo " <p><b>DETAILS</b>
";
// line 482
echo twig_nl2br(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 482, $this->source); })()), "description_detail", [], "any", false, false, false, 482));
echo "</p>
</div>
";
// line 486
echo " <dl class=\"tag\">
<dt class=\"ft_e\">TAG</dt>
<dd>
";
// line 489
$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.', 489, $this->source); })()), "Tags", [], "any", false, false, false, 489));
foreach ($context['_seq'] as $context["_key"] => $context["Tag"]) {
// line 490
echo " <i class=\"tag_";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Tag"], "id", [], "any", false, false, false, 490), "html", null, true);
echo "\"><a href=\"/products/list?category_id=&name=&tag1=";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Tag"], "id", [], "any", false, false, false, 490), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $context["Tag"], "html", null, true);
echo "</a></i>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Tag'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 492
echo " </dd>
</dl>
</div>
</div>
<!--";
// line 496
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.', 496, $this->source); })()), "freearea", [], "any", false, false, false, 496)) {
// line 497
echo " <div class=\"ec-productRole__description\">
";
// line 498
echo twig_include($this->env, $context, twig_template_from_string($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.', 498, $this->source); })()), "freearea", [], "any", false, false, false, 498)));
echo "
</div>
";
}
// line 500
echo "-->
</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 ( 1125 => 500, 1119 => 498, 1116 => 497, 1114 => 496, 1108 => 492, 1095 => 490, 1091 => 489, 1086 => 486, 1080 => 482, 1077 => 481, 1071 => 479, 1068 => 478, 1062 => 476, 1059 => 475, 1049 => 473, 1046 => 472, 1043 => 470, 1038 => 467, 1032 => 465, 1026 => 463, 1024 => 462, 1018 => 460, 1016 => 459, 1009 => 457, 997 => 450, 993 => 449, 987 => 446, 983 => 445, 975 => 440, 972 => 439, 965 => 435, 957 => 432, 954 => 431, 947 => 429, 940 => 425, 929 => 417, 925 => 416, 921 => 415, 918 => 414, 916 => 413, 910 => 410, 906 => 409, 902 => 408, 899 => 407, 893 => 404, 889 => 403, 886 => 402, 883 => 401, 877 => 398, 871 => 397, 868 => 396, 862 => 393, 858 => 392, 855 => 391, 853 => 390, 851 => 389, 848 => 388, 846 => 387, 843 => 386, 837 => 383, 833 => 382, 830 => 381, 828 => 380, 823 => 378, 819 => 377, 816 => 376, 814 => 375, 811 => 374, 809 => 373, 805 => 372, 800 => 370, 796 => 369, 792 => 367, 780 => 364, 777 => 363, 774 => 362, 768 => 359, 762 => 357, 760 => 356, 757 => 355, 755 => 354, 749 => 352, 747 => 351, 744 => 350, 740 => 349, 738 => 348, 733 => 345, 714 => 343, 697 => 342, 693 => 340, 682 => 338, 660 => 336, 642 => 335, 637 => 332, 633 => 330, 627 => 329, 620 => 326, 607 => 324, 603 => 323, 600 => 322, 597 => 321, 583 => 320, 576 => 319, 569 => 318, 551 => 317, 548 => 316, 544 => 315, 541 => 314, 538 => 313, 536 => 312, 532 => 310, 522 => 309, 459 => 255, 445 => 243, 441 => 241, 439 => 240, 429 => 232, 427 => 231, 425 => 230, 417 => 224, 393 => 202, 385 => 197, 381 => 196, 377 => 195, 373 => 194, 369 => 192, 363 => 190, 361 => 189, 356 => 188, 353 => 187, 343 => 185, 329 => 183, 321 => 182, 303 => 181, 298 => 179, 275 => 159, 265 => 152, 235 => 125, 230 => 122, 221 => 116, 217 => 114, 215 => 113, 212 => 112, 203 => 106, 199 => 104, 197 => 103, 131 => 39, 123 => 37, 121 => 36, 116 => 34, 113 => 33, 111 => 32, 97 => 21, 94 => 20, 84 => 19, 73 => 16, 63 => 15, 52 => 11, 50 => 13, 37 => 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\" type=\"text/css\" href=\"/html/user_data/assets/css/calendar.css\">
{% 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) {
\$('.ec-grid2__cell').fadeIn(1500);
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 + ')',
'transition': 'transform .1s'
}
);
// 正しいサイズに近くなったら属性を解除する
setTimeout(removeSize, 500);
};
\$('.item_visual').on('init', slickInitial);
// リサイズ時は CLS の影響を受けないため属性を解除する
\$(window).resize(removeSize);
\$('.item_visual').slick({
dots: true,
arrows: false,
responsive: [{
breakpoint: 768,
settings: {
dots: true
}
}]
});
\$('.slideThumb').on('click', function() {
var index = \$(this).attr('data-index');
\$('.item_visual').slick('slickGoTo', index, false);
})
});
</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, .ec-inlineBtn--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>
<script>
const rental_setting = '{{ rental_setting }}';
</script>
<script src=\"/html/user_data/assets/js/calendar.js\"></script>
<script>
\$(function() {
let name = \$('#product_id').text();
if (name.length == 1) {
name = '0000' + name;
}
else if (name.length == 2) {
name = '000' + name;
}
else if (name.length == 3) {
name = '00' + name;
}
else if (name.length == 4) {
name = '0' + name;
}
\$('#product_id').text(name);
if (\$('#classcategory_id1').length == 0) {
{# レンタル商品でない場合はカレンダー非表示 #}
\$('.ec-periodInput').hide();
}
else {
\$('.ec-numberInput').hide();
let class_id = one_class_id;
{% if is_admin == 0 %}
{# 管理者でなければ商品規格から当日を除外 #}
let del = 0;
\$('#classcategory_id1 option').each(function(index) {
if (\$(this).text().indexOf('当日') > -1) {
del = index;
}
});
\$('#classcategory_id1 option').eq(del).remove();
{% else %}
{# 管理者 #}
class_id = admin_class_id;
{% endif %}
\$('#classcategory_id1 option').eq(0).remove();
let realsettings = [];
\$('#classcategory_id1 option').each(function () {
const id = \$(this).val();
for (i = 0; i < settings.length; i++) {
const setting = settings[i];
if (id == setting['id']) {
realsettings.push(setting);
}
}
});
settings = realsettings;
let period = '{{ period }}';
\$('.ec-periodInput input').val(period);
if (period) {
if (period.indexOf('~') > -1) {
period = period.split('|')[0];
period = period.split('~');
let start = period[0].split('/');
let end = period[1].split('/');
start = new Date(start[0], start[1], start[2]);
end = new Date(end[0], end[1], end[2]);
let termDay = (end - start) / 86400000;
for (i = 0; i < settings.length; i++) {
const setting = settings[i];
if (termDay == setting['period'] - 1) {
class_id = setting['id'];
}
}
}
}
else {
class_id = settings[0]['id'];
}
\$('#classcategory_id1').val(class_id).change();
let label = \$('#classcategory_id1').prev();
let number = \$('.ec-periodInput .number');
let cart_btn = \$('.add-cart');
let period_input = \$('#period');
number.hide();
setInterval(function() {
if (\$('#classcategory_id1').val() == '__unselected') {
label.text('未選択');
number.text(0);
}
else {
let price = \$('.price02-default').text();
if (label.text() != price) {
label.text(price);
}
number.text(\$('#classcategory_id1').val());
}
if (period_input.val()) {
cart_btn.show();
}
else {
cart_btn.hide();
}
}, 100);
}
\$('body').addClass('script_loaded');
});
</script>
{% endblock %}
{% block main %}
<div class=\"c_inner\">
<div class=\"item_detail\">
{% set is_gold = false %}
{% if Product.ProductCategories is not empty %}
<div class=\"head\">
{% for ProductCategory in Product.ProductCategories %}
{% set flag = false %}
{% for Category in ProductCategory.Category.path %}
{% if loop.first == true and Category.id == 131 %} {% set flag = true %} {% endif %}
{% if loop.first == true and Category.id == 193 %} {% set is_gold = true %} {% endif %}
{% endfor %}
{% if flag == true %}{# 表示するカテゴリ指定の場合の分岐処理 #}
<p>HOME >
{% for Category in ProductCategory.Category.path %}
<a href=\"{{ url('product_list') }}?category_id={{ Category.id }}\">{{ Category.name }}</a> >
{% endfor %}
{{ Product.name }}
</p>
{% endif %}
{% endfor %}
</div>
{% endif %}
<div class=\"row2\">
<div class=\"mv\">
<div class=\"item_visual\">
{% for ProductImage in Product.ProductImage %}
<div class=\"slide-item\"><img src=\"{{ asset(ProductImage, 'save_image') }}\" alt=\"{{ loop.first ? Product.name : '' }}\" width=\"550\" height=\"550\"{% if loop.index > 1 %} loading=\"lazy\"{% endif %}></div>
{% else %}
<div class=\"slide-item\"><img src=\"{{ asset(''|no_image_product, 'save_image') }}\" alt=\"{{ loop.first ? Product.name : '' }}\" width=\"550\" height=\"550\"></div>
{% endfor %}
</div>
<ul class=\"item_nav\">
{% for ProductImage in Product.ProductImage %}
<li class=\"slideThumb\" data-index=\"{{ loop.index0 }}\"><img src=\"{{ asset(ProductImage, 'save_image') }}\" alt=\"\" width=\"133\" height=\"133\" loading=\"lazy\"></li>
{% endfor %}
</ul>
</div>
<div class=\"desc\">
<!--{% if sale_type == '3' %}
<div id=\"pick_up_only\" style=\"margin-bottom: 1em\"><span>ヤマト便配送不可</span></div>
{% endif %}-->
{% if Product.freearea %}
<div id=\"pick_up_only\" style=\"margin-bottom: 1em\"><span>{{Product.freearea}}</span></div>
{% endif %}
{# 商品名 #}
<div class=\"ec-productRole__title\">
{% if Product.brand %}
<p>{{ Product.brand }}</p>
{% endif %}
<h2 class=\"ec-headingTitle\">{{ Product.name }}</h2>
</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 %}
<p class=\"data\">
<i>品番: {{ Product.number }}</i>
<i>ID: <span id=\"product_id\">{{ Product.id }}</span></i>
</p>
<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-productRole__price\" style=\"display: none;\">
{% 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>
<div class=\"ec-numberInput\"><span>{{ '数量'|trans }}</span>
{{ form_widget(form.quantity) }}
{{ form_errors(form.quantity) }}
</div>
</div>
{% if is_gold == false or user_status == 3 -%}
<div class=\"ec-periodInput\">
<div class=\"cal_root\" data-period=\"{{ reserved }}\">
{{ form_widget(form.period) }}
{{ form_errors(form.period) }}
<em>レンタル期間を選択する</em>
<div class=\"cal_wrap\"></div>
<div class=\"number\"></div>
</div>
</div>
<div class=\"ec-productRole__btn\">
<button type=\"submit\" class=\"ec-blockBtn--action add-cart\">
{{ 'RESERVE'|trans }}
</button>
</div>
{% else %}
<div style=\"display:none\">{{ form_widget(form.period) }}{{ form_errors(form.period) }}</div>
{% endif %}
{% else %}
<div style=\"display:none\">{{ form_widget(form.period) }}{{ form_errors(form.period) }}</div>
<div class=\"ec-productRole__btn\">
<button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
{{ 'ただいま品切れ中です。'|trans }}
</button>
</div>
{% endif %}
{{ form_rest(form) }}
</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=\"ec-modal-box\">
<div class=\"ec-role\">
<span class=\"ec-inlineBtn--cancel\">{{ 'お買い物を続ける'|trans }}</span>
<a href=\"{{ url('cart') }}\" class=\"ec-inlineBtn--action\">{{ 'カートへ進む'|trans }}</a>
</div>
</div>
</div>
</div>
</div>
<div class=\"contact\">
<a href=\"{{ url('contact') }}?product={{ Product.id }}\">この商品についてお問い合わせ</a>
</div>
{% 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=\"favorite\" title=\"{{ 'お気に入りに追加'|trans }}\"></button>
{% else %}
<button type=\"submit\" id=\"favorite\" class=\"favorite done\" disabled=\"disabled\" title=\"{{ 'お気に入りに追加済です。'|trans }}\"></button>
{% endif %}
</div>
</form>
{% endif %}
<div class=\"description\">
{# 在庫数 #}
{% if Product.stock_min %}
<p><b>在庫数</b>{{ Product.stock_min }}{% if Product.stock_min != Product.stock_max %} ~ {{ Product.stock_max }}{% endif %}</p>
{% endif %}
{% if Product.size %}
<p><b>SIZE</b>{{ Product.size }}</p>
{% endif %}
{% if Product.material %}
<p><b>MATERIAL</b>{{ Product.material }}</p>
{% endif %}
<p><b>DETAILS</b>
{{ Product.description_detail|raw|nl2br }}</p>
</div>
{# タグ #}
<dl class=\"tag\">
<dt class=\"ft_e\">TAG</dt>
<dd>
{% for Tag in Product.Tags %}
<i class=\"tag_{{ Tag.id }}\"><a href=\"/products/list?category_id=&name=&tag1={{ Tag.id }}\">{{ Tag }}</a></i>
{% endfor %}
</dd>
</dl>
</div>
</div>
<!--{% if Product.freearea %}
<div class=\"ec-productRole__description\">
{{ include(template_from_string(Product.freearea)) }}
</div>
{% endif %}-->
</div>
</div>
{% endblock %}", "Product/detail.twig", "/home/xs355060/ppplot.com/public_html/props.ppplot.com/app/template/default/Product/detail.twig");
}
}