<?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_9c83ab43ce8883cd83aaf68717eaba6fc3c2c04761d5a3c76f576cd9d32e63f1 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_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Product/detail.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Product/detail.twig"));
// line 13
$context["body_class"] = "product_page";
// line 15
$context["main_class"] = "l-main l-main--products-detail";
// line 11
$this->parent = $this->loadTemplate("default_frame.twig", "Product/detail.twig", 11);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 17
public function block_stylesheet($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheet"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheet"));
// line 18
echo " <style>
.p-product-detail__slider {
margin-bottom: 20px;
}
@media (max-width: 1024px){}
.p-product-detail__slider .slick-track {
display: flex;
}
.p-product-detail__slider .slick-slide {
height: 500px !important;
}
@media (max-width: 1024px){
.p-product-detail__slider .slick-slide {
height: 295px !important;
}
}
.p-product-detail__slider .slick-slide > div {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
}
.p-product-detail__slider .slide-item {
max-height: 100%;
}
.p-product-detail__slider .slick-slide img {
object-fit: cover;
width: 100% !important;
height: 500px;
}
@media (max-width: 1024px){
.p-product-detail__slider .slick-slide img {
height: 295px;
}
}
.p-product-detail__slider .slick-dots {
position: absolute;
bottom: -36px;
display: block;
width: 100%;
padding: 0;
list-style: none;
text-align: center;
}
.p-product-detail__slider .slick-dots li {
position: relative;
display: inline-block;
width: 20px;
height: 20px;
margin: 0 5px;
padding: 0;
cursor: pointer;
}
.p-product-detail__slider .slick-dots li button {
font-size: 0;
line-height: 0;
display: block;
width: 12px;
height: 12px;
padding: 5px;
cursor: pointer;
color: transparent;
border: 0;
outline: none;
background: transparent;
}
.p-product-detail__slider .slick-dots li button:hover,
.p-product-detail__slider .slick-dots li button:focus {
outline: none;
}
.p-product-detail__slider .slick-dots li button:hover:before,
.p-product-detail__slider .slick-dots li button:focus:before {
opacity: 1;
}
.p-product-detail__slider .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%;
}
.p-product-detail__slider .slick-dots li.slick-active button:before {
opacity: .75;
background-color: black;
}
.p-product-detail__slider .slick-dots li button.thumbnail img {
width: 0;
height: 0;
}
</style>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 136
public function block_javascript($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascript"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascript"));
// line 137
echo " <script>
eccube.classCategories = ";
// line 138
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.', 138, $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 149
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id2", [], "any", true, true, false, 149)) {
// line 150
echo " fnSetClassCategories(
\$('#form1'), ";
// line 151
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.', 151, $this->source); })()), "classcategory_id2", [], "any", false, false, false, 151), "vars", [], "any", false, false, false, 151), "value", [], "any", false, false, false, 151));
echo "
);
";
} elseif (twig_get_attribute($this->env, $this->source, // line 153
($context["form"] ?? null), "classcategory_id1", [], "any", true, true, false, 153)) {
// line 154
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.', 154, $this->source); })()), "id", [], "any", false, false, false, 154), "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.', 154, $this->source); })()), "classcategory_id1", [], "any", false, false, false, 154), "vars", [], "any", false, false, false, 154), "value", [], "any", false, false, false, 154));
echo ", null);
";
}
// line 156
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: 1025,
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 220
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id1", [], "any", true, true, false, 220)) {
// line 221
echo " // 規格1フォームの必須チェック
if (\$('#classcategory_id1').val() == '__unselected' || \$('#classcategory_id1').val() == '') {
\$('#classcategory_id1')[0].setCustomValidity('";
// line 223
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 229
echo "
";
// line 230
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id2", [], "any", true, true, false, 230)) {
// line 231
echo " // 規格2フォームの必須チェック
if (\$('#classcategory_id2').val() == '__unselected' || \$('#classcategory_id2').val() == '') {
\$('#classcategory_id2')[0].setCustomValidity('";
// line 233
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 239
echo "
// 個数フォームのチェック
if (\$('#quantity').val() < 1) {
\$('#quantity')[0].setCustomValidity('";
// line 242
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').html(this);
});
\$('.ec-modal').show()
// カートブロックを更新する
\$.ajax({
url: \"";
// line 269
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 276
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 296
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.', 296, $this->source); })()), "name", [], "any", false, false, false, 296), "html", null, true);
echo "\",
\"image\": [
";
// line 298
$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.', 298, $this->source); })()), "ProductImage", [], "any", false, false, false, 298));
$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 299
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.', 299, $this->source); })()), "request", [], "any", false, false, false, 299), "schemeAndHttpHost", [], "any", false, false, false, 299), "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, 299)) {
echo ",";
}
// line 300
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 302
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.', 302, $this->source); })()), "request", [], "any", false, false, false, 302), "schemeAndHttpHost", [], "any", false, false, false, 302), "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 304
echo " ],
\"description\": \"";
// line 305
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, 305)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, ($context["Product"] ?? null), "description_list", [], "any", false, false, false, 305), twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 305, $this->source); })()), "description_detail", [], "any", false, false, false, 305))) : (twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 305, $this->source); })()), "description_detail", [], "any", false, false, false, 305))), ["
" => "", "
" => ""]), 0, 300), "html", null, true);
echo "\",
";
// line 306
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.', 306, $this->source); })()), "code_min", [], "any", false, false, false, 306)) {
// line 307
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.', 307, $this->source); })()), "code_min", [], "any", false, false, false, 307), "html", null, true);
echo "\",
";
}
// line 309
echo " \"offers\": {
\"@type\": \"Offer\",
\"url\": \"";
// line 311
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.', 311, $this->source); })()), "id", [], "any", false, false, false, 311)]), "html", null, true);
echo "\",
\"priceCurrency\": \"";
// line 312
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.', 312, $this->source); })()), "currency", [], "any", false, false, false, 312), "html", null, true);
echo "\",
\"price\": ";
// line 313
((twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 313, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 313)) ? (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.', 313, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 313), "html", null, true))) : (print (0)));
echo ",
\"availability\": \"";
// line 314
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.', 314, $this->source); })()), "stock_find", [], "any", false, false, false, 314)) ? ("InStock") : ("OutOfStock"));
echo "\"
}
}
</script>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 320
public function block_main($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "main"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "main"));
// line 321
echo "
<div class=\"l-page-heading\">
<ul class=\"c-breadcrumb\">
<li class=\"c-breadcrumb__item\"><a href=\"";
// line 324
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("homepage");
echo "\" class=\"c-breadcrumb__link c-btn-txt\">TOP</a></li>
<li class=\"c-breadcrumb__item\"><a href=\"";
// line 325
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
echo "\" class=\"c-breadcrumb__link c-btn-txt\">商品リスト</a></li>
<li class=\"c-breadcrumb__item\"><span class=\"c-breadcrumb__txt\">";
// line 326
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.', 326, $this->source); })()), "name", [], "any", false, false, false, 326);
echo "</span></li>
</ul>
<h1 class=\"l-page-heading__ttl\">
<span class=\"l-page-heading__ttl-jp\">商品情報</span>
<span class=\"l-page-heading__ttl-en\">PRODUCTS</span>
</h1>
</div>
<div class=\"p-product-detail\">
<div class=\"p-product-detail__col p-product-detail__col--slider\">
<div class=\"item_visual p-product-detail__slider\">
";
// line 338
$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.', 338, $this->source); })()), "ProductImage", [], "any", false, false, false, 338));
$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 339
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, 339)) ? (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.', 339, $this->source); })()), "name", [], "any", false, false, false, 339), "html", null, true))) : (print ("")));
echo "\" width=\"550\" height=\"550\"";
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 339) > 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 341
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, 341)) ? (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.', 341, $this->source); })()), "name", [], "any", false, false, false, 341), "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 343
echo " </div>
<div class=\"item_nav\">
";
// line 345
$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.', 345, $this->source); })()), "ProductImage", [], "any", false, false, false, 345));
$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 346
echo " <div class=\"slideThumb\" data-index=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["loop"], "index0", [], "any", false, false, false, 346), "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\"></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 348
echo " </div>
</div>
<div class=\"p-product-detail__col p-product-detail__col--txt\">
<div class=\"p-product-detail__info\">
";
// line 355
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.', 355, $this->source); })()), "ProductCategories", [], "any", false, false, false, 355))) {
// line 356
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.', 356, $this->source); })()), "ProductCategories", [], "any", false, false, false, 356));
foreach ($context['_seq'] as $context["_key"] => $context["ProductCategory"]) {
// line 357
echo " ";
if ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["ProductCategory"], "Category", [], "any", false, false, false, 357), "path", [], "any", false, false, false, 357), 0, [], "array", false, false, false, 357), "id", [], "any", false, false, false, 357) != "11")) {
// line 358
echo " <ul class=\"p-product-detail__cats\">
<li class=\"p-product-detail__cats-cat\">
";
// line 360
$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, 360), "path", [], "any", false, false, false, 360));
$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 361
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, 361), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Category"], "name", [], "any", false, false, false, 361), "html", null, true);
echo "</a>";
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, false, 361) == false)) {
// line 362
echo " <span>></span>";
}
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Category'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 364
echo " </li>
</ul>
";
}
// line 367
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 368
echo " ";
}
// line 369
echo " ";
// line 370
echo "
";
// line 372
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.', 372, $this->source); })()), "ProductCategories", [], "any", false, false, false, 372))) {
// line 373
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.', 373, $this->source); })()), "Tags", [], "any", false, false, false, 373))) {
// line 374
echo " <ul class=\"c-tags p-product-detail__tags\">
";
// line 375
$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.', 375, $this->source); })()), "Tags", [], "any", false, false, false, 375));
foreach ($context['_seq'] as $context["_key"] => $context["Tag"]) {
// line 376
echo " <li class=\"c-tags__tag p-product-detail__tags-tag tag_";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Tag"], "id", [], "any", false, false, false, 376), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $context["Tag"], "html", null, true);
echo "</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Tag'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 378
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.', 378, $this->source); })()), "ProductCategories", [], "any", false, false, false, 378));
foreach ($context['_seq'] as $context["_key"] => $context["ProductCategory"]) {
// line 379
echo " ";
if ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["ProductCategory"], "Category", [], "any", false, false, false, 379), "path", [], "any", false, false, false, 379), 0, [], "array", false, false, false, 379), "id", [], "any", false, false, false, 379) == "11")) {
// line 380
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, 380), "path", [], "any", false, false, false, 380));
foreach ($context['_seq'] as $context["_key"] => $context["Category"]) {
// line 381
echo " <li class=\"c-tags__tag p-product-detail__tags-tag tag_cat";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Category"], "id", [], "any", false, false, false, 381), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Category"], "name", [], "any", false, false, false, 381), "html", null, true);
echo "</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Category'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 383
echo " ";
}
// line 384
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 385
echo " </ul>
";
} elseif (twig_test_empty(twig_get_attribute($this->env, $this->source, // line 386
(isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 386, $this->source); })()), "Tags", [], "any", false, false, false, 386))) {
// line 387
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.', 387, $this->source); })()), "ProductCategories", [], "any", false, false, false, 387));
foreach ($context['_seq'] as $context["_key"] => $context["ProductCategory"]) {
// line 388
echo " ";
if ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["ProductCategory"], "Category", [], "any", false, false, false, 388), "path", [], "any", false, false, false, 388), 0, [], "array", false, false, false, 388), "id", [], "any", false, false, false, 388) == "11")) {
// line 389
echo " <ul class=\"c-tags p-product-detail__tags\">
";
// line 390
$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, 390), "path", [], "any", false, false, false, 390));
foreach ($context['_seq'] as $context["_key"] => $context["Category"]) {
// line 391
echo " <li class=\"c-tags__tag p-product-detail__tags-tag tag_cat";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Category"], "id", [], "any", false, false, false, 391), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Category"], "name", [], "any", false, false, false, 391), "html", null, true);
echo "</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Category'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 393
echo " </ul>
";
}
// line 395
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 396
echo " ";
}
// line 397
echo " ";
} elseif ((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.', 397, $this->source); })()), "ProductCategories", [], "any", false, false, false, 397)) && !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.', 397, $this->source); })()), "Tags", [], "any", false, false, false, 397)))) {
// line 398
echo " <ul class=\"c-tags p-product-detail__tags\">
";
// line 399
$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.', 399, $this->source); })()), "Tags", [], "any", false, false, false, 399));
foreach ($context['_seq'] as $context["_key"] => $context["Tag"]) {
// line 400
echo " <li class=\"c-tags__tag p-product-detail__tags-tag tag_";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Tag"], "id", [], "any", false, false, false, 400), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $context["Tag"], "html", null, true);
echo "</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Tag'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 402
echo " </ul>
";
}
// line 404
echo " ";
// line 405
echo "
";
// line 407
echo " ";
if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_USER")) {
// line 408
echo " ";
if (twig_get_attribute($this->env, $this->source, (isset($context["BaseInfo"]) || array_key_exists("BaseInfo", $context) ? $context["BaseInfo"] : (function () { throw new RuntimeError('Variable "BaseInfo" does not exist.', 408, $this->source); })()), "option_favorite_product", [], "any", false, false, false, 408)) {
// line 409
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.', 409, $this->source); })()), "id", [], "any", false, false, false, 409)]), "html", null, true);
echo "\" method=\"post\">
<div class=\"p-product-detail__fav\">
";
// line 411
if (((isset($context["is_favorite"]) || array_key_exists("is_favorite", $context) ? $context["is_favorite"] : (function () { throw new RuntimeError('Variable "is_favorite" does not exist.', 411, $this->source); })()) == false)) {
// line 412
echo " <button type=\"submit\" id=\"favorite\" class=\"p-product-detail__fav-btn\">
<img src=\"";
// line 413
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/common/ic_fav.svg"), "html", null, true);
echo "\" alt=\"お気に入りに追加\">
</button>
";
} else {
// line 416
echo " <button type=\"submit\" id=\"favorite\" class=\"p-product-detail__fav-btn p-product-detail__fav-btn--disabled\" disabled=\"disabled\">
<img src=\"";
// line 417
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/common/ic_fav_disabled.svg"), "html", null, true);
echo "\" alt=\"お気に入りに追加済です\">
</button>
";
}
// line 420
echo " </div>
</form>
";
}
// line 423
echo " ";
}
// line 424
echo "
</div>
";
// line 428
echo " <h2 class=\"p-product-detail__ttl\">";
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.', 428, $this->source); })()), "name", [], "any", false, false, false, 428), "html", null, true);
echo "</h2>
";
// line 431
echo " <div class=\"p-product-detail__description\">
";
// line 432
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.', 432, $this->source); })()), "description_detail", [], "any", false, false, false, 432));
echo "
</div>
<div class=\"p-product-detail__price-row\">
";
// line 437
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.', 437, $this->source); })()), "production_capacity", [], "any", false, false, false, 437))) {
// line 438
echo " <div class=\"p-product-detail__capacity\">容量:";
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.', 438, $this->source); })()), "production_capacity", [], "any", false, false, false, 438), "html", null, true);
echo "</div>
";
}
// line 440
echo "
<div class=\"p-product-detail__price-area\">
";
// line 444
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.', 444, $this->source); })()), "hasProductClass", [], "any", false, false, false, 444)) {
// line 445
echo "<div class=\"p-product-detail__price p-product-detail__price--regular\">
";
// line 446
if (( !(null === twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 446, $this->source); })()), "getPrice01Min", [], "any", false, false, false, 446)) && (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.', 446, $this->source); })()), "getPrice01IncTaxMin", [], "any", false, false, false, 446) == 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.', 446, $this->source); })()), "getPrice01IncTaxMax", [], "any", false, false, false, 446)))) {
// line 447
echo " <span class=\"p-product-detail__price-ttl\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("通常価格"), "html", null, true);
echo ":</span>
<span class=\"p-product-detail__price-num price01-default\">";
// line 448
echo twig_escape_filter($this->env, twig_number_format_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.', 448, $this->source); })()), "getPrice01IncTaxMin", [], "any", false, false, false, 448)), "html", null, true);
echo "</span>
<span class=\"p-product-detail__price-tax\">";
// line 449
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("円(税込)"), "html", null, true);
echo "</span>
";
} elseif (( !(null === twig_get_attribute($this->env, $this->source, // line 450
(isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 450, $this->source); })()), "getPrice01Min", [], "any", false, false, false, 450)) && !(null === twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 450, $this->source); })()), "getPrice01Max", [], "any", false, false, false, 450)))) {
// line 451
echo " <span class=\"p-product-detail__price-ttl\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("通常価格"), "html", null, true);
echo ":</span>
<span class=\"p-product-detail__price-num price01-default\">";
// line 452
echo twig_escape_filter($this->env, twig_number_format_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.', 452, $this->source); })()), "getPrice01IncTaxMin", [], "any", false, false, false, 452)), "html", null, true);
echo "~ ";
echo twig_escape_filter($this->env, twig_number_format_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.', 452, $this->source); })()), "getPrice01IncTaxMax", [], "any", false, false, false, 452)), "html", null, true);
echo "</span>
<span class=\"p-product-detail__price-tax\">";
// line 453
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("円(税込)"), "html", null, true);
echo "</span>
";
}
// line 455
echo " </div>
";
} else {
// line 457
echo " ";
if ( !(null === twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 457, $this->source); })()), "getPrice01Max", [], "any", false, false, false, 457))) {
// line 458
echo " <div class=\"p-product-detail__price p-product-detail__price--regular\">
<span class=\"p-product-detail__price-ttl\">";
// line 459
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("通常価格"), "html", null, true);
echo ":</span>
<span class=\"p-product-detail__price-num\">";
// line 460
echo twig_escape_filter($this->env, twig_number_format_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.', 460, $this->source); })()), "getPrice01IncTaxMin", [], "any", false, false, false, 460)), "html", null, true);
echo "</span>
<span class=\"p-product-detail__price-tax\">";
// line 461
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("円(税込)"), "html", null, true);
echo "</span>
</div>
";
}
// line 464
echo " ";
}
// line 465
echo " ";
// line 466
echo " <div class=\"p-product-detail__price\">
";
// line 467
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.', 467, $this->source); })()), "hasProductClass", [], "any", false, false, false, 467)) {
// line 468
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.', 468, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 468) == 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.', 468, $this->source); })()), "getPrice02IncTaxMax", [], "any", false, false, false, 468))) {
// line 469
echo " <span class=\"p-product-detail__price-num price02-default\">";
echo twig_escape_filter($this->env, twig_number_format_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.', 469, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 469)), "html", null, true);
echo "</span>
<span class=\"p-product-detail__price-tax\">";
// line 470
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("円(税込)"), "html", null, true);
echo "</span>
";
} else {
// line 472
echo " <span class=\"p-product-detail__price-num price02-default\">";
echo twig_escape_filter($this->env, twig_number_format_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.', 472, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 472)), "html", null, true);
echo " ~ ";
echo twig_escape_filter($this->env, twig_number_format_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.', 472, $this->source); })()), "getPrice02IncTaxMax", [], "any", false, false, false, 472)), "html", null, true);
echo "</span>
<span class=\"p-product-detail__price-tax\">";
// line 473
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("円(税込)"), "html", null, true);
echo "</span>
";
}
// line 475
echo " ";
} else {
// line 476
echo " <span class=\"p-product-detail__price-num\">";
echo twig_escape_filter($this->env, twig_number_format_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); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 476)), "html", null, true);
echo "</span>
<span class=\"p-product-detail__price-tax\">";
// line 477
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("円(税込)"), "html", null, true);
echo "</span>
";
}
// line 479
echo " </div>
</div>
</div>
<form action=\"";
// line 485
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.', 485, $this->source); })()), "id", [], "any", false, false, false, 485)]), "html", null, true);
echo "\" method=\"post\" id=\"form1\" name=\"form1\">
<div class=\"p-product-detail__cart-row\">
";
// line 487
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.', 487, $this->source); })()), "stock_find", [], "any", false, false, false, 487)) {
// line 488
echo " <div class=\"p-product-detail__actions\">
";
// line 489
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id1", [], "any", true, true, false, 489)) {
// line 490
echo " <div class=\"p-product-detail__select\">
";
// line 491
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.', 491, $this->source); })()), "classcategory_id1", [], "any", false, false, false, 491), 'row');
echo "
";
// line 492
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.', 492, $this->source); })()), "classcategory_id1", [], "any", false, false, false, 492), 'errors');
echo "
</div>
";
// line 494
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id2", [], "any", true, true, false, 494)) {
// line 495
echo " <div class=\"p-product-detail__select\">
";
// line 496
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.', 496, $this->source); })()), "classcategory_id2", [], "any", false, false, false, 496), 'row');
echo "
";
// line 497
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.', 497, $this->source); })()), "classcategory_id2", [], "any", false, false, false, 497), 'errors');
echo "
</div>
";
}
// line 500
echo " ";
}
// line 501
echo " <div class=\"p-product-detail__count\">
<span class=\"p-product-detail__count-ttl\">";
// line 502
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("数量"), "html", null, true);
echo "</span>
";
// line 503
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.', 503, $this->source); })()), "quantity", [], "any", false, false, false, 503), 'widget');
echo "
";
// line 504
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.', 504, $this->source); })()), "quantity", [], "any", false, false, false, 504), 'errors');
echo "
</div>
</div>
<div class=\"p-product-detail__btn-row\">
<button type=\"submit\" class=\"c-btn c-btn--gr p-product-detail__btn add-cart\">
<img src=\"";
// line 509
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/common/ic_cart_wh.svg"), "html", null, true);
echo "\" alt=\"\">
";
// line 510
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに入れる"), "html", null, true);
echo "
</button>
</div>
";
} else {
// line 514
echo " <div class=\"p-product-detail__btn-row\">
<button type=\"button\" class=\"c-btn c-btn--gy p-product-detail__btn\" disabled=\"disabled\">
";
// line 516
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ただいま品切れ中です。"), "html", null, true);
echo "
</button>
</div>
";
}
// line 520
echo "
";
// line 521
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.', 521, $this->source); })()), 'rest');
echo "
</div>";
// line 523
echo " </form>
";
// line 526
echo " <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 529
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 530
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 533
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お買い物を続ける"), "html", null, true);
echo "</span>
<a href=\"";
// line 534
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=\"p-product-detail__return\">
<p class=\"p-product-detail__return-txt\">返品について</p>
<p class=\"p-product-detail__return-txt\">弊社では、返品をお受けしておりません。<br>製品お受取後7⽇以内、未開封に限り交換を承ります。<br>詳しくは<a href=\"";
// line 543
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("help_guide");
echo "#return\" class=\"c-btn-txt\">こちら</a>。</p>
</div>
</div>";
// line 547
echo " </div>";
// line 548
echo "
";
// line 549
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.', 549, $this->source); })()), "freearea", [], "any", false, false, false, 549)) {
// line 550
echo " <div class=\"p-product-description\">
";
// line 551
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.', 551, $this->source); })()), "freearea", [], "any", false, false, false, 551)));
echo "
</div>
";
}
// line 554
echo "
";
// line 555
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.', 555, $this->source); })()), "ProductCategories", [], "any", false, false, false, 555))) {
// line 556
echo " ";
$context["displayed_categories"] = [];
// line 557
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.', 557, $this->source); })()), "ProductCategories", [], "any", false, false, false, 557));
foreach ($context['_seq'] as $context["_key"] => $context["ProductCategory"]) {
// line 558
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, 558), "path", [], "any", false, false, false, 558));
foreach ($context['_seq'] as $context["_key"] => $context["Category"]) {
// line 559
echo " ";
if ((!twig_in_filter(twig_get_attribute($this->env, $this->source, $context["Category"], "id", [], "any", false, false, false, 559), (isset($context["displayed_categories"]) || array_key_exists("displayed_categories", $context) ? $context["displayed_categories"] : (function () { throw new RuntimeError('Variable "displayed_categories" does not exist.', 559, $this->source); })())) && ((twig_get_attribute($this->env, $this->source, $context["Category"], "id", [], "any", false, false, false, 559) == "8") || (twig_get_attribute($this->env, $this->source, $context["Category"], "id", [], "any", false, false, false, 559) == "9")))) {
// line 560
echo " ";
$context["displayed_categories"] = twig_array_merge((isset($context["displayed_categories"]) || array_key_exists("displayed_categories", $context) ? $context["displayed_categories"] : (function () { throw new RuntimeError('Variable "displayed_categories" does not exist.', 560, $this->source); })()), [0 => twig_get_attribute($this->env, $this->source, $context["Category"], "id", [], "any", false, false, false, 560)]);
echo " ";
// line 561
echo " <div class=\"p-product-nature\">
<div class=\"p-product-nature__txt-wrap\">
<h2 class=\"p-product-nature__ttl\"><span class=\"large\">Nature.</span><span class=\"jp\">シリーズとは?</span><span class=\"small\">What's Nature.series</span></h2>
<p class=\"p-product-nature__txt\">Nature.シリーズは、びわを使⽤したカラダにやさしい商品です。<br>厳選した「和漢エキス(ビワ葉エキス)」と「天然温泉⽔」をたっぶりと配合した⾃然派化粧品です。<br>みなさまと、みなさまの⼤切な⼈に、毎⽇安⼼して使っていただけるよう、そんな願いを込めて商品をお届けいたします。</p>
</div>
<div class=\"p-product-nature__img-wrap\">
<picture>
<source media=\"(min-width: 1025px)\" srcset=\"";
// line 568
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/product/nature.webp"), "html", null, true);
echo "\">
<source media=\"(max-width: 1024px)\" srcset=\"";
// line 569
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/product/nature_sp.webp 2x"), "html", null, true);
echo "\">
<img src=\"";
// line 570
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/product/nature.webp"), "html", null, true);
echo "\" alt=\"\">
</picture>
</div>
</div>
";
}
// line 575
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Category'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 576
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 577
echo " ";
}
// line 578
echo "
<span class=\"p-product-related\" id=\"js-related-area\"></span>
<span class=\"p-product-checked\" id=\"js-checked-area\"></span>
<div class=\"p-product-btn\">
<a href=\"";
// line 584
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
echo "\" class=\"p-product-btn__btn c-btn\">すべての商品をみる</a>
</div>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "Product/detail.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 1275 => 584, 1267 => 578, 1264 => 577, 1258 => 576, 1252 => 575, 1244 => 570, 1240 => 569, 1236 => 568, 1227 => 561, 1223 => 560, 1220 => 559, 1215 => 558, 1210 => 557, 1207 => 556, 1205 => 555, 1202 => 554, 1196 => 551, 1193 => 550, 1191 => 549, 1188 => 548, 1186 => 547, 1180 => 543, 1166 => 534, 1162 => 533, 1156 => 530, 1152 => 529, 1147 => 526, 1143 => 523, 1139 => 521, 1136 => 520, 1129 => 516, 1125 => 514, 1118 => 510, 1114 => 509, 1106 => 504, 1102 => 503, 1098 => 502, 1095 => 501, 1092 => 500, 1086 => 497, 1082 => 496, 1079 => 495, 1077 => 494, 1072 => 492, 1068 => 491, 1065 => 490, 1063 => 489, 1060 => 488, 1058 => 487, 1053 => 485, 1045 => 479, 1040 => 477, 1035 => 476, 1032 => 475, 1027 => 473, 1020 => 472, 1015 => 470, 1010 => 469, 1008 => 468, 1006 => 467, 1003 => 466, 1001 => 465, 998 => 464, 992 => 461, 988 => 460, 984 => 459, 981 => 458, 978 => 457, 974 => 455, 969 => 453, 963 => 452, 958 => 451, 956 => 450, 952 => 449, 948 => 448, 943 => 447, 941 => 446, 938 => 445, 935 => 444, 930 => 440, 924 => 438, 922 => 437, 914 => 432, 911 => 431, 905 => 428, 900 => 424, 897 => 423, 892 => 420, 886 => 417, 883 => 416, 877 => 413, 874 => 412, 872 => 411, 866 => 409, 863 => 408, 860 => 407, 857 => 405, 855 => 404, 851 => 402, 840 => 400, 836 => 399, 833 => 398, 830 => 397, 827 => 396, 821 => 395, 817 => 393, 806 => 391, 802 => 390, 799 => 389, 796 => 388, 791 => 387, 789 => 386, 786 => 385, 780 => 384, 777 => 383, 766 => 381, 761 => 380, 758 => 379, 753 => 378, 742 => 376, 738 => 375, 735 => 374, 732 => 373, 729 => 372, 726 => 370, 724 => 369, 721 => 368, 715 => 367, 710 => 364, 695 => 362, 686 => 361, 669 => 360, 665 => 358, 662 => 357, 657 => 356, 654 => 355, 646 => 348, 627 => 346, 610 => 345, 606 => 343, 595 => 341, 573 => 339, 555 => 338, 540 => 326, 536 => 325, 532 => 324, 527 => 321, 517 => 320, 502 => 314, 498 => 313, 494 => 312, 490 => 311, 486 => 309, 480 => 307, 478 => 306, 473 => 305, 470 => 304, 460 => 302, 446 => 300, 438 => 299, 420 => 298, 415 => 296, 392 => 276, 382 => 269, 352 => 242, 347 => 239, 338 => 233, 334 => 231, 332 => 230, 329 => 229, 320 => 223, 316 => 221, 314 => 220, 248 => 156, 240 => 154, 238 => 153, 233 => 151, 230 => 150, 228 => 149, 214 => 138, 211 => 137, 201 => 136, 75 => 18, 65 => 17, 54 => 11, 52 => 15, 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' %}
{% set main_class = 'l-main l-main--products-detail' %}
{% block stylesheet %}
<style>
.p-product-detail__slider {
margin-bottom: 20px;
}
@media (max-width: 1024px){}
.p-product-detail__slider .slick-track {
display: flex;
}
.p-product-detail__slider .slick-slide {
height: 500px !important;
}
@media (max-width: 1024px){
.p-product-detail__slider .slick-slide {
height: 295px !important;
}
}
.p-product-detail__slider .slick-slide > div {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
}
.p-product-detail__slider .slide-item {
max-height: 100%;
}
.p-product-detail__slider .slick-slide img {
object-fit: cover;
width: 100% !important;
height: 500px;
}
@media (max-width: 1024px){
.p-product-detail__slider .slick-slide img {
height: 295px;
}
}
.p-product-detail__slider .slick-dots {
position: absolute;
bottom: -36px;
display: block;
width: 100%;
padding: 0;
list-style: none;
text-align: center;
}
.p-product-detail__slider .slick-dots li {
position: relative;
display: inline-block;
width: 20px;
height: 20px;
margin: 0 5px;
padding: 0;
cursor: pointer;
}
.p-product-detail__slider .slick-dots li button {
font-size: 0;
line-height: 0;
display: block;
width: 12px;
height: 12px;
padding: 5px;
cursor: pointer;
color: transparent;
border: 0;
outline: none;
background: transparent;
}
.p-product-detail__slider .slick-dots li button:hover,
.p-product-detail__slider .slick-dots li button:focus {
outline: none;
}
.p-product-detail__slider .slick-dots li button:hover:before,
.p-product-detail__slider .slick-dots li button:focus:before {
opacity: 1;
}
.p-product-detail__slider .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%;
}
.p-product-detail__slider .slick-dots li.slick-active button:before {
opacity: .75;
background-color: black;
}
.p-product-detail__slider .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: 1025,
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').html(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>
{% endblock %}
{% block main %}
<div class=\"l-page-heading\">
<ul class=\"c-breadcrumb\">
<li class=\"c-breadcrumb__item\"><a href=\"{{ url('homepage') }}\" class=\"c-breadcrumb__link c-btn-txt\">TOP</a></li>
<li class=\"c-breadcrumb__item\"><a href=\"{{ url('product_list') }}\" class=\"c-breadcrumb__link c-btn-txt\">商品リスト</a></li>
<li class=\"c-breadcrumb__item\"><span class=\"c-breadcrumb__txt\">{{ Product.name |raw}}</span></li>
</ul>
<h1 class=\"l-page-heading__ttl\">
<span class=\"l-page-heading__ttl-jp\">商品情報</span>
<span class=\"l-page-heading__ttl-en\">PRODUCTS</span>
</h1>
</div>
<div class=\"p-product-detail\">
<div class=\"p-product-detail__col p-product-detail__col--slider\">
<div class=\"item_visual p-product-detail__slider\">
{% 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 class=\"p-product-detail__col p-product-detail__col--txt\">
<div class=\"p-product-detail__info\">
{# 「定期便対応」以外のカテゴリを出力 ここから #}
{% if Product.ProductCategories is not empty %}
{% for ProductCategory in Product.ProductCategories %}
{% if ProductCategory.Category.path[0].id != '11' %}
<ul class=\"p-product-detail__cats\">
<li class=\"p-product-detail__cats-cat\">
{% for Category in ProductCategory.Category.path %}
<a href=\"{{ url('product_list') }}?category_id={{ Category.id }}\">{{ Category.name }}</a> {%- if loop.last == false %}
<span>></span>{% endif -%}
{% endfor %}
</li>
</ul>
{% endif %}
{% endfor %}
{% endif %}
{# 「定期便対応」以外のカテゴリを出力 ここまで #}
{# タグと「定期便対応」カテゴリを出力 ここから #}
{% if Product.ProductCategories is not empty %}
{% if Product.Tags is not empty %}
<ul class=\"c-tags p-product-detail__tags\">
{% for Tag in Product.Tags %}
<li class=\"c-tags__tag p-product-detail__tags-tag tag_{{ Tag.id }}\">{{ Tag }}</li>
{% endfor %}
{% for ProductCategory in Product.ProductCategories %}
{% if ProductCategory.Category.path[0].id == '11' %}
{% for Category in ProductCategory.Category.path %}
<li class=\"c-tags__tag p-product-detail__tags-tag tag_cat{{ Category.id }}\">{{ Category.name }}</li>
{% endfor %}
{% endif %}
{% endfor %}
</ul>
{% elseif Product.Tags is empty %}
{% for ProductCategory in Product.ProductCategories %}
{% if ProductCategory.Category.path[0].id == '11' %}
<ul class=\"c-tags p-product-detail__tags\">
{% for Category in ProductCategory.Category.path %}
<li class=\"c-tags__tag p-product-detail__tags-tag tag_cat{{ Category.id }}\">{{ Category.name }}</li>
{% endfor %}
</ul>
{% endif %}
{% endfor %}
{% endif %}
{% elseif Product.ProductCategories is empty and Product.Tags is not empty %}
<ul class=\"c-tags p-product-detail__tags\">
{% for Tag in Product.Tags %}
<li class=\"c-tags__tag p-product-detail__tags-tag tag_{{ Tag.id }}\">{{ Tag }}</li>
{% endfor %}
</ul>
{% endif %}
{# タグと「定期便対応」カテゴリを出力 ここまで #}
{# お気に入り #}
{% if is_granted('ROLE_USER') %}{# ログインしている場合 #}
{% if BaseInfo.option_favorite_product %}
<form action=\"{{ url('product_add_favorite', {id:Product.id}) }}\" method=\"post\">
<div class=\"p-product-detail__fav\">
{% if is_favorite == false %}
<button type=\"submit\" id=\"favorite\" class=\"p-product-detail__fav-btn\">
<img src=\"{{ asset('assets/img/common/ic_fav.svg') }}\" alt=\"お気に入りに追加\">
</button>
{% else %}
<button type=\"submit\" id=\"favorite\" class=\"p-product-detail__fav-btn p-product-detail__fav-btn--disabled\" disabled=\"disabled\">
<img src=\"{{ asset('assets/img/common/ic_fav_disabled.svg') }}\" alt=\"お気に入りに追加済です\">
</button>
{% endif %}
</div>
</form>
{% endif %}
{% endif %}
</div>
{# 商品名 #}
<h2 class=\"p-product-detail__ttl\">{{ Product.name }}</h2>
{# 商品説明 #}
<div class=\"p-product-detail__description\">
{{ Product.description_detail|raw|nl2br }}
</div>
<div class=\"p-product-detail__price-row\">
{% if Product.production_capacity is not empty %}
<div class=\"p-product-detail__capacity\">容量:{{ Product.production_capacity }}</div>
{% endif %}
<div class=\"p-product-detail__price-area\">
{# 通常価格 #}
{% if Product.hasProductClass -%}
<div class=\"p-product-detail__price p-product-detail__price--regular\">
{% if Product.getPrice01Min is not null and Product.getPrice01IncTaxMin == Product.getPrice01IncTaxMax %}
<span class=\"p-product-detail__price-ttl\">{{ '通常価格'|trans }}:</span>
<span class=\"p-product-detail__price-num price01-default\">{{ Product.getPrice01IncTaxMin|number_format }}</span>
<span class=\"p-product-detail__price-tax\">{{ '円(税込)'|trans }}</span>
{% elseif Product.getPrice01Min is not null and Product.getPrice01Max is not null %}
<span class=\"p-product-detail__price-ttl\">{{ '通常価格'|trans }}:</span>
<span class=\"p-product-detail__price-num price01-default\">{{ Product.getPrice01IncTaxMin|number_format }}~ {{ Product.getPrice01IncTaxMax|number_format }}</span>
<span class=\"p-product-detail__price-tax\">{{ '円(税込)'|trans }}</span>
{% endif %}
</div>
{% else %}
{% if Product.getPrice01Max is not null %}
<div class=\"p-product-detail__price p-product-detail__price--regular\">
<span class=\"p-product-detail__price-ttl\">{{ '通常価格'|trans }}:</span>
<span class=\"p-product-detail__price-num\">{{ Product.getPrice01IncTaxMin|number_format }}</span>
<span class=\"p-product-detail__price-tax\">{{ '円(税込)'|trans }}</span>
</div>
{% endif %}
{% endif %}
{# 販売価格 #}
<div class=\"p-product-detail__price\">
{% if Product.hasProductClass -%}
{% if Product.getPrice02IncTaxMin == Product.getPrice02IncTaxMax %}
<span class=\"p-product-detail__price-num price02-default\">{{ Product.getPrice02IncTaxMin|number_format }}</span>
<span class=\"p-product-detail__price-tax\">{{ '円(税込)'|trans }}</span>
{% else %}
<span class=\"p-product-detail__price-num price02-default\">{{ Product.getPrice02IncTaxMin|number_format }} ~ {{ Product.getPrice02IncTaxMax|number_format }}</span>
<span class=\"p-product-detail__price-tax\">{{ '円(税込)'|trans }}</span>
{% endif %}
{% else %}
<span class=\"p-product-detail__price-num\">{{ Product.getPrice02IncTaxMin|number_format }}</span>
<span class=\"p-product-detail__price-tax\">{{ '円(税込)'|trans }}</span>
{% endif %}
</div>
</div>
</div>
<form action=\"{{ url('product_add_cart', {id:Product.id}) }}\" method=\"post\" id=\"form1\" name=\"form1\">
<div class=\"p-product-detail__cart-row\">
{% if Product.stock_find %}
<div class=\"p-product-detail__actions\">
{% if form.classcategory_id1 is defined %}
<div class=\"p-product-detail__select\">
{{ form_row(form.classcategory_id1) }}
{{ form_errors(form.classcategory_id1) }}
</div>
{% if form.classcategory_id2 is defined %}
<div class=\"p-product-detail__select\">
{{ form_row(form.classcategory_id2) }}
{{ form_errors(form.classcategory_id2) }}
</div>
{% endif %}
{% endif %}
<div class=\"p-product-detail__count\">
<span class=\"p-product-detail__count-ttl\">{{ '数量'|trans }}</span>
{{ form_widget(form.quantity) }}
{{ form_errors(form.quantity) }}
</div>
</div>
<div class=\"p-product-detail__btn-row\">
<button type=\"submit\" class=\"c-btn c-btn--gr p-product-detail__btn add-cart\">
<img src=\"{{ asset('assets/img/common/ic_cart_wh.svg') }}\" alt=\"\">
{{ 'カートに入れる'|trans }}
</button>
</div>
{% else %}
<div class=\"p-product-detail__btn-row\">
<button type=\"button\" class=\"c-btn c-btn--gy p-product-detail__btn\" disabled=\"disabled\">
{{ 'ただいま品切れ中です。'|trans }}
</button>
</div>
{% endif %}
{{ form_rest(form) }}
</div>{# .p-product-detail__cart-row ここまで #}
</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=\"p-product-detail__return\">
<p class=\"p-product-detail__return-txt\">返品について</p>
<p class=\"p-product-detail__return-txt\">弊社では、返品をお受けしておりません。<br>製品お受取後7⽇以内、未開封に限り交換を承ります。<br>詳しくは<a href=\"{{ url('help_guide') }}#return\" class=\"c-btn-txt\">こちら</a>。</p>
</div>
</div>{# .p-product-detail__col--txt ここまで #}
</div>{# .p-product-detail ここまで #}
{% if Product.freearea %}
<div class=\"p-product-description\">
{{ include(template_from_string(Product.freearea)) }}
</div>
{% endif %}
{% if Product.ProductCategories is not empty %}
{% set displayed_categories = [] %}
{% for ProductCategory in Product.ProductCategories %}
{% for Category in ProductCategory.Category.path %}
{% if Category.id not in displayed_categories and (Category.id == '8' or Category.id == '9') %}
{% set displayed_categories = displayed_categories|merge([Category.id]) %} {# 処理済みカテゴリIDを追加 #}
<div class=\"p-product-nature\">
<div class=\"p-product-nature__txt-wrap\">
<h2 class=\"p-product-nature__ttl\"><span class=\"large\">Nature.</span><span class=\"jp\">シリーズとは?</span><span class=\"small\">What's Nature.series</span></h2>
<p class=\"p-product-nature__txt\">Nature.シリーズは、びわを使⽤したカラダにやさしい商品です。<br>厳選した「和漢エキス(ビワ葉エキス)」と「天然温泉⽔」をたっぶりと配合した⾃然派化粧品です。<br>みなさまと、みなさまの⼤切な⼈に、毎⽇安⼼して使っていただけるよう、そんな願いを込めて商品をお届けいたします。</p>
</div>
<div class=\"p-product-nature__img-wrap\">
<picture>
<source media=\"(min-width: 1025px)\" srcset=\"{{ asset('assets/img/product/nature.webp') }}\">
<source media=\"(max-width: 1024px)\" srcset=\"{{ asset('assets/img/product/nature_sp.webp 2x') }}\">
<img src=\"{{ asset('assets/img/product/nature.webp') }}\" alt=\"\">
</picture>
</div>
</div>
{% endif %}
{% endfor %}
{% endfor %}
{% endif %}
<span class=\"p-product-related\" id=\"js-related-area\"></span>
<span class=\"p-product-checked\" id=\"js-checked-area\"></span>
<div class=\"p-product-btn\">
<a href=\"{{ url('product_list') }}\" class=\"p-product-btn__btn c-btn\">すべての商品をみる</a>
</div>
{% endblock %}
", "Product/detail.twig", "/home/indigomole988/www/muyu-sen.com/app/template/default/Product/detail.twig");
}
}