<?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_2a91a2bffd61fae25a946bf3c73dc5a6 extends \Eccube\Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'stylesheet' => [$this, 'block_stylesheet'],
'javascript' => [$this, 'block_javascript'],
'main' => [$this, 'block_main'],
];
}
protected function doGetParent(array $context)
{
// line 11
return "default_frame.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Product/detail.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Product/detail.twig"));
// line 15
$context["cart_restriction_enabled"] = false;
// line 17
$context["body_class"] = "product_page";
// line 11
$this->parent = $this->loadTemplate("default_frame.twig", "Product/detail.twig", 11);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 19
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 20
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 99
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 100
echo " <script>
eccube.classCategories = ";
// line 101
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.', 101, $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 112
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id2", [], "any", true, true, false, 112)) {
// line 113
echo " fnSetClassCategories(
\$('#form1'), ";
// line 114
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.', 114, $this->source); })()), "classcategory_id2", [], "any", false, false, false, 114), "vars", [], "any", false, false, false, 114), "value", [], "any", false, false, false, 114));
echo "
);
";
} elseif (twig_get_attribute($this->env, $this->source, // line 116
($context["form"] ?? null), "classcategory_id1", [], "any", true, true, false, 116)) {
// line 117
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.', 117, $this->source); })()), "id", [], "any", false, false, false, 117), "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.', 117, $this->source); })()), "classcategory_id1", [], "any", false, false, false, 117), "vars", [], "any", false, false, false, 117), "value", [], "any", false, false, false, 117));
echo ", null);
";
}
// line 119
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 183
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id1", [], "any", true, true, false, 183)) {
// line 184
echo " // 規格1フォームの必須チェック
if (\$('#classcategory_id1').val() == '__unselected' || \$('#classcategory_id1').val() == '') {
\$('#classcategory_id1')[0].setCustomValidity('";
// line 186
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 192
echo "
";
// line 193
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id2", [], "any", true, true, false, 193)) {
// line 194
echo " // 規格2フォームの必須チェック
if (\$('#classcategory_id2').val() == '__unselected' || \$('#classcategory_id2').val() == '') {
\$('#classcategory_id2')[0].setCustomValidity('";
// line 196
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 202
echo "
// 個数フォームのチェック
if (\$('#quantity').val() < 1) {
\$('#quantity')[0].setCustomValidity('";
// line 205
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 232
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 239
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 259
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.', 259, $this->source); })()), "name", [], "any", false, false, false, 259), "html", null, true);
echo "\",
\"image\": [
";
// line 261
$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.', 261, $this->source); })()), "ProductImage", [], "any", false, false, false, 261));
$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 262
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.', 262, $this->source); })()), "request", [], "any", false, false, false, 262), "schemeAndHttpHost", [], "any", false, false, false, 262), "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, 262)) {
echo ",";
}
// line 263
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, 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, false, 264), "schemeAndHttpHost", [], "any", false, false, false, 264), "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, false, 267)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, ($context["Product"] ?? null), "description_list", [], "any", false, false, false, 267), 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, false, 267))) : (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, false, 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, false, 268)) {
// line 269
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.', 269, $this->source); })()), "code_min", [], "any", false, false, false, 269), "html", null, true);
echo "\",
\"gtin13\": \"";
// line 270
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.', 270, $this->source); })()), "code_min", [], "any", false, false, false, 270), "html", null, true);
echo "\",
";
}
// line 272
echo " \"offers\": {
\"@type\": \"Offer\",
\"url\": \"";
// line 274
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.', 274, $this->source); })()), "id", [], "any", false, false, false, 274)]), "html", null, true);
echo "\",
\"priceCurrency\": \"";
// line 275
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.', 275, $this->source); })()), "currency", [], "any", false, false, false, 275), "html", null, true);
echo "\",
\"price\": ";
// line 276
((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); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 276)) ? (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.', 276, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 276), "html", null, true))) : (print (0)));
echo ",
\"availability\": \"";
// line 277
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.', 277, $this->source); })()), "stock_find", [], "any", false, false, false, 277)) ? ("InStock") : ("OutOfStock"));
echo "\"
}
}
</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 283
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 284
echo " <div class=\"ec-productRole product_";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 284, $this->source); })()), "id", [], "any", false, false, false, 284), "html", null, true);
echo "\">
<div class=\"ec-grid2\">
<div class=\"ec-grid2__cell\">
<div class=\"ec-sliderItemRole\">
<div class=\"item_visual\">
";
// line 290
$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.', 290, $this->source); })()), "ProductImage", [], "any", false, false, false, 290));
$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 291
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, 291)) ? (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.', 291, $this->source); })()), "name", [], "any", false, false, false, 291), "html", null, true))) : (print ("")));
echo "\" width=\"550\" height=\"550\"";
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 291) > 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 293
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, 293)) ? (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.', 293, $this->source); })()), "name", [], "any", false, false, false, 293), "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 295
echo " </div>
<div class=\"item_nav\">
";
// line 297
$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.', 297, $this->source); })()), "ProductImage", [], "any", false, false, false, 297));
$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 298
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, 298), "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 300
echo " </div>
</div>
</div>
<div class=\"ec-grid2__cell\">
<div class=\"ec-productRole__profile\">
";
// line 306
echo " <div class=\"ec-productRole__title\">
<h1 class=\"ec-headingTitle\">";
// line 307
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); })()), "name", [], "any", false, false, false, 307), "html", null, true);
echo "</h1>
</div>
";
// line 310
echo " <ul class=\"ec-productRole__tags\">
";
// line 311
$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.', 311, $this->source); })()), "Tags", [], "any", false, false, false, 311));
foreach ($context['_seq'] as $context["_key"] => $context["Tag"]) {
// line 312
echo " <li class=\"ec-productRole__tag tag_";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Tag"], "id", [], "any", false, false, false, 312), "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 314
echo " </ul>
";
// line 316
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.', 316, $this->source); })()), "hasProductClass", [], "any", false, false, false, 316)) {
// line 317
echo "<div class=\"ec-productRole__priceRegular\">
";
// line 318
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.', 318, $this->source); })()), "getPrice01Min", [], "any", false, false, false, 318)) && (twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 318, $this->source); })()), "getPrice01IncTaxMin", [], "any", false, false, false, 318) == twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 318, $this->source); })()), "getPrice01IncTaxMax", [], "any", false, false, false, 318)))) {
// line 319
echo " <span class=\"ec-productRole__priceRegularPrice\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("通常価格"), "html", null, true);
echo ":<span class=\"price01-default\">";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(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.', 319, $this->source); })()), "getPrice01IncTaxMin", [], "any", false, false, false, 319)), "html", null, true);
echo "</span></span>
<span class=\"ec-productRole__priceRegularTax\">";
// line 320
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 321
(isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 321, $this->source); })()), "getPrice01Min", [], "any", false, false, false, 321)) && !(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.', 321, $this->source); })()), "getPrice01Max", [], "any", false, false, false, 321)))) {
// line 322
echo " <span class=\"ec-productRole__priceRegularPrice\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("通常価格"), "html", null, true);
echo ":<span class=\"price01-default\">";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 322, $this->source); })()), "getPrice01IncTaxMin", [], "any", false, false, false, 322)), "html", null, true);
echo "~ ";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 322, $this->source); })()), "getPrice01IncTaxMax", [], "any", false, false, false, 322)), "html", null, true);
echo "</span></span>
<span class=\"ec-productRole__priceRegularTax\">";
// line 323
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html", null, true);
echo "</span>
";
}
// line 325
echo " </div>
";
} else {
// line 327
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.', 327, $this->source); })()), "getPrice01Max", [], "any", false, false, false, 327))) {
// line 328
echo " <span class=\"ec-productRole__priceRegularPrice\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("通常価格"), "html", null, true);
echo ":";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(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.', 328, $this->source); })()), "getPrice01IncTaxMin", [], "any", false, false, false, 328)), "html", null, true);
echo "</span>
<span class=\"ec-productRole__priceRegularTax\">";
// line 329
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html", null, true);
echo "</span>
";
}
// line 331
echo " ";
}
// line 332
echo " ";
// line 333
echo " <div class=\"ec-productRole__price\">
";
// line 334
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.', 334, $this->source); })()), "hasProductClass", [], "any", false, false, false, 334)) {
// line 335
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.', 335, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 335) == twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 335, $this->source); })()), "getPrice02IncTaxMax", [], "any", false, false, false, 335))) {
// line 336
echo " <div class=\"ec-price\">
<span class=\"ec-price__price price02-default\">";
// line 337
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 337, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 337)), "html", null, true);
echo "</span>
<span class=\"ec-price__tax\">";
// line 338
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html", null, true);
echo "</span>
</div>
";
} else {
// line 341
echo " <div class=\"ec-price\">
<span class=\"ec-price__price price02-default\">";
// line 342
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 342, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 342)), "html", null, true);
echo " ~ ";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 342, $this->source); })()), "getPrice02IncTaxMax", [], "any", false, false, false, 342)), "html", null, true);
echo "</span>
<span class=\"ec-price__tax\">";
// line 343
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html", null, true);
echo "</span>
</div>
";
}
// line 346
echo " ";
} else {
// line 347
echo " <div class=\"ec-price\">
<span class=\"ec-price__price\">";
// line 348
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 348, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 348)), "html", null, true);
echo "</span>
<span class=\"ec-price__tax\">";
// line 349
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html", null, true);
echo "</span>
</div>
";
}
// line 352
echo " </div>
";
// line 354
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.', 354, $this->source); })()), "code_min", [], "any", false, false, false, 354))) {
// line 355
echo " <div class=\"ec-productRole__code\">
";
// line 356
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("GTINコード"), "html", null, true);
echo ":
<span class=\"product-code-default\">";
// line 357
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 357, $this->source); })()), "code_min", [], "any", false, false, false, 357), "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.', 357, $this->source); })()), "code_min", [], "any", false, false, false, 357) != twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 357, $this->source); })()), "code_max", [], "any", false, false, false, 357))) {
echo " ~ ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 357, $this->source); })()), "code_max", [], "any", false, false, false, 357), "html", null, true);
}
echo "</span>
</div>
";
}
// line 360
echo " ";
// line 361
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.', 361, $this->source); })()), "ProductCategories", [], "any", false, false, false, 361))) {
// line 362
echo " <div class=\"ec-productRole__category\">
<div>";
// line 363
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("関連カテゴリ"), "html", null, true);
echo "</div>
";
// line 364
$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.', 364, $this->source); })()), "ProductCategories", [], "any", false, false, false, 364));
foreach ($context['_seq'] as $context["_key"] => $context["ProductCategory"]) {
// line 365
echo " <ul>
<li>
";
// line 367
$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, 367), "path", [], "any", false, false, false, 367));
$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 368
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, 368), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Category"], "name", [], "any", false, false, false, 368), "html", null, true);
echo "</a>";
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, false, 368) == false)) {
// line 369
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 371
echo " </li>
</ul>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ProductCategory'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 374
echo " </div>
";
}
// line 376
echo "
<!--非会員カートボタン非表示-->\t
";
// line 379
$context["hiddenProductIds"] = [0 => 8, 1 => 9, 2 => 10, 3 => 11, 4 => 12, 5 => 16, 6 => 18, 7 => 21, 8 => 26, 9 => 29, 10 => 30, 11 => 40, 12 => 42, 13 => 43, 14 => 52, 15 => 54, 16 => 55, 17 => 56, 18 => 57, 19 => 58, 20 => 59, 21 => 60, 22 => 62, 23 => 63, 24 => 64, 25 => 66, 26 => 67, 27 => 68, 28 => 69, 29 => 88, 30 => 94, 31 => 95, 32 => 96, 33 => 115, 34 => 116, 35 => 120, 36 => 123, 37 => 127, 38 => 128, 39 => 134, 40 => 135, 41 => 136, 42 => 138, 43 => 139, 44 => 140, 45 => 141, 46 => 143, 47 => 144, 48 => 145, 49 => 146, 50 => 148, 51 => 149, 52 => 150, 53 => 151, 54 => 154, 55 => 155, 56 => 156, 57 => 158, 58 => 159, 59 => 160, 60 => 161, 61 => 162, 62 => 163, 63 => 164, 64 => 165, 65 => 167, 66 => 168, 67 => 169, 68 => 188, 69 => 189, 70 => 190, 71 => 194, 72 => 198, 73 => 210, 74 => 211, 75 => 212, 76 => 213, 77 => 217, 78 => 218, 79 => 219, 80 => 220, 81 => 222, 82 => 223, 83 => 224, 84 => 225, 85 => 226, 86 => 227, 87 => 228, 88 => 229, 89 => 230, 90 => 231, 91 => 234, 92 => 235, 93 => 236, 94 => 237, 95 => 238, 96 => 239, 97 => 240, 98 => 241, 99 => 242, 100 => 243, 101 => 244, 102 => 245, 103 => 246, 104 => 247, 105 => 254, 106 => 255, 107 => 256, 108 => 257, 109 => 258, 110 => 259, 111 => 260, 112 => 261, 113 => 262, 114 => 263, 115 => 264, 116 => 265, 117 => 266, 118 => 267, 119 => 268, 120 => 269, 121 => 270, 122 => 271, 123 => 272, 124 => 273, 125 => 275, 126 => 276, 127 => 277, 128 => 278, 129 => 279, 130 => 280, 131 => 281, 132 => 282, 133 => 283, 134 => 284, 135 => 285, 136 => 286, 137 => 287, 138 => 288, 139 => 303, 140 => 304];
// line 380
echo "
";
// line 382
$context["timezone"] = "Asia/Tokyo";
// line 383
$context["current_hour"] = twig_date_format_filter($this->env, "now", "H", (isset($context["timezone"]) || array_key_exists("timezone", $context) ? $context["timezone"] : (function () { throw new RuntimeError('Variable "timezone" does not exist.', 383, $this->source); })()));
// line 385
$context["day_of_week"] = twig_date_format_filter($this->env, "now", "w", (isset($context["timezone"]) || array_key_exists("timezone", $context) ? $context["timezone"] : (function () { throw new RuntimeError('Variable "timezone" does not exist.', 385, $this->source); })()));
// line 386
$context["is_weekend"] = (((isset($context["day_of_week"]) || array_key_exists("day_of_week", $context) ? $context["day_of_week"] : (function () { throw new RuntimeError('Variable "day_of_week" does not exist.', 386, $this->source); })()) == 0) || ((isset($context["day_of_week"]) || array_key_exists("day_of_week", $context) ? $context["day_of_week"] : (function () { throw new RuntimeError('Variable "day_of_week" does not exist.', 386, $this->source); })()) == 6));
// line 387
echo "
";
// line 396
if ((((isset($context["cart_restriction_enabled"]) || array_key_exists("cart_restriction_enabled", $context) ? $context["cart_restriction_enabled"] : (function () { throw new RuntimeError('Variable "cart_restriction_enabled" does not exist.', 396, $this->source); })()) == false) || (($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_USER") || !twig_in_filter(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.', 396, $this->source); })()), "id", [], "any", false, false, false, 396), (isset($context["hiddenProductIds"]) || array_key_exists("hiddenProductIds", $context) ? $context["hiddenProductIds"] : (function () { throw new RuntimeError('Variable "hiddenProductIds" does not exist.', 396, $this->source); })()))) || (twig_in_filter(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.', 396, $this->source); })()), "id", [], "any", false, false, false, 396), (isset($context["hiddenProductIds"]) || array_key_exists("hiddenProductIds", $context) ? $context["hiddenProductIds"] : (function () { throw new RuntimeError('Variable "hiddenProductIds" does not exist.', 396, $this->source); })())) && (((isset($context["is_weekend"]) || array_key_exists("is_weekend", $context) ? $context["is_weekend"] : (function () { throw new RuntimeError('Variable "is_weekend" does not exist.', 396, $this->source); })()) || ((isset($context["current_hour"]) || array_key_exists("current_hour", $context) ? $context["current_hour"] : (function () { throw new RuntimeError('Variable "current_hour" does not exist.', 396, $this->source); })()) >= 18)) || ((isset($context["current_hour"]) || array_key_exists("current_hour", $context) ? $context["current_hour"] : (function () { throw new RuntimeError('Variable "current_hour" does not exist.', 396, $this->source); })()) < 9)))))) {
// line 397
echo "
<div id=\"role_user_hyouzi\" class=\"cart-button-area\">
<form action=\"";
// line 399
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.', 399, $this->source); })()), "id", [], "any", false, false, false, 399)]), "html", null, true);
echo "\" method=\"post\" id=\"form1\" name=\"form1\">
";
// line 400
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.', 400, $this->source); })()), "stock_find", [], "any", false, false, false, 400)) {
// line 401
echo "<div class=\"ec-productRole__actions\">
";
// line 402
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id1", [], "any", true, true, false, 402)) {
// line 403
echo "<div class=\"ec-select\">
";
// line 404
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.', 404, $this->source); })()), "classcategory_id1", [], "any", false, false, false, 404), 'row');
echo "
";
// line 405
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.', 405, $this->source); })()), "classcategory_id1", [], "any", false, false, false, 405), 'errors');
echo "
</div>
";
}
// line 408
echo "
";
// line 409
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id2", [], "any", true, true, false, 409)) {
// line 410
echo "<div class=\"ec-select\">
";
// line 411
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.', 411, $this->source); })()), "classcategory_id2", [], "any", false, false, false, 411), 'row');
echo "
";
// line 412
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.', 412, $this->source); })()), "classcategory_id2", [], "any", false, false, false, 412), 'errors');
echo "
</div>
";
}
// line 415
echo "
<div class=\"ec-numberInput\"><span>";
// line 416
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("数量"), "html", null, true);
echo "</span>
<div class=\"ec-select\">
";
// line 418
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.', 418, $this->source); })()), "quantity", [], "any", false, false, false, 418), 'widget');
echo "
";
// line 419
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.', 419, $this->source); })()), "quantity", [], "any", false, false, false, 419), 'errors');
echo "
</div>
<span class=\"small display\">在庫数及び販売制限数を設定しています。表示以上の数量は選べません</span>
<span class=\"small display-non\">1種類につき1点ずつ</span>
</div>
</div>
<div class=\"ec-productRole__btn\">
<button type=\"submit\" class=\"ec-blockBtn--action add-cart\">
";
// line 427
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに入れる"), "html", null, true);
echo "
</button>
</div>
";
} else {
// line 431
echo "<div class=\"ec-productRole__btn\">
<button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
";
// line 433
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ただいま品切れ中です。"), "html", null, true);
echo "
</button>
</div>
";
}
// line 437
echo "
";
// line 438
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.', 438, $this->source); })()), 'rest');
echo "
</form>
<div class=\"ec-modal\">
<div class=\"ec-modal-overlay\">
<div class=\"ec-modal-wrap\">
<span class=\"ec-modal-close\"><span class=\"ec-icon\"><img src=\"";
// line 443
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 444
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 447
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お買い物を続ける"), "html", null, true);
echo "</span>
<a href=\"";
// line 448
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>
";
// line 454
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.', 454, $this->source); })()), "option_favorite_product", [], "any", false, false, false, 454)) {
// line 455
if (((isset($context["is_favorite"]) || array_key_exists("is_favorite", $context) ? $context["is_favorite"] : (function () { throw new RuntimeError('Variable "is_favorite" does not exist.', 455, $this->source); })()) == false)) {
// line 456
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.', 456, $this->source); })()), "id", [], "any", false, false, false, 456)]), "html", null, true);
echo "\" method=\"post\">
<div class=\"ec-productRole__btn\">
<button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel\">
";
// line 459
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お気に入りに追加"), "html", null, true);
echo "
</button>
</div>
</form>
";
} else {
// line 464
echo "<form action=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("refine_delete_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.', 464, $this->source); })()), "id", [], "any", false, false, false, 464)]), "html", null, true);
echo "\" method=\"post\">
<div class=\"ec-productRole__btn\">
<button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel favorite_cancel\">
";
// line 467
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お気に入りから削除"), "html", null, true);
echo "
</button>
</div>
</form>
";
}
}
// line 473
echo "</div>
";
} else {
// line 476
echo "<div class=\"add-cart-hikaiin cart-button-area\">
<a href=\"/mypage/login\">ログインして購入/会員登録</a>
</div>
";
}
// line 480
echo "<!--非会員カートボタン非表示ここまで-->\t\t\t\t\t
<div class=\"ec-productRole__description\">";
// line 482
echo twig_nl2br(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 482, $this->source); })()), "description_detail", [], "any", false, false, false, 482));
echo "
</div>
</div>
</div>
</div>
";
// 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); })()), "freearea", [], "any", false, false, false, 487)) {
// line 488
echo " <div class=\"ec-productRole__description\">
";
// line 489
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.', 489, $this->source); })()), "freearea", [], "any", false, false, false, 489)));
echo "
</div>
";
}
// line 492
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 ( 1047 => 492, 1041 => 489, 1038 => 488, 1036 => 487, 1028 => 482, 1024 => 480, 1018 => 476, 1014 => 473, 1005 => 467, 998 => 464, 990 => 459, 983 => 456, 981 => 455, 979 => 454, 968 => 448, 964 => 447, 958 => 444, 954 => 443, 946 => 438, 943 => 437, 936 => 433, 932 => 431, 925 => 427, 914 => 419, 910 => 418, 905 => 416, 902 => 415, 896 => 412, 892 => 411, 889 => 410, 887 => 409, 884 => 408, 878 => 405, 874 => 404, 871 => 403, 869 => 402, 866 => 401, 864 => 400, 860 => 399, 856 => 397, 854 => 396, 851 => 387, 849 => 386, 847 => 385, 845 => 383, 843 => 382, 840 => 380, 838 => 379, 834 => 376, 830 => 374, 822 => 371, 807 => 369, 798 => 368, 781 => 367, 777 => 365, 773 => 364, 769 => 363, 766 => 362, 763 => 361, 761 => 360, 751 => 357, 747 => 356, 744 => 355, 741 => 354, 738 => 352, 732 => 349, 728 => 348, 725 => 347, 722 => 346, 716 => 343, 710 => 342, 707 => 341, 701 => 338, 697 => 337, 694 => 336, 692 => 335, 690 => 334, 687 => 333, 685 => 332, 682 => 331, 677 => 329, 670 => 328, 667 => 327, 663 => 325, 658 => 323, 649 => 322, 647 => 321, 643 => 320, 636 => 319, 634 => 318, 631 => 317, 628 => 316, 625 => 314, 614 => 312, 610 => 311, 607 => 310, 602 => 307, 599 => 306, 592 => 300, 573 => 298, 556 => 297, 552 => 295, 541 => 293, 519 => 291, 501 => 290, 491 => 284, 481 => 283, 466 => 277, 462 => 276, 458 => 275, 454 => 274, 450 => 272, 445 => 270, 440 => 269, 438 => 268, 433 => 267, 430 => 266, 420 => 264, 407 => 263, 399 => 262, 381 => 261, 376 => 259, 353 => 239, 343 => 232, 313 => 205, 308 => 202, 299 => 196, 295 => 194, 293 => 193, 290 => 192, 281 => 186, 277 => 184, 275 => 183, 209 => 119, 201 => 117, 199 => 116, 194 => 114, 191 => 113, 189 => 112, 175 => 101, 172 => 100, 162 => 99, 75 => 20, 65 => 19, 54 => 11, 52 => 17, 50 => 15, 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' %}
{# ▼▼▼ カートボタン表示制限のON/OFFスイッチ ▼▼▼ #}
{# true = 制限を有効にする, false = 制限を解除する(常にカートボタンを表示) #}
{% set cart_restriction_enabled = false %}
{% 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').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 }}\",
\"gtin13\": \"{{ 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=\"ec-productRole product_{{ Product.id }}\">
<div class=\"ec-grid2\">
<div class=\"ec-grid2__cell\">
<div class=\"ec-sliderItemRole\">
<div class=\"item_visual\">
{% for ProductImage in Product.ProductImage %}
<div class=\"slide-item\"><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=\"ec-grid2__cell\">
<div class=\"ec-productRole__profile\">
{# 商品名 #}
<div class=\"ec-productRole__title\">
<h1 class=\"ec-headingTitle\">{{ Product.name }}</h1>
</div>
{# タグ #}
<ul class=\"ec-productRole__tags\">
{% for Tag in Product.Tags %}
<li class=\"ec-productRole__tag tag_{{ Tag.id }}\">{{ Tag }}</li>
{% endfor %}
</ul>
{# 通常価格 #}
{% if Product.hasProductClass -%}
<div class=\"ec-productRole__priceRegular\">
{% if Product.getPrice01Min is not null and Product.getPrice01IncTaxMin == Product.getPrice01IncTaxMax %}
<span class=\"ec-productRole__priceRegularPrice\">{{ '通常価格'|trans }}:<span class=\"price01-default\">{{ Product.getPrice01IncTaxMin|price }}</span></span>
<span class=\"ec-productRole__priceRegularTax\">{{ '税込'|trans }}</span>
{% elseif Product.getPrice01Min is not null and Product.getPrice01Max is not null %}
<span class=\"ec-productRole__priceRegularPrice\">{{ '通常価格'|trans }}:<span class=\"price01-default\">{{ Product.getPrice01IncTaxMin|price }}~ {{ Product.getPrice01IncTaxMax|price }}</span></span>
<span class=\"ec-productRole__priceRegularTax\">{{ '税込'|trans }}</span>
{% endif %}
</div>
{% else %}
{% if Product.getPrice01Max is not null %}
<span class=\"ec-productRole__priceRegularPrice\">{{ '通常価格'|trans }}:{{ Product.getPrice01IncTaxMin|price }}</span>
<span class=\"ec-productRole__priceRegularTax\">{{ '税込'|trans }}</span>
{% endif %}
{% endif %}
{# 販売価格 #}
<div class=\"ec-productRole__price\">
{% if Product.hasProductClass -%}
{% if Product.getPrice02IncTaxMin == Product.getPrice02IncTaxMax %}
<div class=\"ec-price\">
<span class=\"ec-price__price price02-default\">{{ Product.getPrice02IncTaxMin|price }}</span>
<span class=\"ec-price__tax\">{{ '税込'|trans }}</span>
</div>
{% else %}
<div class=\"ec-price\">
<span class=\"ec-price__price price02-default\">{{ Product.getPrice02IncTaxMin|price }} ~ {{ Product.getPrice02IncTaxMax|price }}</span>
<span class=\"ec-price__tax\">{{ '税込'|trans }}</span>
</div>
{% endif %}
{% else %}
<div class=\"ec-price\">
<span class=\"ec-price__price\">{{ Product.getPrice02IncTaxMin|price }}</span>
<span class=\"ec-price__tax\">{{ '税込'|trans }}</span>
</div>
{% endif %}
</div>
{# GTINコード #}
{% if Product.code_min is not empty %}
<div class=\"ec-productRole__code\">
{{ 'GTINコード'|trans }}:
<span class=\"product-code-default\">{{ Product.code_min }}{% if Product.code_min != Product.code_max %} ~ {{ Product.code_max }}{% endif %}</span>
</div>
{% endif %}
{# 関連カテゴリ #}
{% if Product.ProductCategories is not empty %}
<div class=\"ec-productRole__category\">
<div>{{ '関連カテゴリ'|trans }}</div>
{% for ProductCategory in Product.ProductCategories %}
<ul>
<li>
{% for Category in ProductCategory.Category.path %}
<a href=\"{{ url('product_list') }}?category_id={{ Category.id }}\">{{ Category.name }}</a> {%- if loop.last == false %}
<span>></span>{% endif -%}
{% endfor %}
</li>
</ul>
{% endfor %}
</div>
{% endif %}
<!--非会員カートボタン非表示-->\t
{# カートボタンを非表示にする商品IDのリストを定義します #}
{% set hiddenProductIds = [8, 9, 10, 11, 12, 16, 18, 21, 26, 29, 30, 40, 42, 43, 52, 54, 55, 56, 57, 58, 59, 60, 62, 63, 64, 66, 67, 68, 69, 88, 94, 95, 96, 115, 116, 120, 123, 127, 128, 134, 135, 136, 138, 139, 140, 141, 143, 144, 145, 146, 148, 149, 150, 151, 154, 155, 156, 158, 159, 160, 161, 162, 163, 164, 165, 167, 168, 169, 188, 189, 190, 194, 198, 210, 211, 212, 213, 217, 218, 219, 220, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 303, 304] %}
{# -- 日時と曜日の判定 -- #}
{% set timezone = \"Asia/Tokyo\" %}
{% set current_hour = \"now\"|date(\"H\", timezone) %}
{# 曜日を数値で取得 (0:日曜, 6:土曜) #}
{% set day_of_week = \"now\"|date(\"w\", timezone) %}
{% set is_weekend = (day_of_week == 0 or day_of_week == 6) %}
{#
下記の条件でカートボタンを表示します。
1. 会員である (is_granted('ROLE_USER'))
2. 非表示対象商品ではない (Product.id not in hiddenProductIds)
3. 非表示対象商品だが、以下のいずれかの条件を満たす
- 週末(土日)である
- 指定時間内(18:00~翌9:00)である
#}
{% if cart_restriction_enabled == false or (is_granted('ROLE_USER') or (Product.id not in hiddenProductIds) or (Product.id in hiddenProductIds and (is_weekend or current_hour >= 18 or current_hour < 9))) %}
<div id=\"role_user_hyouzi\" class=\"cart-button-area\">
<form action=\"{{ url('product_add_cart', {id:Product.id}) }}\" method=\"post\" id=\"form1\" name=\"form1\">
{% if Product.stock_find %}
<div class=\"ec-productRole__actions\">
{% if form.classcategory_id1 is defined %}
<div class=\"ec-select\">
{{ form_row(form.classcategory_id1) }}
{{ form_errors(form.classcategory_id1) }}
</div>
{% endif %}
{% if form.classcategory_id2 is defined %}
<div class=\"ec-select\">
{{ form_row(form.classcategory_id2) }}
{{ form_errors(form.classcategory_id2) }}
</div>
{% endif %}
<div class=\"ec-numberInput\"><span>{{ '数量'|trans }}</span>
<div class=\"ec-select\">
{{ form_widget(form.quantity) }}
{{ form_errors(form.quantity) }}
</div>
<span class=\"small display\">在庫数及び販売制限数を設定しています。表示以上の数量は選べません</span>
<span class=\"small display-non\">1種類につき1点ずつ</span>
</div>
</div>
<div class=\"ec-productRole__btn\">
<button type=\"submit\" class=\"ec-blockBtn--action add-cart\">
{{ 'カートに入れる'|trans }}
</button>
</div>
{% else %}
<div class=\"ec-productRole__btn\">
<button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
{{ 'ただいま品切れ中です。'|trans }}
</button>
</div>
{% endif %}
{{ form_rest(form) }}
</form>
<div class=\"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>
{% if BaseInfo.option_favorite_product %}
{% if is_favorite == false %}
<form action=\"{{ url('product_add_favorite', {id:Product.id}) }}\" method=\"post\">
<div class=\"ec-productRole__btn\">
<button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel\">
{{ 'お気に入りに追加'|trans }}
</button>
</div>
</form>
{% else %}
<form action=\"{{ url('refine_delete_favorite', {id:Product.id}) }}\" method=\"post\">
<div class=\"ec-productRole__btn\">
<button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel favorite_cancel\">
{{ 'お気に入りから削除'|trans }}
</button>
</div>
</form>
{% endif %}
{% endif %}
</div>
{% else %}
{# 非会員で、hiddenProductIdsに含まれており、かつ時間外/平日である場合はこちらのブロックが表示されます #}
<div class=\"add-cart-hikaiin cart-button-area\">
<a href=\"/mypage/login\">ログインして購入/会員登録</a>
</div>
{% endif %}
<!--非会員カートボタン非表示ここまで-->\t\t\t\t\t
<div class=\"ec-productRole__description\">{{ Product.description_detail|raw|nl2br }}
</div>
</div>
</div>
</div>
{% if Product.freearea %}
<div class=\"ec-productRole__description\">
{{ include(template_from_string(Product.freearea)) }}
</div>
{% endif %}
</div>
{% endblock %}", "Product/detail.twig", "/home/owl/owl-horie.com/public_html/test-eccube.owl-horie.com/app/template/cosme41/Product/detail.twig");
}
}