<?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_5c77e3dbd6b8894b33ca426715a022c733c18f3fc463300967e1e580e5ae9aa0 extends \Eccube\Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'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 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 15
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 16
echo " <script>
eccube.classCategories = ";
// line 17
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.', 17, $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 28
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id2", [], "any", true, true, false, 28)) {
// line 29
echo " fnSetClassCategories(
\$('#form1'), ";
// line 30
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.', 30, $this->source); })()), "classcategory_id2", [], "any", false, false, false, 30), "vars", [], "any", false, false, false, 30), "value", [], "any", false, false, false, 30));
echo "
);
";
} elseif (twig_get_attribute($this->env, $this->source, // line 32
($context["form"] ?? null), "classcategory_id1", [], "any", true, true, false, 32)) {
// line 33
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.', 33, $this->source); })()), "id", [], "any", false, false, false, 33), "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.', 33, $this->source); })()), "classcategory_id1", [], "any", false, false, false, 33), "vars", [], "any", false, false, false, 33), "value", [], "any", false, false, false, 33));
echo ", null);
";
}
// line 35
echo " </script>
<script>
\$(function () {
\$('.slider-detail').slick({
autoplay: true,
centerMode: false,
dots: false,
arrows: false,
slidesToShow: 1,
});
});
</script>
<script>
\$(function() {
\$('.add-cart').on('click', function(event) {
";
// line 50
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id1", [], "any", true, true, false, 50)) {
// line 51
echo " // 規格1フォームの必須チェック
if (\$('#classcategory_id1').val() == '__unselected' || \$('#classcategory_id1').val() == '') {
\$('#classcategory_id1')[0].setCustomValidity('";
// line 53
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 59
echo "
";
// line 60
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id2", [], "any", true, true, false, 60)) {
// line 61
echo " // 規格2フォームの必須チェック
if (\$('#classcategory_id2').val() == '__unselected' || \$('#classcategory_id2').val() == '') {
\$('#classcategory_id2')[0].setCustomValidity('";
// line 63
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 69
echo "
// 個数フォームのチェック
if (\$('#quantity').val() < 1) {
\$('#quantity')[0].setCustomValidity('";
// line 72
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 99
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 106
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, ._prev').on('click', function() {
\$('.ec-modal').hide()
});
</script>
<script type=\"application/ld+json\">
{
\"@context\": \"https://schema.org/\",
\"@type\": \"Product\",
\"name\": \"";
// line 126
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.', 126, $this->source); })()), "name", [], "any", false, false, false, 126), "html", null, true);
echo "\",
\"image\": [
";
// line 128
$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.', 128, $this->source); })()), "ProductImage", [], "any", false, false, false, 128));
$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 129
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.', 129, $this->source); })()), "request", [], "any", false, false, false, 129), "schemeAndHttpHost", [], "any", false, false, false, 129), "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, 129)) {
echo ",";
}
// line 130
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 132
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.', 132, $this->source); })()), "request", [], "any", false, false, false, 132), "schemeAndHttpHost", [], "any", false, false, false, 132), "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 134
echo " ],
\"description\": \"";
// line 135
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, 135)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, ($context["Product"] ?? null), "description_list", [], "any", false, false, false, 135), 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.', 135, $this->source); })()), "description_detail", [], "any", false, false, false, 135))) : (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.', 135, $this->source); })()), "description_detail", [], "any", false, false, false, 135))), ["
" => "", "
" => ""]), 0, 300), "html", null, true);
echo "\",
";
// line 136
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.', 136, $this->source); })()), "code_min", [], "any", false, false, false, 136)) {
// line 137
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.', 137, $this->source); })()), "code_min", [], "any", false, false, false, 137), "html", null, true);
echo "\",
";
}
// line 139
echo " \"offers\": {
\"@type\": \"Offer\",
\"url\": \"";
// line 141
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.', 141, $this->source); })()), "id", [], "any", false, false, false, 141)]), "html", null, true);
echo "\",
\"priceCurrency\": \"";
// line 142
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.', 142, $this->source); })()), "currency", [], "any", false, false, false, 142), "html", null, true);
echo "\",
\"price\": ";
// line 143
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.', 143, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 143), "html", null, true);
echo ",
\"availability\": \"";
// line 144
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.', 144, $this->source); })()), "stock_find", [], "any", false, false, false, 144)) ? ("InStock") : ("OutOfStock"));
echo "\"
}
}
</script>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 150
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 151
echo " ";
// line 152
echo " ";
// line 153
echo " ";
// line 154
echo " ";
// line 155
echo " ";
// line 156
echo " ";
// line 157
echo " ";
// line 158
echo " ";
// line 159
echo " ";
// line 160
echo " ";
// line 161
echo " ";
// line 162
echo " ";
// line 163
echo " ";
// line 164
echo " ";
// line 165
echo " ";
// line 166
echo " ";
// line 167
echo " ";
// line 168
echo " ";
// line 169
echo " ";
// line 170
echo " ";
// line 171
echo " ";
// line 172
echo " <div class=\"ec-productRole\">
";
// line 174
echo "
<div class=\"ec-product__detail\">
<div class=\"ec-product__detail-img\">
<div class=\"ec-sliderItemRole\">
<div class=\"slider-detail\">
";
// line 179
$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.', 179, $this->source); })()), "ProductImage", [], "any", false, false, false, 179));
$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 180
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, 180)) ? (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.', 180, $this->source); })()), "name", [], "any", false, false, false, 180), "html", null, true))) : (print ("")));
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 182
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, 182)) ? (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.', 182, $this->source); })()), "name", [], "any", false, false, false, 182), "html", null, true))) : (print ("")));
echo "\" /></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 184
echo " </div>
";
// line 190
echo " </div>
</div>
<div class=\"product__detail-content\">
<div class=\"ec-productRole__profile\">
";
// line 195
echo " <div class=\"ec-productRole__title\">
<h2 class=\"ec-headingTitle\">";
// line 196
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.', 196, $this->source); })()), "name", [], "any", false, false, false, 196), "html", null, true);
echo "</h2>
</div>
";
// line 199
echo " <div class=\"ec-productRole__description\">";
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.', 199, $this->source); })()), "description_detail", [], "any", false, false, false, 199));
echo "
</div>
<dl class=\"ec-product__dl\">
";
// line 202
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.', 202, $this->source); })()), "code_min", [], "any", false, false, false, 202))) {
// line 203
echo " <div class=\"item\">
<dt>
商品コード
</dt>
<dd>
";
// line 208
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.', 208, $this->source); })()), "code_min", [], "any", false, false, false, 208), "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.', 208, $this->source); })()), "code_min", [], "any", false, false, false, 208) != 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.', 208, $this->source); })()), "code_max", [], "any", false, false, false, 208))) {
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.', 208, $this->source); })()), "code_max", [], "any", false, false, false, 208), "html", null, true);
}
// line 209
echo " </dd>
</div>
";
}
// line 212
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.', 212, $this->source); })()), "sub_title1", [], "any", false, false, false, 212))) {
// line 213
echo " <div class=\"item\">
<dt>
";
// line 215
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.', 215, $this->source); })()), "sub_title1", [], "any", false, false, false, 215), "html", null, true);
echo "
</dt>
<dd>
";
// line 218
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.', 218, $this->source); })()), "sub_comment1", [], "any", false, false, false, 218), "html", null, true);
echo "
</dd>
</div>
";
}
// line 222
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.', 222, $this->source); })()), "sub_title2", [], "any", false, false, false, 222))) {
// line 223
echo " <div class=\"item\">
<dt>
";
// line 225
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.', 225, $this->source); })()), "sub_title2", [], "any", false, false, false, 225), "html", null, true);
echo "
</dt>
<dd>
";
// line 228
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.', 228, $this->source); })()), "sub_comment2", [], "any", false, false, false, 228), "html", null, true);
echo "
</dd>
</div>
";
}
// line 232
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.', 232, $this->source); })()), "sub_title3", [], "any", false, false, false, 232))) {
// line 233
echo " <div class=\"item\">
<dt>
";
// line 235
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.', 235, $this->source); })()), "sub_title3", [], "any", false, false, false, 235), "html", null, true);
echo "
</dt>
<dd>
";
// line 238
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.', 238, $this->source); })()), "sub_comment3", [], "any", false, false, false, 238), "html", null, true);
echo "
</dd>
</div>
";
}
// line 242
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.', 242, $this->source); })()), "sub_title4", [], "any", false, false, false, 242))) {
// line 243
echo " <div class=\"item\">
<dt>
";
// line 245
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.', 245, $this->source); })()), "sub_title4", [], "any", false, false, false, 245), "html", null, true);
echo "
</dt>
<dd>
";
// line 248
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.', 248, $this->source); })()), "sub_comment4", [], "any", false, false, false, 248), "html", null, true);
echo "
</dd>
</div>
";
}
// line 252
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.', 252, $this->source); })()), "sub_title5", [], "any", false, false, false, 252))) {
// line 253
echo " <div class=\"item\">
<dt>
";
// line 255
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.', 255, $this->source); })()), "sub_title5", [], "any", false, false, false, 255), "html", null, true);
echo "
</dt>
<dd>
";
// line 258
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.', 258, $this->source); })()), "sub_comment5", [], "any", false, false, false, 258), "html", null, true);
echo "
</dd>
</div>
";
}
// line 262
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.', 262, $this->source); })()), "author_name", [], "any", false, false, false, 262))) {
// line 263
echo " <div class=\"item\">
<dt>
著者
</dt>
<dd>
";
// line 268
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.', 268, $this->source); })()), "author_name", [], "any", false, false, false, 268), "html", null, true);
echo "
</dd>
</div>
";
}
// line 272
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.', 272, $this->source); })()), "maker_name", [], "any", false, false, false, 272))) {
// line 273
echo " <div class=\"item\">
<dt>
出版社
</dt>
<dd>
";
// line 278
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.', 278, $this->source); })()), "maker_name", [], "any", false, false, false, 278), "html", null, true);
echo "
</dd>
</div>
";
}
// line 282
echo " <div class=\"item _price\">
<dt>
販売価格(税込み)
</dt>
<dd>
";
// line 287
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.', 287, $this->source); })()), "hasProductClass", [], "any", false, false, false, 287)) {
// line 288
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.', 288, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 288) == 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.', 288, $this->source); })()), "getPrice02IncTaxMax", [], "any", false, false, false, 288))) {
// line 289
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.', 289, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 289)), "html", null, true);
echo "円
";
} else {
// line 291
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.', 291, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 291)), "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.', 291, $this->source); })()), "getPrice02IncTaxMax", [], "any", false, false, false, 291)), "html", null, true);
echo "円
";
}
// line 293
echo " ";
} else {
// line 294
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.', 294, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 294)), "html", null, true);
echo "円
";
}
// line 296
echo " </dd>
</div>
</dl>
<form action=\"";
// line 300
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.', 300, $this->source); })()), "id", [], "any", false, false, false, 300)]), "html", null, true);
echo "\" method=\"post\" id=\"form1\" name=\"form1\">
";
// line 301
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.', 301, $this->source); })()), "stock_find", [], "any", false, false, false, 301)) {
// line 302
echo " <div class=\"ec-productRole__actions\">
";
// line 303
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id1", [], "any", true, true, false, 303)) {
// line 304
echo " <div class=\"ec-select\">
";
// line 305
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.', 305, $this->source); })()), "classcategory_id1", [], "any", false, false, false, 305), 'widget');
echo "
";
// line 306
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.', 306, $this->source); })()), "classcategory_id1", [], "any", false, false, false, 306), 'errors');
echo "
</div>
";
// line 308
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id2", [], "any", true, true, false, 308)) {
// line 309
echo " <div class=\"ec-select\">
";
// line 310
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.', 310, $this->source); })()), "classcategory_id2", [], "any", false, false, false, 310), 'widget');
echo "
";
// line 311
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.', 311, $this->source); })()), "classcategory_id2", [], "any", false, false, false, 311), 'errors');
echo "
</div>
";
}
// line 314
echo " ";
}
// line 315
echo " <div class=\"ec-numberInput\"><span>";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("数量"), "html", null, true);
echo "</span>
";
// line 316
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.', 316, $this->source); })()), "quantity", [], "any", false, false, false, 316), 'widget');
echo "
";
// line 317
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.', 317, $this->source); })()), "quantity", [], "any", false, false, false, 317), 'errors');
echo "
</div>
</div>
<div class=\"ec-productRole__btn\">
<button type=\"submit\" class=\"btn-cart add-cart\">
";
// line 322
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに入れる"), "html", null, true);
echo "
</button>
</div>
";
} else {
// line 326
echo " <div class=\"ec-productRole__btn\">
<button type=\"button\" class=\"btn-basic _disable\" disabled=\"disabled\">
";
// line 328
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ただいま品切れ中です。"), "html", null, true);
echo "
</button>
</div>
";
}
// line 332
echo " ";
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.', 332, $this->source); })()), 'rest');
echo "
</form>
";
// line 338
echo " ";
// line 339
echo " ";
// line 340
echo " ";
// line 341
echo " ";
// line 342
echo " ";
// line 343
echo " ";
// line 344
echo " ";
// line 345
echo " ";
// line 346
echo " ";
// line 347
echo " ";
// line 348
echo " ";
// line 349
echo " ";
// line 350
echo " ";
// line 351
echo " ";
// line 352
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 357
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 358
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=\"btn-basic _sub _prev\">";
// line 361
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お買い物を続ける"), "html", null, true);
echo "</span>
<a href=\"";
// line 362
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("cart");
echo "\" class=\"btn-cart\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへ進む"), "html", null, true);
echo "</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
";
// line 372
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); })()), "author_name", [], "any", false, false, false, 372)) || !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); })()), "author_profile", [], "any", false, false, false, 372)))) {
// line 373
echo " <div class=\"ec-product__author\">
<h3 class=\"title-icon _author\">
著者の紹介
</h3>
<div class=\"ec-product__author-content\">
<h4 class=\"ec-product__author-name\">
";
// line 379
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.', 379, $this->source); })()), "author_name", [], "any", false, false, false, 379), "html", null, true);
echo "
</h4>
<p class=\"ec-product__author-text\">
";
// line 382
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.', 382, $this->source); })()), "author_profile", [], "any", false, false, false, 382), "html", null, true);
echo "
</p>
</div>
</div>
";
}
// line 387
echo "
";
// line 388
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.', 388, $this->source); })()), "freearea", [], "any", false, false, false, 388)) {
// line 389
echo " <div class=\"ec-productRole__description\">
";
// line 390
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.', 390, $this->source); })()), "freearea", [], "any", false, false, false, 390)));
echo "
</div>
";
}
// line 393
echo " </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 ( 843 => 393, 837 => 390, 834 => 389, 832 => 388, 829 => 387, 821 => 382, 815 => 379, 807 => 373, 805 => 372, 790 => 362, 786 => 361, 780 => 358, 776 => 357, 769 => 352, 767 => 351, 765 => 350, 763 => 349, 761 => 348, 759 => 347, 757 => 346, 755 => 345, 753 => 344, 751 => 343, 749 => 342, 747 => 341, 745 => 340, 743 => 339, 741 => 338, 732 => 332, 725 => 328, 721 => 326, 714 => 322, 706 => 317, 702 => 316, 697 => 315, 694 => 314, 688 => 311, 684 => 310, 681 => 309, 679 => 308, 674 => 306, 670 => 305, 667 => 304, 665 => 303, 662 => 302, 660 => 301, 656 => 300, 650 => 296, 644 => 294, 641 => 293, 633 => 291, 627 => 289, 625 => 288, 623 => 287, 616 => 282, 609 => 278, 602 => 273, 599 => 272, 592 => 268, 585 => 263, 582 => 262, 575 => 258, 569 => 255, 565 => 253, 562 => 252, 555 => 248, 549 => 245, 545 => 243, 542 => 242, 535 => 238, 529 => 235, 525 => 233, 522 => 232, 515 => 228, 509 => 225, 505 => 223, 502 => 222, 495 => 218, 489 => 215, 485 => 213, 482 => 212, 477 => 209, 471 => 208, 464 => 203, 462 => 202, 455 => 199, 450 => 196, 447 => 195, 441 => 190, 438 => 184, 427 => 182, 409 => 180, 391 => 179, 384 => 174, 381 => 172, 379 => 171, 377 => 170, 375 => 169, 373 => 168, 371 => 167, 369 => 166, 367 => 165, 365 => 164, 363 => 163, 361 => 162, 359 => 161, 357 => 160, 355 => 159, 353 => 158, 351 => 157, 349 => 156, 347 => 155, 345 => 154, 343 => 153, 341 => 152, 339 => 151, 329 => 150, 314 => 144, 310 => 143, 306 => 142, 302 => 141, 298 => 139, 292 => 137, 290 => 136, 285 => 135, 282 => 134, 272 => 132, 258 => 130, 250 => 129, 232 => 128, 227 => 126, 204 => 106, 194 => 99, 164 => 72, 159 => 69, 150 => 63, 146 => 61, 144 => 60, 141 => 59, 132 => 53, 128 => 51, 126 => 50, 109 => 35, 101 => 33, 99 => 32, 94 => 30, 91 => 29, 89 => 28, 75 => 17, 72 => 16, 62 => 15, 51 => 11, 49 => 13, 36 => 11,);
}
public function getSourceContext()
{
return new Source("{#
This file is part of EC-CUBE
Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
http://www.ec-cube.co.jp/
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
{% extends 'default_frame.twig' %}
{% set body_class = 'product_page' %}
{% block 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 () {
\$('.slider-detail').slick({
autoplay: true,
centerMode: false,
dots: false,
arrows: false,
slidesToShow: 1,
});
});
</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, ._prev').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 }},
\"availability\": \"{{ Product.stock_find ? \"InStock\" : \"OutOfStock\" }}\"
}
}
</script>
{% endblock %}
{% block main %}
{#<div class=\"container\">#}
{# {% if Product.ProductCategories is not empty %}#}
{# <div class=\"breadcrumb\">#}
{# <li>#}
{# <a href=\"{{ url('homepage') }}\">#}
{# ホーム#}
{# </a>#}
{# </li>#}
{# {% for ProductCategory in Product.ProductCategories %}#}
{# <li>#}
{# <a href=\"{{ url('product_list') }}?category_id={{ ProductCategory.Category.id }}\">{{ ProductCategory.Category.name }}</a>#}
{# </li>#}
{# {% endfor %}#}
{# <li>#}
{# <span>#}
{# {{ Product.name }}#}
{# </span>#}
{# </li>#}
{# </div>#}
{# {% endif %}#}
{#</div>#}
<div class=\"ec-productRole\">
{# パンくずリスト(関連カテゴリ) #}
<div class=\"ec-product__detail\">
<div class=\"ec-product__detail-img\">
<div class=\"ec-sliderItemRole\">
<div class=\"slider-detail\">
{% for ProductImage in Product.ProductImage %}
<div class=\"slide-item\"><img src=\"{{ asset(ProductImage, 'save_image') }}\" alt=\"{{ loop.first ? Product.name : '' }}\"></div>
{% else %}
<div class=\"slide-item\"><img src=\"{{ asset(''|no_image_product, 'save_image') }}\" alt=\"{{ loop.first ? Product.name : '' }}\" /></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=\"\"></div>
{% endfor %}
</div> #}
</div>
</div>
<div class=\"product__detail-content\">
<div class=\"ec-productRole__profile\">
{# 商品名 #}
<div class=\"ec-productRole__title\">
<h2 class=\"ec-headingTitle\">{{ Product.name }}</h2>
</div>
{# 商品説明 #}
<div class=\"ec-productRole__description\">{{ Product.description_detail|raw|nl2br }}
</div>
<dl class=\"ec-product__dl\">
{% if Product.code_min is not empty %}
<div class=\"item\">
<dt>
商品コード
</dt>
<dd>
{{ Product.code_min }}{% if Product.code_min != Product.code_max %} ~ {{ Product.code_max }}{% endif %}
</dd>
</div>
{% endif %}
{% if Product.sub_title1 is not empty %}
<div class=\"item\">
<dt>
{{ Product.sub_title1 }}
</dt>
<dd>
{{ Product.sub_comment1 }}
</dd>
</div>
{% endif %}
{% if Product.sub_title2 is not empty %}
<div class=\"item\">
<dt>
{{ Product.sub_title2 }}
</dt>
<dd>
{{ Product.sub_comment2 }}
</dd>
</div>
{% endif %}
{% if Product.sub_title3 is not empty %}
<div class=\"item\">
<dt>
{{ Product.sub_title3 }}
</dt>
<dd>
{{ Product.sub_comment3 }}
</dd>
</div>
{% endif %}
{% if Product.sub_title4 is not empty %}
<div class=\"item\">
<dt>
{{ Product.sub_title4 }}
</dt>
<dd>
{{ Product.sub_comment4 }}
</dd>
</div>
{% endif %}
{% if Product.sub_title5 is not empty %}
<div class=\"item\">
<dt>
{{ Product.sub_title5 }}
</dt>
<dd>
{{ Product.sub_comment5 }}
</dd>
</div>
{% endif %}
{% if Product.author_name is not empty %}
<div class=\"item\">
<dt>
著者
</dt>
<dd>
{{ Product.author_name }}
</dd>
</div>
{% endif %}
{% if Product.maker_name is not empty %}
<div class=\"item\">
<dt>
出版社
</dt>
<dd>
{{ Product.maker_name }}
</dd>
</div>
{% endif %}
<div class=\"item _price\">
<dt>
販売価格(税込み)
</dt>
<dd>
{% if Product.hasProductClass -%}
{% if Product.getPrice02IncTaxMin == Product.getPrice02IncTaxMax %}
{{ Product.getPrice02IncTaxMin|number_format }}円
{% else %}
{{ Product.getPrice02IncTaxMin|number_format }}円 ~ {{ Product.getPrice02IncTaxMax|number_format }}円
{% endif %}
{% else %}
{{ Product.getPrice02IncTaxMin|number_format }}円
{% endif %}
</dd>
</div>
</dl>
<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_widget(form.classcategory_id1) }}
{{ form_errors(form.classcategory_id1) }}
</div>
{% if form.classcategory_id2 is defined %}
<div class=\"ec-select\">
{{ form_widget(form.classcategory_id2) }}
{{ form_errors(form.classcategory_id2) }}
</div>
{% endif %}
{% endif %}
<div class=\"ec-numberInput\"><span>{{ '数量'|trans }}</span>
{{ form_widget(form.quantity) }}
{{ form_errors(form.quantity) }}
</div>
</div>
<div class=\"ec-productRole__btn\">
<button type=\"submit\" class=\"btn-cart add-cart\">
{{ 'カートに入れる'|trans }}
</button>
</div>
{% else %}
<div class=\"ec-productRole__btn\">
<button type=\"button\" class=\"btn-basic _disable\" disabled=\"disabled\">
{{ 'ただいま品切れ中です。'|trans }}
</button>
</div>
{% endif %}
{{ form_rest(form) }}
</form>
{#{% if BaseInfo.option_favorite_product %}#}
{# <form action=\"{{ url('product_add_favorite', {id:Product.id}) }}\" method=\"post\">#}
{# <div class=\"ec-productRole__btn\">#}
{# {% if is_favorite == false %}#}
{# <button type=\"submit\" id=\"favorite\" class=\"btn-basic\">#}
{# {{ 'お気に入りに追加'|trans }}#}
{# </button>#}
{# {% else %}#}
{# <button type=\"submit\" id=\"favorite\" class=\"btn-basic\"#}
{# disabled=\"disabled\">{{ 'お気に入りに追加済です。'|trans }}#}
{# </button>#}
{# {% endif %}#}
{# </div>#}
{# </form>#}
{#{% endif %}#}
<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=\"btn-basic _sub _prev\">{{ 'お買い物を続ける'|trans }}</span>
<a href=\"{{ url('cart') }}\" class=\"btn-cart\">{{ 'カートへ進む'|trans }}</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{% if Product.author_name is not empty or Product.author_profile is not empty %}
<div class=\"ec-product__author\">
<h3 class=\"title-icon _author\">
著者の紹介
</h3>
<div class=\"ec-product__author-content\">
<h4 class=\"ec-product__author-name\">
{{ Product.author_name }}
</h4>
<p class=\"ec-product__author-text\">
{{ Product.author_profile }}
</p>
</div>
</div>
{% endif %}
{% if Product.freearea %}
<div class=\"ec-productRole__description\">
{{ include(template_from_string(Product.freearea)) }}
</div>
{% endif %}
</div>
{% endblock %}", "Product/detail.twig", "/home/saicomp/stg-site.jp/public_html/cosmo-test3.stg-site.jp/app/template/default/Product/detail.twig");
}
}