<?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'],
'breadcrumb' => [$this, 'block_breadcrumb'],
'main' => [$this, 'block_main'],
];
$this->sandbox = $this->env->getExtension('\Twig\Extension\SandboxExtension');
$this->checkSecurity();
}
protected function doGetParent(array $context)
{
// line 13
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 14
$context["body_class"] = "product_page";
// line 13
$this->parent = $this->loadTemplate("default_frame.twig", "Product/detail.twig", 13);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 17
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 18
echo " <style>
.slick-slider {
margin-bottom: 30px;
}
.slick-dots {
position: absolute;
bottom: -45px;
display: block;
width: 100%;
padding: 0;
list-style: none;
text-align: center;
}
.slick-dots li {
position: relative;
display: inline-block;
width: 20px;
height: 20px;
margin: 0 5px;
padding: 0;
cursor: pointer;
}
.slick-dots li button {
font-size: 0;
line-height: 0;
display: block;
width: 20px;
height: 20px;
padding: 5px;
cursor: pointer;
color: transparent;
border: 0;
outline: none;
background: transparent;
}
.slick-dots li button:hover,
.slick-dots li button:focus {
outline: none;
}
.slick-dots li button:hover:before,
.slick-dots li button:focus:before {
opacity: 1;
}
.slick-dots li button:before {
content: \" \";
line-height: 20px;
position: absolute;
top: 0;
left: 0;
width: 12px;
height: 12px;
text-align: center;
opacity: .25;
background-color: black;
border-radius: 50%;
}
.slick-dots li.slick-active button:before {
opacity: .75;
background-color: black;
}
.slick-dots li button.thumbnail img {
width: 0;
height: 0;
}
</style>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 98
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 99
echo " <script>
eccube.classCategories = ";
// line 100
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.', 100, $this->source); })()), 100, $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 111
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id2", [], "any", true, true, true, 111)) {
// line 112
echo " fnSetClassCategories(
\$('#form1'), ";
// line 113
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.', 113, $this->source); })()), "classcategory_id2", [], "any", false, false, true, 113), "vars", [], "any", false, false, true, 113), "value", [], "any", false, false, true, 113), 113, $this->source));
echo "
);
";
} elseif (twig_get_attribute($this->env, $this->source, // line 115
($context["form"] ?? null), "classcategory_id1", [], "any", true, true, true, 115)) {
// line 116
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.', 116, $this->source); })()), "id", [], "any", false, false, true, 116), 116, $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.', 116, $this->source); })()), "classcategory_id1", [], "any", false, false, true, 116), "vars", [], "any", false, false, true, 116), "value", [], "any", false, false, true, 116), 116, $this->source));
echo ", null);
";
}
// line 118
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: false,
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 182
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id1", [], "any", true, true, true, 182)) {
// line 183
echo " // 規格1フォームの必須チェック
if (\$('#classcategory_id1').val() == '__unselected' || \$('#classcategory_id1').val() == '') {
\$('#classcategory_id1')[0].setCustomValidity('";
// line 185
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 191
echo "
";
// line 192
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id2", [], "any", true, true, true, 192)) {
// line 193
echo " // 規格2フォームの必須チェック
if (\$('#classcategory_id2').val() == '__unselected' || \$('#classcategory_id2').val() == '') {
\$('#classcategory_id2')[0].setCustomValidity('";
// line 195
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 201
echo "
// 個数フォームのチェック
if (\$('#quantity').val() < 1) {
\$('#quantity')[0].setCustomValidity('";
// line 204
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 231
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 238
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 258
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.', 258, $this->source); })()), "name", [], "any", false, false, true, 258), 258, $this->source), "html", null, true);
echo "\",
\"image\": [
";
// line 260
$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.', 260, $this->source); })()), "ProductImage", [], "any", false, false, true, 260));
$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 261
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.', 261, $this->source); })()), "request", [], "any", false, false, true, 261), "schemeAndHttpHost", [], "any", false, false, true, 261), 261, $this->source), "html", null, true);
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->sandbox->ensureToStringAllowed($context["img"], 261, $this->source), "save_image"), "html", null, true);
echo "\"";
if ( !twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, true, 261)) {
echo ",";
}
// line 262
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 264
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.', 264, $this->source); })()), "request", [], "any", false, false, true, 264), "schemeAndHttpHost", [], "any", false, false, true, 264), 264, $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 266
echo " ],
\"description\": \"";
// line 267
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, 267)) ? (_twig_default_filter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, ($context["Product"] ?? null), "description_list", [], "any", false, false, true, 267), 267, $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.', 267, $this->source); })()), "description_detail", [], "any", false, false, true, 267), 267, $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.', 267, $this->source); })()), "description_detail", [], "any", false, false, true, 267))), ["
" => "", "
" => ""]), 0, 300), "html", null, true);
echo "\",
";
// line 268
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.', 268, $this->source); })()), "code_min", [], "any", false, false, true, 268)) {
// line 269
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.', 269, $this->source); })()), "code_min", [], "any", false, false, true, 269), 269, $this->source), "html", null, true);
echo "\",
";
}
// line 271
echo " \"offers\": {
\"@type\": \"Offer\",
\"url\": \"";
// line 273
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.', 273, $this->source); })()), "id", [], "any", false, false, true, 273)]), "html", null, true);
echo "\",
\"priceCurrency\": \"";
// line 274
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.', 274, $this->source); })()), "currency", [], "any", false, false, true, 274), 274, $this->source), "html", null, true);
echo "\",
\"price\": ";
// line 275
((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.', 275, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, true, 275)) ? (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.', 275, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, true, 275), "html", null, true))) : (print (0)));
echo ",
\"availability\": \"";
// line 276
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.', 276, $this->source); })()), "stock_find", [], "any", false, false, true, 276)) ? ("InStock") : ("OutOfStock"));
echo "\"
}
}
</script>
<script>
\$(function() {
\$('.input-group').on('click', '.btn', function() {
var \$input = \$(this).closest('.input-group').find('input');
var value = parseInt(\$input.val());
if (\$(this).hasClass('btn-plus')) {
value = value + 1;
} else {
if (value > 1) {
value = value - 1;
}
}
\$input.val(value);
});
});
</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 302
public function block_breadcrumb($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", "breadcrumb"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "breadcrumb"));
// line 303
echo "
";
// line 305
echo "<div class=\"breadcrumb-root\">
";
// line 306
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.', 306, $this->source); })()), "ProductCategories", [], "any", false, false, true, 306))) {
// line 307
echo " <div class=\"breadcrumb-wrapper container\">
<ul>
";
// line 309
$context["product_categories_length"] = twig_length_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.', 309, $this->source); })()), "ProductCategories", [], "any", false, false, true, 309), 309, $this->source));
// line 310
echo " ";
$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.', 310, $this->source); })()), "ProductCategories", [], "any", false, false, true, 310));
$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["ProductCategory"]) {
// line 311
echo " ";
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, true, 311) == (isset($context["product_categories_length"]) || array_key_exists("product_categories_length", $context) ? $context["product_categories_length"] : (function () { throw new RuntimeError('Variable "product_categories_length" does not exist.', 311, $this->source); })()))) {
// line 312
echo " <li>
<a href=\"";
// line 313
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("homepage");
echo "\">
トップ
</a>
<svg width=\"5\" height=\"8\" viewBox=\"0 0 5 8\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">
<path d=\"M0.90918 1L3.63645 4L0.90918 7\" stroke=\"#1A1A1A\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>
</svg>
";
// line 319
$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, 319), "path", [], "any", false, false, true, 319));
$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 320
echo " <a href=\"";
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
echo "?category_id=";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Category"], "id", [], "any", false, false, true, 320), 320, $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, 320), 320, $this->source), "html", null, true);
echo "</a>";
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, true, 320) == false)) {
// line 321
echo " <svg width=\"5\" height=\"8\" viewBox=\"0 0 5 8\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">
<path d=\"M0.90918 1L3.63645 4L0.90918 7\" stroke=\"#1A1A1A\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>
</svg>
";
}
++$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 326
echo " <svg width=\"5\" height=\"8\" viewBox=\"0 0 5 8\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">
<path d=\"M0.90918 1L3.63645 4L0.90918 7\" stroke=\"#1A1A1A\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>
</svg>
<span>";
// line 330
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.', 330, $this->source); })()), "code_max", [], "any", false, false, true, 330), 330, $this->source), "html", null, true);
echo "</span>
</li>
";
}
// line 333
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['ProductCategory'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 334
echo " </ul>
</div>
";
}
// line 337
echo " </div>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 341
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 342
echo " <div class=\"ec-productRole\">
<div class=\"ec-grid2\">
<div class=\"ec-grid2__cell product-detail-page-left mb-10 mb-md-0\">
<div class=\"ec-sliderItemRole\">
<div class=\"item_visual\">
";
// line 347
$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.', 347, $this->source); })()), "ProductImage", [], "any", false, false, true, 347));
$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 348
echo " <div class=\"slide-item\"><img src=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->sandbox->ensureToStringAllowed($context["ProductImage"], 348, $this->source), "save_image"), "html", null, true);
echo "\" alt=\"";
((twig_get_attribute($this->env, $this->source, $context["loop"], "first", [], "any", false, false, true, 348)) ? (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.', 348, $this->source); })()), "name", [], "any", false, false, true, 348), "html", null, true))) : (print ("")));
echo "\" width=\"550\" height=\"550\"";
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, true, 348) > 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 350
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, true, 350)) ? (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.', 350, $this->source); })()), "name", [], "any", false, false, true, 350), "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 352
echo " </div>
<div class=\"item_nav\">
";
// line 354
$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.', 354, $this->source); })()), "ProductImage", [], "any", false, false, true, 354));
$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 355
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, 355), 355, $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"], 355, $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 357
echo " </div>
</div>
</div>
<div class=\"product-detail-page-right\">
<div class=\"ec-productRole__profile\">
";
// line 363
echo " ";
if ((isset($context["company_name"]) || array_key_exists("company_name", $context) ? $context["company_name"] : (function () { throw new RuntimeError('Variable "company_name" does not exist.', 363, $this->source); })())) {
// line 364
echo " <div class=\"px-5 px-md-0\">
<p class=\"product-detail-page-company-name\">
";
// line 366
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["company_name"]) || array_key_exists("company_name", $context) ? $context["company_name"] : (function () { throw new RuntimeError('Variable "company_name" does not exist.', 366, $this->source); })()), 366, $this->source), "html", null, true);
echo "
</p>
</div>
";
}
// line 370
echo "
";
// line 371
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.', 371, $this->source); })()), "description_list", [], "any", false, false, true, 371)) {
// line 372
echo " <div class=\"px-5 px-md-0\">
<p class=\"product-detail-page-description-list\">
";
// line 374
echo twig_escape_filter($this->env, twig_striptags($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.', 374, $this->source); })()), "description_list", [], "any", false, false, true, 374), 374, $this->source)), "html", null, true);
echo "
</p>
</div>
";
}
// line 378
echo "
";
// line 380
echo " <div class=\"px-5 px-md-0\">
";
// line 381
if ((isset($context["formated_product_name"]) || array_key_exists("formated_product_name", $context) ? $context["formated_product_name"] : (function () { throw new RuntimeError('Variable "formated_product_name" does not exist.', 381, $this->source); })())) {
// line 382
echo " <h2 class=\"product-detail-page-product-name\">
";
// line 383
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["formated_product_name"]) || array_key_exists("formated_product_name", $context) ? $context["formated_product_name"] : (function () { throw new RuntimeError('Variable "formated_product_name" does not exist.', 383, $this->source); })()), 383, $this->source), "html", null, true);
echo "
</h2>
";
} else {
// line 387
echo " <h2 class=\"product-detail-page-product-name\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 387, $this->source); })()), "name", [], "any", false, false, true, 387), 387, $this->source), "html", null, true);
echo "</h2>
";
}
// line 389
echo " </div>
";
// line 392
echo "\t\t\t\t\t<div class=\"px-5 px-md-0\">
\t\t\t\t\t\t<div class=\"product-detail-page-badge-container\">
\t\t\t\t\t\t\t";
// line 395
echo "\t\t\t\t\t\t\t";
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.', 395, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, true, 395) > 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.', 395, $this->source); })()), "delivery_free_amount", [], "any", false, false, true, 395))) {
// line 396
echo "\t\t\t\t\t\t\t\t<spam class=\"product-detail-page-badge bg-primary-blue\">送料無料</spam>
\t\t\t\t\t\t\t";
}
// line 398
echo "\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
";
// line 402
echo " <div class=\"px-5 px-md-0\">
<p class=\"product-detail-page-price-label\">販売価格 (税込)</p>
<div class=\"product-detail-page-price\">
<p class=\"product-detail-page-price__number\">
";
// line 407
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.', 407, $this->source); })()), "hasProductClass", [], "any", false, false, true, 407)) {
// line 408
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.', 408, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, true, 408) == 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.', 408, $this->source); })()), "getPrice02IncTaxMax", [], "any", false, false, true, 408))) {
// line 409
echo " ";
echo twig_escape_filter($this->env, twig_number_format_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.', 409, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, true, 409), 409, $this->source)), "html", null, true);
echo "
";
} else {
// line 411
echo " ";
echo twig_escape_filter($this->env, twig_number_format_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.', 411, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, true, 411), 411, $this->source)), "html", null, true);
echo " ~ ";
echo twig_escape_filter($this->env, twig_number_format_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.', 411, $this->source); })()), "getPrice02IncTaxMax", [], "any", false, false, true, 411), 411, $this->source)), "html", null, true);
echo "
";
}
// line 413
echo " ";
} else {
// line 414
echo " ";
echo twig_escape_filter($this->env, twig_number_format_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.', 414, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, true, 414), 414, $this->source)), "html", null, true);
echo "
";
}
// line 416
echo " </p>
<p class=\"product-detail-page-price__yen\">
円
</p>
";
// line 421
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.', 421, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, true, 421) > 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.', 421, $this->source); })()), "delivery_free_amount", [], "any", false, false, true, 421))) {
// line 422
echo " ";
// line 425
echo " ";
}
// line 426
echo " </div>
</div>
";
// line 429
echo "
<div>
";
// line 432
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.', 432, $this->source); })()), "stock_min", [], "any", false, false, true, 432)) {
echo "
<div class=\"product-detail-page-bos\">
<span class=\"product-detail-page-bos__label\">
在庫数
</span>
<span class=\"product-detail-page-bos__stock\">
残り";
// line 438
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.', 438, $this->source); })()), "stock_min", [], "any", false, false, true, 438), 438, $this->source));
echo "
</span>
</div>
";
}
// line 442
echo " <form action=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_add_cart", ["id" => twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 442, $this->source); })()), "id", [], "any", false, false, true, 442)]), "html", null, true);
echo "\" method=\"post\" id=\"form1\" name=\"form1\">
";
// line 443
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.', 443, $this->source); })()), "stock_find", [], "any", false, false, true, 443)) {
// line 444
echo " ";
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id1", [], "any", true, true, true, 444)) {
// line 445
echo " <div class=\"product-detail-page-bos\">
<div class=\"d-flex align-items-center\">
<div class=\"product-detail-page-bos__label\">
";
// line 448
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.', 448, $this->source); })()), "classcategory_id1", [], "any", false, false, true, 448), 448, $this->source), 'label');
echo "
</div>
</div>
<div>
<div>
<div class=\"input-group\">
";
// line 454
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.', 454, $this->source); })()), "classcategory_id1", [], "any", false, false, true, 454), 454, $this->source), 'widget');
echo "
";
// line 455
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.', 455, $this->source); })()), "classcategory_id1", [], "any", false, false, true, 455), 455, $this->source), 'errors');
echo "
</div>
</div>
</div>
</div>
";
}
// line 461
echo " ";
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id2", [], "any", true, true, true, 461)) {
// line 462
echo " <div class=\"product-detail-page-bos\">
<div class=\"d-flex align-items-center\">
<div class=\"product-detail-page-bos__label\">
";
// line 465
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.', 465, $this->source); })()), "classcategory_id2", [], "any", false, false, true, 465), 465, $this->source), 'label');
echo "
</div>
</div>
<div>
<div>
<div class=\"input-group\">
";
// line 471
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.', 471, $this->source); })()), "classcategory_id2", [], "any", false, false, true, 471), 471, $this->source), 'widget');
echo "
";
// line 472
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.', 472, $this->source); })()), "classcategory_id2", [], "any", false, false, true, 472), 472, $this->source), 'errors');
echo "
</div>
</div>
</div>
</div>
";
}
// line 478
echo "
\t\t\t\t\t\t\t\t";
// line 480
echo "\t\t\t\t\t\t\t\t";
if (((isset($context["deliveryDuration_id"]) || array_key_exists("deliveryDuration_id", $context) ? $context["deliveryDuration_id"] : (function () { throw new RuntimeError('Variable "deliveryDuration_id" does not exist.', 480, $this->source); })()) && (isset($context["deliveryDuration_name"]) || array_key_exists("deliveryDuration_name", $context) ? $context["deliveryDuration_name"] : (function () { throw new RuntimeError('Variable "deliveryDuration_name" does not exist.', 480, $this->source); })()))) {
// line 481
echo "\t\t\t\t\t\t\t\t<div class=\"product-detail-page-bos\">
\t\t\t\t\t\t\t\t\t<div class=\"product-detail-page-bos__label\" style=\"white-space: nowrap\">
発送日目安
\t\t\t\t\t\t\t\t\t</div>
<div>
<div>
\t\t\t\t\t\t\t\t\t\t\t<span>";
// line 487
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["deliveryDuration_name"]) || array_key_exists("deliveryDuration_name", $context) ? $context["deliveryDuration_name"] : (function () { throw new RuntimeError('Variable "deliveryDuration_name" does not exist.', 487, $this->source); })()), 487, $this->source), "html", null, true);
echo "</span>
</div>
</div>
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t";
}
// line 492
echo " <div class=\"product-detail-page-bos\">
<div class=\"product-detail-page-bos__label\">
数量
</div>
<div>
<div>
<div class=\"input-group\">
<span class=\"input-group-btn\">
<button class=\"btn btn-default btn-minus\" type=\"button\">-</button>
</span>
";
// line 502
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.', 502, $this->source); })()), "quantity", [], "any", false, false, true, 502), 502, $this->source), 'widget', ["attr" => ["class" => "input-quantity", "min" => "1"]]);
echo "
";
// line 503
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.', 503, $this->source); })()), "quantity", [], "any", false, false, true, 503), 503, $this->source), 'errors');
echo "
<span class=\"input-group-btn\">
<button class=\"btn btn-default btn-plus\" type=\"button\">+</button>
</span>
</div>
</div>
</div>
</div>
";
}
// line 512
echo "
";
// line 514
echo "
<div class=\"mt-md-8\">
";
// line 516
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.', 516, $this->source); })()), "stock_find", [], "any", false, false, true, 516)) {
// line 517
echo " <button type=\"submit\" class=\"button w-100\">
";
// line 518
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに入れる"), "html", null, true);
echo "
</button>
";
} else {
// line 521
echo " <button type=\"button\" class=\"button w-100\" disabled=\"disabled\">
";
// line 522
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ただいま品切れ中です。"), "html", null, true);
echo "
</button>
";
}
// line 525
echo " </div>
";
// line 526
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.', 526, $this->source); })()), 526, $this->source), 'rest');
echo "
</form>
";
// line 530
echo " <div class=\"mt-7 mt-md-6\">
";
// line 531
echo $this->extensions['Eccube\Twig\Extension\IgnoreTwigSandboxErrorExtension']->twig_include($this->env, $context, "Block/button-favorite.twig");
echo "
</div>
</div>
<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 538
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 539
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 542
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お買い物を続ける"), "html", null, true);
echo "</span>
<a href=\"";
// line 543
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>
</div>
</div>
</div> ";
// line 553
echo "
";
// line 555
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.', 555, $this->source); })()), "freearea", [], "any", false, false, true, 555) || 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.', 555, $this->source); })()), "description_detail", [], "any", false, false, true, 555))) {
// line 556
echo " <div class=\"mt-12\">
<h3 class=\"product-detail-page-description-heading\">商品説明</h3>
<div>
<div class=\"product-detail-page-description-container\">";
// line 559
echo $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.', 559, $this->source); })()), "description_detail", [], "any", false, false, true, 559), 559, $this->source);
echo "
</div>
<div class=\"product-detail-page-description-container\">
";
// line 562
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.', 562, $this->source); })()), "freearea", [], "any", false, false, true, 562), 562, $this->source)));
echo "
</div>
</div>
</div>
";
}
// line 567
echo "
<div>
";
// line 569
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.', 569, $this->source); })()), "code_min", [], "any", false, false, true, 569))) {
// line 570
echo " <div class=\"product-detail-page-product-code\">
";
// line 571
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("商品番号"), "html", null, true);
echo ": <span class=\"product-code-default\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 571, $this->source); })()), "code_min", [], "any", false, false, true, 571), 571, $this->source), "html", null, true);
if ((twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 571, $this->source); })()), "code_min", [], "any", false, false, true, 571) != 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.', 571, $this->source); })()), "code_max", [], "any", false, false, true, 571))) {
echo " ~ ";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 571, $this->source); })()), "code_max", [], "any", false, false, true, 571), 571, $this->source), "html", null, true);
}
echo "</span>
</div>
";
}
// line 574
echo " </div>
<div class=\"d-none d-md-block mt-15\">
";
// line 577
echo $this->extensions['Eccube\Twig\Extension\IgnoreTwigSandboxErrorExtension']->twig_include($this->env, $context, "Block/large-banners.twig");
echo "
</div>
<div class=\"mt-15\">
";
// line 581
echo $this->extensions['Eccube\Twig\Extension\IgnoreTwigSandboxErrorExtension']->twig_include($this->env, $context, "Block/recommend_list.twig", ["label" => "おすすめ当店在庫品", "category_id" => 32]);
echo "
</div>
<div class=\"d-none d-md-block mt-15\">
";
// line 585
echo $this->extensions['Eccube\Twig\Extension\IgnoreTwigSandboxErrorExtension']->twig_include($this->env, $context, "Block/recommend_list.twig", ["label" => "ブレーカおすすめ商品", "category_id" => 14]);
echo "
</div>
<div class=\"d-none d-md-block mt-20\">
";
// line 589
echo $this->extensions['Eccube\Twig\Extension\IgnoreTwigSandboxErrorExtension']->twig_include($this->env, $context, "Block/category_list.twig", ["label" => "カテゴリーから探す", "href_label" => "すべてのカテゴリーを見る"]);
echo "
</div>
<div class=\"d-none d-md-block mt-15\">
";
// line 593
echo $this->extensions['Eccube\Twig\Extension\IgnoreTwigSandboxErrorExtension']->twig_include($this->env, $context, "Block/makers.twig", array(), true, true);
echo "
</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 ( 1177 => 593, 1170 => 589, 1163 => 585, 1156 => 581, 1149 => 577, 1144 => 574, 1132 => 571, 1129 => 570, 1127 => 569, 1123 => 567, 1115 => 562, 1109 => 559, 1104 => 556, 1101 => 555, 1098 => 553, 1084 => 543, 1080 => 542, 1074 => 539, 1070 => 538, 1060 => 531, 1057 => 530, 1051 => 526, 1048 => 525, 1042 => 522, 1039 => 521, 1033 => 518, 1030 => 517, 1028 => 516, 1024 => 514, 1021 => 512, 1009 => 503, 1005 => 502, 993 => 492, 985 => 487, 977 => 481, 974 => 480, 971 => 478, 962 => 472, 958 => 471, 949 => 465, 944 => 462, 941 => 461, 932 => 455, 928 => 454, 919 => 448, 914 => 445, 911 => 444, 909 => 443, 904 => 442, 897 => 438, 887 => 432, 883 => 429, 879 => 426, 876 => 425, 874 => 422, 871 => 421, 865 => 416, 859 => 414, 856 => 413, 848 => 411, 842 => 409, 840 => 408, 838 => 407, 831 => 402, 826 => 398, 822 => 396, 819 => 395, 815 => 392, 811 => 389, 805 => 387, 798 => 383, 795 => 382, 793 => 381, 790 => 380, 787 => 378, 780 => 374, 776 => 372, 774 => 371, 771 => 370, 764 => 366, 760 => 364, 757 => 363, 750 => 357, 731 => 355, 714 => 354, 710 => 352, 699 => 350, 677 => 348, 659 => 347, 652 => 342, 642 => 341, 631 => 337, 626 => 334, 612 => 333, 606 => 330, 600 => 326, 582 => 321, 573 => 320, 556 => 319, 547 => 313, 544 => 312, 541 => 311, 523 => 310, 521 => 309, 517 => 307, 515 => 306, 512 => 305, 509 => 303, 499 => 302, 464 => 276, 460 => 275, 456 => 274, 452 => 273, 448 => 271, 442 => 269, 440 => 268, 435 => 267, 432 => 266, 422 => 264, 408 => 262, 400 => 261, 382 => 260, 377 => 258, 354 => 238, 344 => 231, 314 => 204, 309 => 201, 300 => 195, 296 => 193, 294 => 192, 291 => 191, 282 => 185, 278 => 183, 276 => 182, 210 => 118, 202 => 116, 200 => 115, 195 => 113, 192 => 112, 190 => 111, 176 => 100, 173 => 99, 163 => 98, 76 => 18, 66 => 17, 55 => 13, 53 => 14, 40 => 13,);
}
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 %}
<style>
.slick-slider {
margin-bottom: 30px;
}
.slick-dots {
position: absolute;
bottom: -45px;
display: block;
width: 100%;
padding: 0;
list-style: none;
text-align: center;
}
.slick-dots li {
position: relative;
display: inline-block;
width: 20px;
height: 20px;
margin: 0 5px;
padding: 0;
cursor: pointer;
}
.slick-dots li button {
font-size: 0;
line-height: 0;
display: block;
width: 20px;
height: 20px;
padding: 5px;
cursor: pointer;
color: transparent;
border: 0;
outline: none;
background: transparent;
}
.slick-dots li button:hover,
.slick-dots li button:focus {
outline: none;
}
.slick-dots li button:hover:before,
.slick-dots li button:focus:before {
opacity: 1;
}
.slick-dots li button:before {
content: \" \";
line-height: 20px;
position: absolute;
top: 0;
left: 0;
width: 12px;
height: 12px;
text-align: center;
opacity: .25;
background-color: black;
border-radius: 50%;
}
.slick-dots li.slick-active button:before {
opacity: .75;
background-color: black;
}
.slick-dots li button.thumbnail img {
width: 0;
height: 0;
}
</style>
{% 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: false,
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>
\$(function() {
\$('.input-group').on('click', '.btn', function() {
var \$input = \$(this).closest('.input-group').find('input');
var value = parseInt(\$input.val());
if (\$(this).hasClass('btn-plus')) {
value = value + 1;
} else {
if (value > 1) {
value = value - 1;
}
}
\$input.val(value);
});
});
</script>
{% endblock %}
{% block breadcrumb %}
{# パンくず #}
<div class=\"breadcrumb-root\">
{% if Product.ProductCategories is not empty %}
<div class=\"breadcrumb-wrapper container\">
<ul>
{% set product_categories_length = Product.ProductCategories|length %}
{% for ProductCategory in Product.ProductCategories %}
{% if loop.index == product_categories_length %}
<li>
<a href=\"{{ url('homepage') }}\">
トップ
</a>
<svg width=\"5\" height=\"8\" viewBox=\"0 0 5 8\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">
<path d=\"M0.90918 1L3.63645 4L0.90918 7\" stroke=\"#1A1A1A\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>
</svg>
{% for Category in ProductCategory.Category.path %}
<a href=\"{{ url('product_list') }}?category_id={{ Category.id }}\">{{ Category.name }}</a> {%- if loop.last == false %}
<svg width=\"5\" height=\"8\" viewBox=\"0 0 5 8\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">
<path d=\"M0.90918 1L3.63645 4L0.90918 7\" stroke=\"#1A1A1A\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>
</svg>
{% endif -%}
{% endfor %}
<svg width=\"5\" height=\"8\" viewBox=\"0 0 5 8\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">
<path d=\"M0.90918 1L3.63645 4L0.90918 7\" stroke=\"#1A1A1A\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>
</svg>
<span>{{ Product.code_max }}</span>
</li>
{% endif %}
{% endfor %}
</ul>
</div>
{% endif %}
</div>
{% endblock %}
{# コンテンツ #}
{% block main %}
<div class=\"ec-productRole\">
<div class=\"ec-grid2\">
<div class=\"ec-grid2__cell product-detail-page-left mb-10 mb-md-0\">
<div class=\"ec-sliderItemRole\">
<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>
<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>
</div>
</div>
<div class=\"product-detail-page-right\">
<div class=\"ec-productRole__profile\">
{# 会社名 from ProductDetailContoroller #}
{% if company_name %}
<div class=\"px-5 px-md-0\">
<p class=\"product-detail-page-company-name\">
{{ company_name }}
</p>
</div>
{% endif %}
{% if Product.description_list %}
<div class=\"px-5 px-md-0\">
<p class=\"product-detail-page-description-list\">
{{ Product.description_list|striptags }}
</p>
</div>
{% endif %}
{# 商品名 from ProductDetailContoroller #}
<div class=\"px-5 px-md-0\">
{% if formated_product_name %}
<h2 class=\"product-detail-page-product-name\">
{{ formated_product_name }}
</h2>
{% else %}
<h2 class=\"product-detail-page-product-name\">{{ Product.name }}</h2>
{% endif %}
</div>
{# 送料無料 #}
\t\t\t\t\t<div class=\"px-5 px-md-0\">
\t\t\t\t\t\t<div class=\"product-detail-page-badge-container\">
\t\t\t\t\t\t\t{# 送料無料条件よりも商品価格が上だったら表示 9,800 #}
\t\t\t\t\t\t\t{% if Product.getPrice02IncTaxMin > BaseInfo.delivery_free_amount %}
\t\t\t\t\t\t\t\t<spam class=\"product-detail-page-badge bg-primary-blue\">送料無料</spam>
\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
{# 販売価格 #}
<div class=\"px-5 px-md-0\">
<p class=\"product-detail-page-price-label\">販売価格 (税込)</p>
<div class=\"product-detail-page-price\">
<p class=\"product-detail-page-price__number\">
{% if Product.hasProductClass -%}
{% if Product.getPrice02IncTaxMin == Product.getPrice02IncTaxMax %}
{{ Product.getPrice02IncTaxMin|number_format }}
{% else %}
{{ Product.getPrice02IncTaxMin|number_format }} ~ {{ Product.getPrice02IncTaxMax|number_format }}
{% endif %}
{% else %}
{{ Product.getPrice02IncTaxMin|number_format }}
{% endif %}
</p>
<p class=\"product-detail-page-price__yen\">
円
</p>
{# 送料無料条件よりも商品価格が上だったら #}
{% if Product.getPrice02IncTaxMin > BaseInfo.delivery_free_amount %}
{# <p class=\"product-detail-page-price__freeship\">
送料無料
</p> #}
{% endif %}
</div>
</div>
{# 発送日目安を表示したい #}
<div>
{# 在庫数 #}
{% if Product.stock_min %}
<div class=\"product-detail-page-bos\">
<span class=\"product-detail-page-bos__label\">
在庫数
</span>
<span class=\"product-detail-page-bos__stock\">
残り{{ Product.stock_min|escape }}
</span>
</div>
{% endif %}
<form action=\"{{ url('product_add_cart', {id:Product.id}) }}\" method=\"post\" id=\"form1\" name=\"form1\">
{% if Product.stock_find %}
{% if form.classcategory_id1 is defined %}
<div class=\"product-detail-page-bos\">
<div class=\"d-flex align-items-center\">
<div class=\"product-detail-page-bos__label\">
{{ form_label(form.classcategory_id1) }}
</div>
</div>
<div>
<div>
<div class=\"input-group\">
{{ form_widget(form.classcategory_id1) }}
{{ form_errors(form.classcategory_id1) }}
</div>
</div>
</div>
</div>
{% endif %}
{% if form.classcategory_id2 is defined %}
<div class=\"product-detail-page-bos\">
<div class=\"d-flex align-items-center\">
<div class=\"product-detail-page-bos__label\">
{{ form_label(form.classcategory_id2) }}
</div>
</div>
<div>
<div>
<div class=\"input-group\">
{{ form_widget(form.classcategory_id2) }}
{{ form_errors(form.classcategory_id2) }}
</div>
</div>
</div>
</div>
{% endif %}
\t\t\t\t\t\t\t\t{# 発送日目安 #}
\t\t\t\t\t\t\t\t{% if deliveryDuration_id and deliveryDuration_name %}
\t\t\t\t\t\t\t\t<div class=\"product-detail-page-bos\">
\t\t\t\t\t\t\t\t\t<div class=\"product-detail-page-bos__label\" style=\"white-space: nowrap\">
発送日目安
\t\t\t\t\t\t\t\t\t</div>
<div>
<div>
\t\t\t\t\t\t\t\t\t\t\t<span>{{ deliveryDuration_name }}</span>
</div>
</div>
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t{% endif %}
<div class=\"product-detail-page-bos\">
<div class=\"product-detail-page-bos__label\">
数量
</div>
<div>
<div>
<div class=\"input-group\">
<span class=\"input-group-btn\">
<button class=\"btn btn-default btn-minus\" type=\"button\">-</button>
</span>
{{ form_widget(form.quantity, {'attr': {'class': 'input-quantity', 'min': '1'}}) }}
{{ form_errors(form.quantity) }}
<span class=\"input-group-btn\">
<button class=\"btn btn-default btn-plus\" type=\"button\">+</button>
</span>
</div>
</div>
</div>
</div>
{% endif %}
{# カートに入れる #}
<div class=\"mt-md-8\">
{% if Product.stock_find %}
<button type=\"submit\" class=\"button w-100\">
{{ 'カートに入れる'|trans }}
</button>
{% else %}
<button type=\"button\" class=\"button w-100\" disabled=\"disabled\">
{{ 'ただいま品切れ中です。'|trans }}
</button>
{% endif %}
</div>
{{ form_rest(form) }}
</form>
{# お気に入りに追加 #}
<div class=\"mt-7 mt-md-6\">
{{ include('Block/button-favorite.twig') }}
</div>
</div>
<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>
</div>
</div>
</div> {# .ec-productRole #}
{# 商品詳細 フリースペース #}
{% if Product.freearea or Product.description_detail %}
<div class=\"mt-12\">
<h3 class=\"product-detail-page-description-heading\">商品説明</h3>
<div>
<div class=\"product-detail-page-description-container\">{{ Product.description_detail|raw}}
</div>
<div class=\"product-detail-page-description-container\">
{{ include(template_from_string(Product.freearea)) }}
</div>
</div>
</div>
{% endif %}
<div>
{% if Product.code_min is not empty %}
<div class=\"product-detail-page-product-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>
<div class=\"d-none d-md-block mt-15\">
{{ include('Block/large-banners.twig') }}
</div>
<div class=\"mt-15\">
{{ include('Block/recommend_list.twig', {label: 'おすすめ当店在庫品', category_id: 32}) }}
</div>
<div class=\"d-none d-md-block mt-15\">
{{ include('Block/recommend_list.twig', {label: 'ブレーカおすすめ商品', category_id: 14}) }}
</div>
<div class=\"d-none d-md-block mt-20\">
{{ include('Block/category_list.twig', {label: 'カテゴリーから探す', href_label: 'すべてのカテゴリーを見る'}) }}
</div>
<div class=\"d-none d-md-block mt-15\">
{{ include('Block/makers.twig', ignore_missing = true) }}
</div>
{% endblock %}", "Product/detail.twig", "/home/xs804421/stg.denzai-bluewood.com/public_html/app/template/default/Product/detail.twig");
}
public function checkSecurity()
{
static $tags = array("set" => 14, "if" => 111, "for" => 260);
static $filters = array("raw" => 100, "json_encode" => 113, "escape" => 116, "trans" => 185, "no_image_product" => 264, "slice" => 267, "replace" => 267, "default" => 267, "length" => 309, "striptags" => 374, "number_format" => 409);
static $functions = array("class_categories_as_json" => 100, "url" => 231, "asset" => 261, "form_label" => 448, "form_widget" => 454, "form_errors" => 455, "form_rest" => 526, "include" => 531, "template_from_string" => 562);
try {
$this->sandbox->checkSecurity(
['set', 'if', 'for'],
['raw', 'json_encode', 'escape', 'trans', 'no_image_product', 'slice', 'replace', 'default', 'length', 'striptags', 'number_format'],
['class_categories_as_json', 'url', 'asset', 'form_label', 'form_widget', 'form_errors', '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;
}
}
}