<?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;
/* __string_template__103145ddcd52d5080a3ad68db6c27693 */
class __TwigTemplate_b5149dcfff3464cc70eab8ed0f9bc184 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'],
];
$this->sandbox = $this->env->getExtension('\Twig\Extension\SandboxExtension');
$this->checkSecurity();
}
protected function doGetParent(array $context)
{
// line 11
return "default_frame.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "__string_template__103145ddcd52d5080a3ad68db6c27693"));
// line 13
$context["body_class"] = "product_page";
// line 14
$context["price_ranges"] = twig_get_attribute($this->env, $this->source, $this->env->getFunction('repository')->getCallable()("Plugin\\lecastPriceSelectBlock42\\Entity\\PriceRange"), "getPriceRange", [], "any", false, false, true, 14);
// line 15
$context["price_range_text"] = twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["app"] ?? null), "request", [], "any", false, false, true, 15), "query", [], "any", false, false, true, 15), "get", [0 => "price_range"], "method", false, false, true, 15);
// line 11
$this->parent = $this->loadTemplate("default_frame.twig", "__string_template__103145ddcd52d5080a3ad68db6c27693", 11);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 17
public function block_javascript($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascript"));
// line 18
echo " <script>
eccube.productsClassCategories = {
";
// line 20
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(($context["pagination"] ?? null));
$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["Product"]) {
// line 21
echo " \"";
echo twig_escape_filter($this->env, twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, true, 21), 21, $this->source), "js"), "html", null, true);
echo "\": ";
echo $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getClassCategoriesAsJson($this->sandbox->ensureToStringAllowed($context["Product"], 21, $this->source));
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, true, 21) == false)) {
echo ", ";
}
// line 22
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['Product'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 23
echo " };
\$(function() {
// 表示件数を変更
\$('.disp-number').change(function() {
var dispNumber = \$(this).val();
\$('#disp_number').val(dispNumber);
\$('#pageno').val(1);
\$(\"#form1\").submit();
});
// 並び順を変更
\$('.order-by').change(function() {
var orderBy = \$(this).val();
\$('#orderby').val(orderBy);
\$('#pageno').val(1);
\$(\"#form1\").submit();
});
\$('.add-cart').on('click', function(e) {
var \$form = \$(this).parents('li').find('form');
// 個数フォームのチェック
var \$quantity = \$form.parent().find('.quantity');
if (\$quantity.val() < 1) {
\$quantity[0].setCustomValidity('";
// line 49
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("1以上で入力してください。"), "html", null, true);
echo "');
setTimeout(function() {
loadingOverlay('hide');
}, 100);
return true;
} else {
\$quantity[0].setCustomValidity('');
}
e.preventDefault();
\$.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 77
echo $this->extensions['Eccube\Twig\Extension\IgnoreRoutingNotFoundExtension']->getUrl("block_cart");
echo "',
type: 'GET',
dataType: 'html'
}).done(function(html) {
\$('.ec-headerRole__cart').html(html);
});
}).fail(function(data) {
alert('";
// line 84
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-overlay, .ec-modal .ec-inlineBtn--cancel').on('click', function() {
\$('.ec-modal').hide()
});
</script>
\t<script type=\"text/javascript\">
\t\tjQuery(function(\$){
\t\t\t\$(\".ec-shelfRole .quantity\").after('<span id=\"add1\" class=\"plus\">+</span>').before('<span id=\"minus1\" class=\"minus\">-</span>');
\t\t\t\$(\".plus\").click(function(){
\t\t\t\tvar currentVal = parseInt(jQuery(this).prev(\".ec-shelfRole .quantity\").val());
\t\t\t\tif (!currentVal || currentVal==\"\" || currentVal == \"NaN\") currentVal = 0;
\t\t\t\t\$(this).prev(\".ec-shelfRole .quantity\").val(currentVal + 1);
\t\t\t});
\t\t\t\$(\".minus\").click(function(){
\t\t\t\tvar currentVal = parseInt(jQuery(this).next(\".ec-shelfRole .quantity\").val());
\t\t\t\tif (currentVal == \"NaN\") currentVal = 0;
\t\t\t\tif (currentVal > 0) {
\t\t\t\t\t\$(this).next(\".ec-shelfRole .quantity\").val(currentVal - 1);
\t\t\t\t}
\t\t\t});
\t\t});
</script>
\t<script type=\"text/javascript\">
\t\t\$(function() {
\t\t\t\$('.ec-searchnavRole__infos .ec-searchnavRole__actions .square').click(function() {
\t\t\t\t\$(this).addClass('active');
\t\t\t\t\$('.ec-searchnavRole__infos .ec-searchnavRole__actions .list').removeClass('active');
\t\t\t\t
\t\t\t\t\$('.ec-shelfGrid').removeClass('column1');
\t\t\t\t";
// line 123
if ((twig_get_attribute($this->env, $this->source, ($context["Layout"] ?? null), "SideLeft", [], "any", false, false, true, 123) || twig_get_attribute($this->env, $this->source, ($context["Layout"] ?? null), "SideRight", [], "any", false, false, true, 123))) {
// line 124
echo "\t\t\t\t\t\$('.ec-shelfGrid__item').addClass('column4');
\t\t\t\t";
} else {
// line 126
echo "\t\t\t\t\t\$('.ec-shelfGrid__item').addClass('column5');
\t\t\t\t";
}
// line 128
echo "\t\t\t});
\t\t\t\$('.ec-searchnavRole__infos .ec-searchnavRole__actions .list').click(function() {
\t\t\t\t\$(this).addClass('active');
\t\t\t\t\$('.ec-searchnavRole__infos .ec-searchnavRole__actions .square').removeClass('active');
\t\t\t\t\$('.ec-shelfGrid').addClass('column1');
\t\t\t\t";
// line 135
if ((twig_get_attribute($this->env, $this->source, ($context["Layout"] ?? null), "SideLeft", [], "any", false, false, true, 135) || twig_get_attribute($this->env, $this->source, ($context["Layout"] ?? null), "SideRight", [], "any", false, false, true, 135))) {
// line 136
echo "\t\t\t\t\t\$('.ec-shelfGrid__item').removeClass('column4');
\t\t\t\t";
} else {
// line 138
echo "\t\t\t\t\t\$('.ec-shelfGrid__item').removeClass('column5');
\t\t\t\t";
}
// line 140
echo "\t\t\t});
\t\t});
</script>
";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 145
public function block_main($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "main"));
// line 146
echo " ";
if ((twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["search_form"] ?? null), "category_id", [], "any", false, false, true, 146), "vars", [], "any", false, false, true, 146), "errors", [], "any", false, false, true, 146)) > 0)) {
// line 147
echo " <div class=\"ec-searchnavRole\">
<p class=\"errormsg text-danger\">";
// line 148
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ご指定のカテゴリは存在しません"), "html", null, true);
echo "</p>
</div>
";
} else {
// line 151
echo " <div class=\"ec-searchnavRole\">
<form name=\"form1\" id=\"form1\" method=\"get\" action=\"?\">
";
// line 153
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(($context["search_form"] ?? null));
foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
// line 154
echo " <input type=\"hidden\" id=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "vars", [], "any", false, false, true, 154), "id", [], "any", false, false, true, 154), 154, $this->source), "html", null, true);
echo "\"
name=\"";
// line 155
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "vars", [], "any", false, false, true, 155), "full_name", [], "any", false, false, true, 155), 155, $this->source), "html", null, true);
echo "\"
";
// line 156
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "vars", [], "any", false, false, true, 156), "value", [], "any", false, false, true, 156))) {
echo "value=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "vars", [], "any", false, false, true, 156), "value", [], "any", false, false, true, 156), 156, $this->source), "html", null, true);
echo "\" ";
}
echo "/>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 158
echo " </form>
<!-- ▼item_list▼ -->
<div class=\"ec-shelfRole\">
<div class=\"ec-itemNav\" style=\"color: #ff8c00;\">【価格帯】</div>
<ul class=\"ec-itemNav__nav\">
";
// line 164
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(($context["price_ranges"] ?? null));
foreach ($context['_seq'] as $context["_key"] => $context["PriceRange"]) {
// line 165
echo " <li>
<a style=\"background: #ffffe0;\" href=\"";
// line 166
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\IgnoreRoutingNotFoundExtension']->getUrl("product_list", ["price_range" => (($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["PriceRange"], "min_value", [], "any", false, false, true, 166), 166, $this->source) . "-") . $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["PriceRange"], "max_value", [], "any", false, false, true, 166), 166, $this->source))]), "html", null, true);
if ( !(null === ($context["Category"] ?? null))) {
echo "&category_id=";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, ($context["Category"] ?? null), "path", [], "any", false, false, true, 166));
$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["Path"]) {
if (twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, true, 166)) {
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Path"], "id", [], "any", false, false, true, 166), 166, $this->source), "html", null, 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'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Path'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
}
echo "\">
<p>";
// line 167
echo $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["PriceRange"], "display_name", [], "any", false, false, true, 167), 167, $this->source);
echo "</p>
</a>
</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['PriceRange'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 171
echo " </ul>
";
// line 172
if ( !twig_test_empty(($context["price_range_text"] ?? null))) {
echo "<p style=\"width: 77%; background: #666666; color: #ffffff; font-weight: bold;\"> > ";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(($context["price_range_text"] ?? null), 172, $this->source), "html", null, true);
echo "円で絞込 </p>";
}
// line 173
echo " </div>
<!-- ▲item_list▲ -->
<br />
<div class=\"ec-searchnavRole__topicpath\">
<ol class=\"ec-topicpath\">
<li class=\"ec-topicpath__item\"><a href=\"";
// line 178
echo $this->extensions['Eccube\Twig\Extension\IgnoreRoutingNotFoundExtension']->getUrl("product_list");
echo "\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("全ての商品"), "html", null, true);
echo "</a>
</li>
";
// line 180
if ( !(null === ($context["Category"] ?? null))) {
// line 181
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, ($context["Category"] ?? null), "path", [], "any", false, false, true, 181));
$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["Path"]) {
// line 182
echo " <li class=\"ec-topicpath__divider\"><i class=\"ec-headerNav__itemIcon fas fa-angle-right fa-fw\"></i></li>
<li class=\"ec-topicpath__item";
// line 183
if (twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, true, 183)) {
echo "--active";
}
echo "\"><a
href=\"";
// line 184
echo $this->extensions['Eccube\Twig\Extension\IgnoreRoutingNotFoundExtension']->getUrl("product_list");
echo "?category_id=";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Path"], "id", [], "any", false, false, true, 184), 184, $this->source), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Path"], "name", [], "any", false, false, true, 184), 184, $this->source), "html", null, true);
echo "</a>
</li>
";
++$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['Path'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 187
echo " ";
}
// line 188
echo " ";
if ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["search_form"] ?? null), "vars", [], "any", false, false, true, 188), "value", [], "any", false, false, true, 188) && twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["search_form"] ?? null), "vars", [], "any", false, false, true, 188), "value", [], "any", false, false, true, 188), "name", [], "any", false, false, true, 188))) {
// line 189
echo " <li class=\"ec-topicpath__item\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("「%name%」の検索結果", ["%name%" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["search_form"] ?? null), "vars", [], "any", false, false, true, 189), "value", [], "any", false, false, true, 189), "name", [], "any", false, false, true, 189)]), "html", null, true);
echo "</li>
";
}
// line 191
echo " </ol>
</div>
<div class=\"ec-searchnavRole__infos\">
<div class=\"ec-searchnavRole__counter\">
";
// line 196
if ((twig_get_attribute($this->env, $this->source, ($context["pagination"] ?? null), "totalItemCount", [], "any", false, false, true, 196) > 0)) {
// line 197
echo " ";
echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("<span class=\"ec-font-bold\">%count%件</span><span>の商品が見つかりました</span>", ["%count%" => twig_get_attribute($this->env, $this->source, ($context["pagination"] ?? null), "totalItemCount", [], "any", false, false, true, 197)]);
echo "
";
} else {
// line 199
echo " <span>";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お探しの商品は見つかりませんでした"), "html", null, true);
echo "</span>
";
}
// line 201
echo " </div>
";
// line 202
if ((twig_get_attribute($this->env, $this->source, ($context["pagination"] ?? null), "totalItemCount", [], "any", false, false, true, 202) > 0)) {
// line 203
echo " <div class=\"ec-searchnavRole__actions\">
<div class=\"ec-select\">
\t<span class=\"square active\"><i class=\"fas fa-th\"></i></span><!-- ★初期値「縦一列(1カラム)」①/③ span classから「active」を削除 -->
<span class=\"list\"><i class=\"fas fa-list\"></i></span><!-- ★初期値「縦一列(1カラム)」②/③ span classに「active」を追加 -->
";
// line 207
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, ($context["search_form"] ?? null), "disp_number", [], "any", false, false, true, 207), 207, $this->source), 'widget', ["id" => "", "attr" => ["class" => "disp-number"]]);
echo "
";
// line 208
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, ($context["search_form"] ?? null), "orderby", [], "any", false, false, true, 208), 208, $this->source), 'widget', ["id" => "", "attr" => ["class" => "order-by"]]);
echo "
</div>
</div>
";
}
// line 212
echo " </div>
</div>
";
// line 215
if ((twig_get_attribute($this->env, $this->source, ($context["pagination"] ?? null), "totalItemCount", [], "any", false, false, true, 215) > 0)) {
// line 216
echo " <div class=\"ec-shelfRole\">
<ul class=\"ec-shelfGrid\"><!-- ★初期値「縦一列(1カラム)」②/③ classに「column1」を追加 -->
";
// line 218
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(($context["pagination"] ?? null));
$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["Product"]) {
// line 219
echo " <li class=\"ec-shelfGrid__item";
if ((twig_get_attribute($this->env, $this->source, ($context["Layout"] ?? null), "SideLeft", [], "any", false, false, true, 219) || twig_get_attribute($this->env, $this->source, ($context["Layout"] ?? null), "SideRight", [], "any", false, false, true, 219))) {
echo " column4";
} else {
echo " column5";
}
echo "\">
\t\t\t\t\t\t\t<div class=\"ec-shelfGrid__item-image\">
\t\t\t\t\t\t\t\t<a href=\"";
// line 222
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\IgnoreRoutingNotFoundExtension']->getUrl("product_detail", ["id" => twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, true, 222)]), "html", null, true);
echo "\"><img src=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->extensions['Eccube\Twig\Extension\EccubeExtension']->getNoImageProduct($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "main_list_image", [], "any", false, false, true, 222), 222, $this->source)), "save_image"), "html", null, true);
echo "\"></a>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t<div class=\"name_price_area\">
<a href=\"";
// line 226
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\IgnoreRoutingNotFoundExtension']->getUrl("product_detail", ["id" => twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, true, 226)]), "html", null, true);
echo "\">
<p class=\"product_name\">";
// line 227
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "name", [], "any", false, false, true, 227), 227, $this->source), "html", null, true);
echo "</p>
<p class=\"price02-default\">
";
// line 229
if (twig_get_attribute($this->env, $this->source, $context["Product"], "hasProductClass", [], "any", false, false, true, 229)) {
// line 230
echo " ";
if ((twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02Min", [], "any", false, false, true, 230) == twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02Max", [], "any", false, false, true, 230))) {
// line 231
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMin", [], "any", false, false, true, 231), 231, $this->source)), "html", null, true);
echo "
";
} else {
// line 233
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMin", [], "any", false, false, true, 233), 233, $this->source)), "html", null, true);
echo " ~ ";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMax", [], "any", false, false, true, 233), 233, $this->source)), "html", null, true);
echo "
";
}
// line 235
echo " ";
} else {
// line 236
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMin", [], "any", false, false, true, 236), 236, $this->source)), "html", null, true);
echo "
";
}
// line 238
echo " </p>
<p class=\"description_list\">";
// line 239
echo twig_nl2br($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "description_list", [], "any", false, false, true, 239), 239, $this->source));
echo "</p>
</a>
";
// line 242
if (twig_get_attribute($this->env, $this->source, $context["Product"], "stock_find", [], "any", false, false, true, 242)) {
// line 243
echo " ";
$context["form"] = (($__internal_compile_0 = ($context["forms"] ?? null)) && is_array($__internal_compile_0) || $__internal_compile_0 instanceof ArrayAccess ? ($__internal_compile_0[twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, true, 243)] ?? null) : null);
// line 244
echo " <form name=\"form";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, true, 244), 244, $this->source), "html", null, true);
echo "\" id=\"productForm";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, true, 244), 244, $this->source), "html", null, true);
echo "\" action=\"";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\IgnoreRoutingNotFoundExtension']->getUrl("product_add_cart", ["id" => twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, true, 244)]), "html", null, true);
echo "\" method=\"post\">
<div class=\"ec-productRole__actions\">
";
// line 246
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id1", [], "any", true, true, true, 246)) {
// line 247
echo " <div class=\"ec-select\">
";
// line 248
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id1", [], "any", false, false, true, 248), 248, $this->source), 'widget');
echo "
";
// line 249
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id1", [], "any", false, false, true, 249), 249, $this->source), 'errors');
echo "
</div>
";
// line 251
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id2", [], "any", true, true, true, 251)) {
// line 252
echo " <div class=\"ec-select\">
";
// line 253
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id2", [], "any", false, false, true, 253), 253, $this->source), 'widget');
echo "
";
// line 254
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id2", [], "any", false, false, true, 254), 254, $this->source), 'errors');
echo "
</div>
";
}
// line 257
echo " ";
}
// line 258
echo " ";
echo $this->extensions['Eccube\Twig\Extension\IgnoreTwigSandboxErrorExtension']->twig_include($this->env, $context, "Product/option.twig");
echo "<div class=\"ec-numberInput\">
";
// line 259
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "quantity", [], "any", false, false, true, 259), 259, $this->source), 'widget', ["attr" => ["class" => "quantity"]]);
echo "
";
// line 260
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "quantity", [], "any", false, false, true, 260), 260, $this->source), 'errors');
echo "
</div>
</div>
";
// line 263
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(($context["form"] ?? null), 263, $this->source), 'rest');
echo "
</form>
<div class=\"ec-productRole__btn\">
<button type=\"submit\" class=\"ec-blockBtn--action add-cart\" data-cartid=\"";
// line 266
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, true, 266), 266, $this->source), "html", null, true);
echo "\" form=\"productForm";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, true, 266), 266, $this->source), "html", null, true);
echo "\">
<i class=\"fas fa-shopping-cart\"></i> ";
// line 267
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに入れる"), "html", null, true);
echo "
</button>
</div>
";
} else {
// line 271
echo " <div class=\"ec-productRole__btn\">
<button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
";
// line 273
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ただいま品切れ中です。"), "html", null, true);
echo "
</button>
</div>
";
}
// line 277
echo " </div>
</li>
";
++$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['Product'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 280
echo " </ul>
</div>
";
// line 282
echo $this->extensions['Eccube\Twig\Extension\IgnoreTwigSandboxErrorExtension']->twig_include($this->env, $context, "Product/option_description.twig");
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 285
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 286
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに追加しました。"), "html", null, true);
echo "</div>
<div class=\"ec-modal-box\">
<div class=\"ec-role\">
<span class=\"ec-inlineBtn--cancel\">";
// line 289
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お買い物を続ける"), "html", null, true);
echo "</span>
<a href=\"";
// line 290
echo $this->extensions['Eccube\Twig\Extension\IgnoreRoutingNotFoundExtension']->getUrl("cart");
echo "\" class=\"ec-inlineBtn--action\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへ進む"), "html", null, true);
echo "</a>
</div>
</div>
</div>
</div>
</div>
<div class=\"ec-pagerRole\">
";
// line 297
$this->loadTemplate("pager.twig", "__string_template__103145ddcd52d5080a3ad68db6c27693", 297)->display(twig_array_merge($context, ["pages" => twig_get_attribute($this->env, $this->source, ($context["pagination"] ?? null), "paginationData", [], "any", false, false, true, 297)]));
// line 298
echo " </div>
";
}
// line 300
echo " ";
}
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "__string_template__103145ddcd52d5080a3ad68db6c27693";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 745 => 300, 741 => 298, 739 => 297, 727 => 290, 723 => 289, 717 => 286, 713 => 285, 707 => 282, 703 => 280, 687 => 277, 680 => 273, 676 => 271, 669 => 267, 663 => 266, 657 => 263, 651 => 260, 647 => 259, 642 => 258, 639 => 257, 633 => 254, 629 => 253, 626 => 252, 624 => 251, 619 => 249, 615 => 248, 612 => 247, 610 => 246, 600 => 244, 597 => 243, 595 => 242, 589 => 239, 586 => 238, 580 => 236, 577 => 235, 569 => 233, 563 => 231, 560 => 230, 558 => 229, 553 => 227, 549 => 226, 540 => 222, 529 => 219, 512 => 218, 508 => 216, 506 => 215, 501 => 212, 494 => 208, 490 => 207, 484 => 203, 482 => 202, 479 => 201, 473 => 199, 467 => 197, 465 => 196, 458 => 191, 452 => 189, 449 => 188, 446 => 187, 425 => 184, 419 => 183, 416 => 182, 398 => 181, 396 => 180, 389 => 178, 382 => 173, 376 => 172, 373 => 171, 363 => 167, 325 => 166, 322 => 165, 318 => 164, 310 => 158, 298 => 156, 294 => 155, 289 => 154, 285 => 153, 281 => 151, 275 => 148, 272 => 147, 269 => 146, 262 => 145, 252 => 140, 248 => 138, 244 => 136, 242 => 135, 233 => 128, 229 => 126, 225 => 124, 223 => 123, 181 => 84, 171 => 77, 140 => 49, 112 => 23, 98 => 22, 90 => 21, 73 => 20, 69 => 18, 62 => 17, 54 => 11, 52 => 15, 50 => 14, 48 => 13, 38 => 11,);
}
public function getSourceContext()
{
return new Source("", "__string_template__103145ddcd52d5080a3ad68db6c27693", "");
}
public function checkSecurity()
{
static $tags = array("set" => 13, "for" => 20, "if" => 21, "include" => 297);
static $filters = array("escape" => 21, "raw" => 21, "trans" => 49, "length" => 146, "no_image_product" => 222, "price" => 231, "nl2br" => 239);
static $functions = array("repository" => 14, "class_categories_as_json" => 21, "url" => 77, "form_widget" => 207, "asset" => 222, "form_errors" => 249, "include" => 258, "form_rest" => 263);
try {
$this->sandbox->checkSecurity(
['set', 'for', 'if', 'include'],
['escape', 'raw', 'trans', 'length', 'no_image_product', 'price', 'nl2br'],
['repository', 'class_categories_as_json', 'url', 'form_widget', 'asset', 'form_errors', 'include', 'form_rest']
);
} catch (SecurityError $e) {
$e->setSourceContext($this->source);
if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
$e->setTemplateLine($tags[$e->getTagName()]);
} elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
$e->setTemplateLine($filters[$e->getFilterName()]);
} elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
$e->setTemplateLine($functions[$e->getFunctionName()]);
}
throw $e;
}
}
}