<?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_fab3b87cc5aacacc2d952e7cbed9a5cdc4127f214dc6afc27df8fc10dfd904dc 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 product-detail product-detail-" . twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 13, $this->source); })()), "id", [], "any", false, false, false, 13));
// 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['Plugin\Synplgbase\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() {
// bfcache無効化
\$(window).bind('pageshow', function(event) {
if (event.originalEvent.persisted) {
location.reload(true);
}
});
});
</script>
<script>
\$(function() {
\$('.add-cart').on('click', function(event) {
";
// line 49
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id1", [], "any", true, true, false, 49)) {
// line 50
echo " // 規格1フォームの必須チェック
if (\$('#classcategory_id1').val() == '__unselected' || \$('#classcategory_id1').val() == '') {
\$('#classcategory_id1')[0].setCustomValidity('";
// line 52
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 58
echo "
";
// line 59
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id2", [], "any", true, true, false, 59)) {
// line 60
echo " // 規格2フォームの必須チェック
if (\$('#classcategory_id2').val() == '__unselected' || \$('#classcategory_id2').val() == '') {
\$('#classcategory_id2')[0].setCustomValidity('";
// line 62
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 68
echo "
// 個数フォームのチェック
if (\$('#quantity').val() < 1) {
\$('#quantity')[0].setCustomValidity('";
// line 71
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-checkbox').prop('checked', true);
// カートブロックを更新する
\$.ajax({
url: \"";
// line 98
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("block_cart");
echo "\",
type: 'GET',
dataType: 'html'
}).done(function(html) {
var num = \$(html).find('.ec-cartNavi__badge').html();
\$('.header-cart span').html(num);
});
}).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);
});
});
});
</script>
<script>
\$(function() {
\$('.ec-classcategory dd').on('click', function(){
if (!\$(this).find('.stock-none').length) {
var classcategory_id1 = \$(this).data('classcategory-id1');
var classcategory_id2 = \$(this).data('classcategory-id2');
var classcategory_id2_name = \$(this).data('classcategory-id2-name');
\$('#classcategory_id1').val(classcategory_id1);
\$('#classcategory_id2').children().remove().end().append(\$('<option value=\"' + classcategory_id2 + '\">' + classcategory_id2_name + '</option>')).val(classcategory_id2);
\$('html,body').animate({scrollTop: \$('#ec-productRole__cart').offset().top}, {'duration': 600, 'easing': 'easeOutCubic', 'queue': false});
}
});
});
</script>
<script type=\"application/ld+json\">
{
\"@context\": \"http://schema.org/\",
\"@type\": \"Product\",
";
// line 133
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.', 133, $this->source); })()), "code_min", [], "any", false, false, false, 133))) {
// line 134
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.', 134, $this->source); })()), "code_min", [], "any", false, false, false, 134), "html", null, true);
echo "\",
";
}
// line 136
echo " \"image\": [
";
// line 137
$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.', 137, $this->source); })()), "ProductImage", [], "any", false, false, false, 137));
$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 138
echo " \"";
echo twig_escape_filter($this->env, twig_trim_filter($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("homepage"), "//"), "html", null, true);
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($context["ProductImage"], "save_image"), "html", null, true);
echo "\"";
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, false, 138) == false)) {
echo ",";
}
// line 139
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ProductImage'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 140
echo " ],
\"name\": \"";
// line 141
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.', 141, $this->source); })()), "name", [], "any", false, false, false, 141), "html", null, true);
echo "\",
";
// line 142
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, (isset($context["Page"]) || array_key_exists("Page", $context) ? $context["Page"] : (function () { throw new RuntimeError('Variable "Page" does not exist.', 142, $this->source); })()), "description", [], "any", false, false, false, 142))) {
// line 143
echo " \"description\": \"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["Page"]) || array_key_exists("Page", $context) ? $context["Page"] : (function () { throw new RuntimeError('Variable "Page" does not exist.', 143, $this->source); })()), "description", [], "any", false, false, false, 143), "html", null, true);
echo "\",
";
} else {
// line 145
echo " \"description\": \"";
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.', 145, $this->source); })()), "description_list", [], "any", false, false, false, 145), "html", null, true);
echo "\",
";
}
// line 147
echo " \"offers\": {
\"@type\": \"Offer\",
\"url\": \"";
// line 149
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("homepage");
echo "products/detail/";
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.', 149, $this->source); })()), "id", [], "any", false, false, false, 149), "html", null, true);
echo "\",
\"itemCondition\": \"http://schema.org/NewCondition\",
";
// line 151
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.', 151, $this->source); })()), "stock_find", [], "any", false, false, false, 151)) {
// line 152
echo " \"availability\": \"http://schema.org/InStock\",
";
} else {
// line 154
echo " \"availability\": \"http://schema.org/OutOfStock\",
";
}
// line 156
echo " \"price\": \"";
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.', 156, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 156), "html", null, true);
echo "\",
\"priceCurrency\": \"JPY\"
}
}
</script>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 163
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 164
echo " <div class=\"ec-productRole\">
\t\t<div class=\"sp-bread\"><a href=\"/\">» 車検一覧に戻る</a></div>
";
// line 166
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.', 166, $this->source); })()), "freearea", [], "any", false, false, false, 166)) {
// line 167
echo " <div class=\"ec-productRole__freearea page-content\">
";
// line 168
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.', 168, $this->source); })()), "freearea", [], "any", false, false, false, 168)));
echo "
</div>
";
}
// line 171
echo " <div class=\"ec-grid2\">
<div class=\"ec-grid2__cell\">
<div class=\"ec-sliderItemRole\">
<div class=\"item_visual\">
";
// line 175
$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.', 175, $this->source); })()), "ProductImage", [], "any", false, false, false, 175));
foreach ($context['_seq'] as $context["_key"] => $context["ProductImage"]) {
// line 176
echo " <div class=\"slide-item\">
";
// line 177
echo call_user_func_array($this->env->getFunction('synResizeImage')->getCallable(), [["url" => $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl( // line 178
$context["ProductImage"], "save_image"), "pc" => ["width" => 660, "height" => 660, "type" => "contain"], "alt" => twig_get_attribute($this->env, $this->source, // line 180
(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), "noimage" => $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/noimage.jpg"), "loading" => true]]);
// line 183
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 186
echo " </div>
<div class=\"item_nav\">
";
// line 188
$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.', 188, $this->source); })()), "ProductImage", [], "any", false, false, false, 188));
$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 189
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, 189), "html", null, true);
echo "\">
";
// line 191
echo " ";
echo call_user_func_array($this->env->getFunction('synResizeImage')->getCallable(), [["url" => $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl( // line 192
$context["ProductImage"], "save_image"), "pc" => ["width" => 660, "height" => 660, "type" => "contain"], "alt" => twig_get_attribute($this->env, $this->source, // line 194
(isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 194, $this->source); })()), "name", [], "any", false, false, false, 194), "noimage" => $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/noimage.jpg"), "loading" => true]]);
// line 197
echo "
</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 200
echo " </div>
</div>
</div>
<div class=\"ec-grid2__cell\">
<div class=\"ec-productRole__profile\">
";
// line 206
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.', 206, $this->source); })()), "code_min", [], "any", false, false, false, 206))) {
// line 207
echo " <div class=\"ec-productRole__code\">
";
// line 208
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("商品コード"), "html", null, true);
echo ": <span class=\"product-code-default\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 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);
}
echo "</span>
</div>
";
}
// line 211
echo " ";
// line 212
echo " <div class=\"ec-productRole__title\">
<h1 class=\"ec-headingTitle\">";
// line 213
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.', 213, $this->source); })()), "name", [], "any", false, false, false, 213), "html", null, true);
echo "</h1>
</div>
";
// line 216
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.', 216, $this->source); })()), "Tags", [], "any", false, false, false, 216))) {
// line 217
echo " <ul class=\"ec-productRole__tags\">
";
// line 218
$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.', 218, $this->source); })()), "Tags", [], "any", false, false, false, 218));
foreach ($context['_seq'] as $context["_key"] => $context["Tag"]) {
// line 219
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, 219), "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 221
echo " </ul>
";
}
// line 223
echo " ";
// line 224
echo " <div class=\"ec-productRole__price\">
<div class=\"ec-productRole__price01\">
";
// line 226
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.', 226, $this->source); })()), "hasProductClass", [], "any", false, false, false, 226)) {
// line 227
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.', 227, $this->source); })()), "getPrice01Min", [], "any", false, false, false, 227)) && (twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 227, $this->source); })()), "getPrice01IncTaxMin", [], "any", false, false, false, 227) == twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 227, $this->source); })()), "getPrice01IncTaxMax", [], "any", false, false, false, 227)))) {
// line 228
echo " 通常価格:<span class=\"ec-price__price 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.', 228, $this->source); })()), "getPrice01IncTaxMin", [], "any", false, false, false, 228)), "html", null, true);
echo "</span>
<span class=\"ec-price__tax\">税込</span>
";
} elseif (( !(null === twig_get_attribute($this->env, $this->source, // line 230
(isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 230, $this->source); })()), "getPrice01Min", [], "any", false, false, false, 230)) && !(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.', 230, $this->source); })()), "getPrice01Max", [], "any", false, false, false, 230)))) {
// line 231
echo " 通常価格:<span class=\"ec-price__price 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.', 231, $this->source); })()), "getPrice01IncTaxMin", [], "any", false, false, false, 231)), "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.', 231, $this->source); })()), "getPrice01IncTaxMax", [], "any", false, false, false, 231)), "html", null, true);
echo "</span>
<span class=\"ec-price__tax\">税込</span>
";
}
// line 234
echo " ";
} else {
// line 235
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.', 235, $this->source); })()), "getPrice01Max", [], "any", false, false, false, 235))) {
// line 236
echo " 通常価格:<span class=\"ec-price__price 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.', 236, $this->source); })()), "getPrice01IncTaxMin", [], "any", false, false, false, 236)), "html", null, true);
echo "</span>
<span class=\"ec-price__tax\">税込</span>
";
}
// line 239
echo " ";
}
// line 240
echo " </div>
";
// line 242
echo " <div class=\"ec-productRole__price02";
if (((((isset($context["Synplgbase"]) || array_key_exists("Synplgbase", $context)) && twig_get_attribute($this->env, $this->source, (isset($context["Synplgbase"]) || array_key_exists("Synplgbase", $context) ? $context["Synplgbase"] : (function () { throw new RuntimeError('Variable "Synplgbase" does not exist.', 242, $this->source); })()), "ProductCustomerPriceOn", [], "any", false, false, false, 242)) && !(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.', 242, $this->source); })()), "getPrice03Min", [], "any", false, false, false, 242))) && $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_USER"))) {
echo " hidden";
}
echo "\">
";
// line 243
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.', 243, $this->source); })()), "hasProductClass", [], "any", false, false, false, 243)) {
// line 244
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.', 244, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 244) == twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 244, $this->source); })()), "getPrice02IncTaxMax", [], "any", false, false, false, 244))) {
// line 245
echo " 販売価格:<span class=\"ec-price__price price02-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.', 245, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 245)), "html", null, true);
echo "</span>
<span class=\"ec-price__tax\">税込</span>
";
} else {
// line 248
echo " 販売価格:<span class=\"ec-price__price price02-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.', 248, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 248)), "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.', 248, $this->source); })()), "getPrice02IncTaxMax", [], "any", false, false, false, 248)), "html", null, true);
echo "</span>
<span class=\"ec-price__tax\">税込</span>
";
}
// line 251
echo " ";
} else {
// line 252
echo " 販売価格:<span class=\"ec-price__price price02-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.', 252, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 252)), "html", null, true);
echo "</span>
<span class=\"ec-price__tax\">税込</span>
";
}
// line 255
echo " </div>
";
// line 257
echo " ";
if (((isset($context["Synplgbase"]) || array_key_exists("Synplgbase", $context)) && twig_get_attribute($this->env, $this->source, (isset($context["Synplgbase"]) || array_key_exists("Synplgbase", $context) ? $context["Synplgbase"] : (function () { throw new RuntimeError('Variable "Synplgbase" does not exist.', 257, $this->source); })()), "ProductCustomerPriceOn", [], "any", false, false, false, 257))) {
// line 258
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.', 258, $this->source); })()), "getPrice03Min", [], "any", false, false, false, 258))) {
// line 259
echo " <div class=\"ec-productRole__price03\">
<p>
ショップ会員限定価格:
";
// line 262
if ( !$this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_USER")) {
echo "<span>* 会員登録後、ログインするとこの価格で購入できます。</span>";
}
// line 263
echo " </p>
";
// line 264
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.', 264, $this->source); })()), "hasProductClass", [], "any", false, false, false, 264)) {
// line 265
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.', 265, $this->source); })()), "getPrice03Min", [], "any", false, false, false, 265)) && (twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 265, $this->source); })()), "getPrice03Min", [], "any", false, false, false, 265) == twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 265, $this->source); })()), "getPrice03Max", [], "any", false, false, false, 265)))) {
// line 266
echo " <span class=\"ec-price__price price03-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.', 266, $this->source); })()), "getPrice03IncTaxMin", [], "any", false, false, false, 266)), "html", null, true);
echo "</span>
<span class=\"ec-price__tax\">税込</span>
";
} elseif ( !(null === twig_get_attribute($this->env, $this->source, // line 268
(isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 268, $this->source); })()), "getPrice03Min", [], "any", false, false, false, 268))) {
// line 269
echo " <span class=\"ec-price__price price03-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.', 269, $this->source); })()), "getPrice03IncTaxMin", [], "any", false, false, false, 269)), "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.', 269, $this->source); })()), "getPrice03IncTaxMax", [], "any", false, false, false, 269)), "html", null, true);
echo "</span>
<span class=\"ec-price__tax\">税込</span>
";
}
// line 272
echo " ";
} elseif ( !(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.', 272, $this->source); })()), "getPrice03Max", [], "any", false, false, false, 272))) {
// line 273
echo " <span class=\"ec-price__price price03-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.', 273, $this->source); })()), "getPrice03IncTaxMin", [], "any", false, false, false, 273)), "html", null, true);
echo "</span>
<span class=\"ec-price__tax\">税込</span>
";
}
// line 276
echo " </div>
";
}
// line 278
echo " ";
}
// line 279
echo " </div>
";
// line 281
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.', 281, $this->source); })()), "ProductCategories", [], "any", false, false, false, 281))) {
// line 282
echo " <div class=\"ec-productRole__category\">
<div>";
// line 283
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("関連カテゴリ"), "html", null, true);
echo "</div>
";
// line 284
$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.', 284, $this->source); })()), "ProductCategories", [], "any", false, false, false, 284));
foreach ($context['_seq'] as $context["_key"] => $context["ProductCategory"]) {
// line 285
echo " <ul>
<li>
";
// line 287
$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, 287), "path", [], "any", false, false, false, 287));
$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 288
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, 288), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Category"], "name", [], "any", false, false, false, 288), "html", null, true);
echo "</a>";
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, false, 288) == false)) {
// line 289
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 291
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 294
echo " </div>
";
}
// line 296
echo " ";
// line 297
echo " ";
// line 298
echo " <div class=\"ec-productRole__cart\" id=\"ec-productRole__cart\">
<form action=\"";
// line 299
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.', 299, $this->source); })()), "id", [], "any", false, false, false, 299)]), "html", null, true);
echo "\" method=\"post\" id=\"form1\" name=\"form1\">
";
// line 300
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.', 300, $this->source); })()), "stock_find", [], "any", false, false, false, 300)) {
// line 301
echo " <div class=\"ec-productRole__actions\">
";
// line 302
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id1", [], "any", true, true, false, 302)) {
// line 303
echo " <div class=\"ec-select\">
";
// line 304
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.', 304, $this->source); })()), "classcategory_id1", [], "any", false, false, false, 304), 'widget');
echo "
";
// 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), 'errors');
echo "
</div>
";
// line 307
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id2", [], "any", true, true, false, 307)) {
// line 308
echo " <div class=\"ec-select\">
";
// line 309
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.', 309, $this->source); })()), "classcategory_id2", [], "any", false, false, false, 309), 'widget');
echo "
";
// 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), 'errors');
echo "
</div>
";
}
// line 313
echo " ";
}
// line 314
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 315
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.', 315, $this->source); })()), "quantity", [], "any", false, false, false, 315), 'widget');
echo "
";
// 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), 'errors');
echo "
</div>
</div>
<div class=\"ec-productRole__btn\">
<button type=\"submit\" class=\"ec-blockBtn--action add-cart\">
";
// line 321
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに入れる"), "html", null, true);
echo "
</button>
</div>
";
} else {
// line 325
echo " <div class=\"ec-productRole__btn\">
<button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
";
// line 327
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ただいま品切れ中です。"), "html", null, true);
echo "
</button>
</div>
";
}
// line 331
echo "
";
// line 332
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>
<div class=\"ec-modal\">
<input type=\"checkbox\" id=\"ec-modal-checkbox\" class=\"checkbox\">
<div class=\"ec-modal-overlay\">
<label for=\"ec-modal-checkbox\" class=\"ec-modal-overlay-close\"></label>
<div class=\"ec-modal-wrap\">
<label for=\"ec-modal-checkbox\" class=\"ec-modal-close\"><span class=\"ec-icon\"></span></label>
<div id=\"ec-modal-header\" class=\"text-center\">";
// line 340
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\">
<label for=\"ec-modal-checkbox\" class=\"ec-inlineBtn--cancel\">";
// line 343
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お買い物を続ける"), "html", null, true);
echo "</label>
<a href=\"";
// line 344
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 350
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.', 350, $this->source); })()), "option_favorite_product", [], "any", false, false, false, 350)) {
// line 351
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.', 351, $this->source); })()), "id", [], "any", false, false, false, 351)]), "html", null, true);
echo "\" method=\"post\">
<div class=\"ec-productRole__btn\">
";
// line 353
if (((isset($context["is_favorite"]) || array_key_exists("is_favorite", $context) ? $context["is_favorite"] : (function () { throw new RuntimeError('Variable "is_favorite" does not exist.', 353, $this->source); })()) == false)) {
// line 354
echo " <button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel\">
";
// line 355
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お気に入りに追加"), "html", null, true);
echo "
</button>
";
} else {
// line 358
echo " <button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel\"
disabled=\"disabled\">";
// line 359
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お気に入りに追加済です。"), "html", null, true);
echo "
</button>
";
}
// line 362
echo " </div>
</form>
";
}
// line 365
echo " </div>
<div class=\"ec-productRole__description page-content\">";
// line 366
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.', 366, $this->source); })()), "description_detail", [], "any", false, false, false, 366);
echo "</div>
</div>
</div>
</div>
</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 ( 873 => 366, 870 => 365, 865 => 362, 859 => 359, 856 => 358, 850 => 355, 847 => 354, 845 => 353, 839 => 351, 837 => 350, 826 => 344, 822 => 343, 816 => 340, 805 => 332, 802 => 331, 795 => 327, 791 => 325, 784 => 321, 776 => 316, 772 => 315, 767 => 314, 764 => 313, 758 => 310, 754 => 309, 751 => 308, 749 => 307, 744 => 305, 740 => 304, 737 => 303, 735 => 302, 732 => 301, 730 => 300, 726 => 299, 723 => 298, 721 => 297, 719 => 296, 715 => 294, 707 => 291, 692 => 289, 683 => 288, 666 => 287, 662 => 285, 658 => 284, 654 => 283, 651 => 282, 648 => 281, 645 => 279, 642 => 278, 638 => 276, 631 => 273, 628 => 272, 619 => 269, 617 => 268, 611 => 266, 608 => 265, 606 => 264, 603 => 263, 599 => 262, 594 => 259, 591 => 258, 588 => 257, 585 => 255, 578 => 252, 575 => 251, 566 => 248, 559 => 245, 556 => 244, 554 => 243, 547 => 242, 544 => 240, 541 => 239, 534 => 236, 531 => 235, 528 => 234, 519 => 231, 517 => 230, 511 => 228, 508 => 227, 506 => 226, 502 => 224, 500 => 223, 496 => 221, 485 => 219, 481 => 218, 478 => 217, 475 => 216, 470 => 213, 467 => 212, 465 => 211, 453 => 208, 450 => 207, 447 => 206, 440 => 200, 424 => 197, 422 => 194, 421 => 192, 419 => 191, 414 => 189, 397 => 188, 393 => 186, 385 => 183, 383 => 180, 382 => 178, 381 => 177, 378 => 176, 374 => 175, 368 => 171, 362 => 168, 359 => 167, 357 => 166, 353 => 164, 343 => 163, 326 => 156, 322 => 154, 318 => 152, 316 => 151, 309 => 149, 305 => 147, 299 => 145, 293 => 143, 291 => 142, 287 => 141, 284 => 140, 270 => 139, 262 => 138, 245 => 137, 242 => 136, 236 => 134, 234 => 133, 204 => 106, 193 => 98, 163 => 71, 158 => 68, 149 => 62, 145 => 60, 143 => 59, 140 => 58, 131 => 52, 127 => 50, 125 => 49, 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 product-detail product-detail-' ~ Product.id %}
{% 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);
}
});
});
</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-checkbox').prop('checked', true);
// カートブロックを更新する
\$.ajax({
url: \"{{ url('block_cart') }}\",
type: 'GET',
dataType: 'html'
}).done(function(html) {
var num = \$(html).find('.ec-cartNavi__badge').html();
\$('.header-cart span').html(num);
});
}).fail(function(data) {
alert('{{ 'カートへの追加に失敗しました。'|trans }}');
}).always(function(data) {
// Buttonを有効にする
\$('.add-cart').prop('disabled', false);
});
});
});
</script>
<script>
\$(function() {
\$('.ec-classcategory dd').on('click', function(){
if (!\$(this).find('.stock-none').length) {
var classcategory_id1 = \$(this).data('classcategory-id1');
var classcategory_id2 = \$(this).data('classcategory-id2');
var classcategory_id2_name = \$(this).data('classcategory-id2-name');
\$('#classcategory_id1').val(classcategory_id1);
\$('#classcategory_id2').children().remove().end().append(\$('<option value=\"' + classcategory_id2 + '\">' + classcategory_id2_name + '</option>')).val(classcategory_id2);
\$('html,body').animate({scrollTop: \$('#ec-productRole__cart').offset().top}, {'duration': 600, 'easing': 'easeOutCubic', 'queue': false});
}
});
});
</script>
<script type=\"application/ld+json\">
{
\"@context\": \"http://schema.org/\",
\"@type\": \"Product\",
{% if Product.code_min is not empty %}
\"sku\": \"{{ Product.code_min }}\",
{% endif %}
\"image\": [
{% for ProductImage in Product.ProductImage %}
\"{{ url('homepage')|trim('//') }}{{ asset(ProductImage, 'save_image') }}\"{% if loop.last == false %},{% endif %}
{% endfor %}
],
\"name\": \"{{ Product.name }}\",
{% if Page.description is not empty %}
\"description\": \"{{ Page.description }}\",
{% else %}
\"description\": \"{{ Product.description_list }}\",
{% endif %}
\"offers\": {
\"@type\": \"Offer\",
\"url\": \"{{ url('homepage') }}products/detail/{{ Product.id }}\",
\"itemCondition\": \"http://schema.org/NewCondition\",
{% if Product.stock_find %}
\"availability\": \"http://schema.org/InStock\",
{% else %}
\"availability\": \"http://schema.org/OutOfStock\",
{% endif %}
\"price\": \"{{ Product.getPrice02IncTaxMin }}\",
\"priceCurrency\": \"JPY\"
}
}
</script>
{% endblock %}
{% block main %}
<div class=\"ec-productRole\">
\t\t<div class=\"sp-bread\"><a href=\"/\">» 車検一覧に戻る</a></div>
{% if Product.freearea %}
<div class=\"ec-productRole__freearea page-content\">
{{ include(template_from_string(Product.freearea|raw)) }}
</div>
{% endif %}
<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\">
{{ synResizeImage({
url: asset(ProductImage, 'save_image'),
pc: {width: 660, height: 660, type: 'contain'},
alt: Product.name,
noimage: asset('assets/img/noimage.jpg'),
loading: true,
}) }}
</div>
{% endfor %}
</div>
<div class=\"item_nav\">
{% for ProductImage in Product.ProductImage %}
<div class=\"slideThumb\" data-index=\"{{ loop.index0 }}\">
{# slide-itemと同じ画像を指定 #}
{{ synResizeImage({
url: asset(ProductImage, 'save_image'),
pc: {width: 660, height: 660, type: 'contain'},
alt: Product.name,
noimage: asset('assets/img/noimage.jpg'),
loading: true,
}) }}
</div>
{% endfor %}
</div>
</div>
</div>
<div class=\"ec-grid2__cell\">
<div class=\"ec-productRole__profile\">
{# 商品コード #}
{% if Product.code_min is not empty %}
<div class=\"ec-productRole__code\">
{{ '商品コード'|trans }}: <span class=\"product-code-default\">{{ Product.code_min }}{% if Product.code_min != Product.code_max %} ~ {{ Product.code_max }}{% endif %}</span>
</div>
{% endif %}
{# 商品名 #}
<div class=\"ec-productRole__title\">
<h1 class=\"ec-headingTitle\">{{ Product.name }}</h1>
</div>
{# タグ #}
{% if Product.Tags is not empty %}
<ul class=\"ec-productRole__tags\">
{% for Tag in Product.Tags %}
<li class=\"ec-productRole__tag tag_{{ Tag.id }}\">{{ Tag }}</li>
{% endfor %}
</ul>
{% endif %}
{# 通常価格 #}
<div class=\"ec-productRole__price\">
<div class=\"ec-productRole__price01\">
{% if Product.hasProductClass %}
{% if Product.getPrice01Min is not null and Product.getPrice01IncTaxMin == Product.getPrice01IncTaxMax %}
通常価格:<span class=\"ec-price__price price01-default\">{{ Product.getPrice01IncTaxMin|price }}</span>
<span class=\"ec-price__tax\">税込</span>
{% elseif Product.getPrice01Min is not null and Product.getPrice01Max is not null %}
通常価格:<span class=\"ec-price__price price01-default\">{{ Product.getPrice01IncTaxMin|price }}~{{ Product.getPrice01IncTaxMax|price }}</span>
<span class=\"ec-price__tax\">税込</span>
{% endif %}
{% else %}
{% if Product.getPrice01Max is not null %}
通常価格:<span class=\"ec-price__price price01-default\">{{ Product.getPrice01IncTaxMin|price }}</span>
<span class=\"ec-price__tax\">税込</span>
{% endif %}
{% endif %}
</div>
{# 販売価格 #}
<div class=\"ec-productRole__price02{% if Synplgbase is defined and Synplgbase.ProductCustomerPriceOn and Product.getPrice03Min is not null and is_granted('ROLE_USER') %} hidden{% endif %}\">
{% if Product.hasProductClass %}
{% if Product.getPrice02IncTaxMin == Product.getPrice02IncTaxMax %}
販売価格:<span class=\"ec-price__price price02-default\">{{ Product.getPrice02IncTaxMin|price }}</span>
<span class=\"ec-price__tax\">税込</span>
{% else %}
販売価格:<span class=\"ec-price__price price02-default\">{{ Product.getPrice02IncTaxMin|price }}~{{ Product.getPrice02IncTaxMax|price }}</span>
<span class=\"ec-price__tax\">税込</span>
{% endif %}
{% else %}
販売価格:<span class=\"ec-price__price price02-default\">{{ Product.getPrice02IncTaxMin|price }}</span>
<span class=\"ec-price__tax\">税込</span>
{% endif %}
</div>
{# 会員価格 #}
{% if Synplgbase is defined and Synplgbase.ProductCustomerPriceOn %}
{% if Product.getPrice03Min is not null %}
<div class=\"ec-productRole__price03\">
<p>
ショップ会員限定価格:
{% if not is_granted('ROLE_USER') %}<span>* 会員登録後、ログインするとこの価格で購入できます。</span>{% endif %}
</p>
{% if Product.hasProductClass %}
{% if Product.getPrice03Min is not null and Product.getPrice03Min == Product.getPrice03Max %}
<span class=\"ec-price__price price03-default\">{{ Product.getPrice03IncTaxMin|price }}</span>
<span class=\"ec-price__tax\">税込</span>
{% elseif Product.getPrice03Min is not null %}
<span class=\"ec-price__price price03-default\">{{ Product.getPrice03IncTaxMin|price }}~{{ Product.getPrice03IncTaxMax|price }}</span>
<span class=\"ec-price__tax\">税込</span>
{% endif %}
{% elseif Product.getPrice03Max is not null %}
<span class=\"ec-price__price price03-default\">{{ Product.getPrice03IncTaxMin|price }}</span>
<span class=\"ec-price__tax\">税込</span>
{% endif %}
</div>
{% endif %}
{% endif %}
</div>
{# 関連カテゴリ #}
{% 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 %}
{# {% if Synplgbase is defined %}{{ include_dispatch('Module/classcategory.twig') }}{% endif %} #}
{# {% if Synplgbase is defined %}{{ include_dispatch('Module/classcategory_table.twig') }}{% endif %} #}
<div class=\"ec-productRole__cart\" id=\"ec-productRole__cart\">
<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=\"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\">
<input type=\"checkbox\" id=\"ec-modal-checkbox\" class=\"checkbox\">
<div class=\"ec-modal-overlay\">
<label for=\"ec-modal-checkbox\" class=\"ec-modal-overlay-close\"></label>
<div class=\"ec-modal-wrap\">
<label for=\"ec-modal-checkbox\" class=\"ec-modal-close\"><span class=\"ec-icon\"></span></label>
<div id=\"ec-modal-header\" class=\"text-center\">{{ 'カートに追加しました。'|trans }}</div>
<div class=\"ec-modal-box\">
<div class=\"ec-role\">
<label for=\"ec-modal-checkbox\" class=\"ec-inlineBtn--cancel\">{{ 'お買い物を続ける'|trans }}</label>
<a href=\"{{ url('cart') }}\" class=\"ec-inlineBtn--action\">{{ 'カートへ進む'|trans }}</a>
</div>
</div>
</div>
</div>
</div>
{% if BaseInfo.option_favorite_product %}
<form action=\"{{ url('product_add_favorite', {id:Product.id}) }}\" method=\"post\">
<div class=\"ec-productRole__btn\">
{% if is_favorite == false %}
<button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel\">
{{ 'お気に入りに追加'|trans }}
</button>
{% else %}
<button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel\"
disabled=\"disabled\">{{ 'お気に入りに追加済です。'|trans }}
</button>
{% endif %}
</div>
</form>
{% endif %}
</div>
<div class=\"ec-productRole__description page-content\">{{ Product.description_detail|raw }}</div>
</div>
</div>
</div>
</div>
{% endblock %}
", "Product/detail.twig", "/home/xs920997/syaken.biz/public_html/prepaid/app/template/syntpl/Product/detail.twig");
}
}