<?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/list.twig */
class __TwigTemplate_7720358583a040f82df7b87026608a884caa958bf558c648b7b738cecd123884 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 40
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/list.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Product/list.twig"));
// line 12
$context["sidbar_out"] = false;
// line 13
$context["sidebar_type"] = 0;
// line 16
if (array_key_exists("Category", $context)) {
// line 17
if ( !(null === (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 17, $this->source); })()))) {
// line 18
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 18, $this->source); })()), "path", [], "any", false, false, false, 18));
foreach ($context['_seq'] as $context["_key"] => $context["Path"]) {
// line 19
if ((twig_get_attribute($this->env, $this->source, $context["Path"], "hierarchy", [], "any", false, false, false, 19) == 1)) {
// line 20
if ((twig_get_attribute($this->env, $this->source, $context["Path"], "name", [], "any", false, false, false, 20) == "部品")) {
// line 21
$context["sidebar_type"] = 1;
// line 22
$context["sidbar_out"] = true;
}
// line 24
if ((twig_get_attribute($this->env, $this->source, $context["Path"], "name", [], "any", false, false, false, 24) == "カートリッジ")) {
// line 25
$context["sidebar_type"] = 2;
// line 26
$context["sidbar_out"] = true;
}
// line 28
if ((twig_get_attribute($this->env, $this->source, $context["Path"], "name", [], "any", false, false, false, 28) == "取付工事")) {
// line 29
$context["sidebar_type"] = 3;
// line 30
$context["sidbar_out"] = true;
}
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Path'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
} else {
// line 35
$context["sidebar_type"] = 999;
}
}
// line 42
$context["body_class"] = "product_page";
// line 40
$this->parent = $this->loadTemplate("default_frame.twig", "Product/list.twig", 40);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 44
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 45
echo " <script>
eccube.productsClassCategories = {
";
// line 47
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["pagination"]) || array_key_exists("pagination", $context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.', 47, $this->source); })()));
$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 48
echo " \"";
echo twig_escape_filter($this->env, twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, false, 48), "js"), "html", null, true);
echo "\": ";
echo $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getClassCategoriesAsJson($context["Product"]);
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, false, 48) == false)) {
echo ", ";
}
// line 49
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 50
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 76
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 104
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("block_cart");
echo "',
type: 'GET',
dataType: 'html'
}).done(function(html) {
\$('.ec-headerRole__cart').html(html);
});
}).fail(function(data) {
alert('";
// line 111
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);
});
});
\$('input.quantity').hide();
\$('input.quantity').prev().hide();
\$('select[name=\"classcategory_id1\"]').hide();
\$('select[name=\"classcategory_id2\"]').hide();
\$('select[name=\"classcategory_id3\"]').hide();
\$('select[name=\"classcategory_id4\"]').hide();
\$('select[name=\"classcategory_id5\"]').hide();
\$('#classcategory_id2').hide();
\$('#classcategory_id3').hide();
\$('#classcategory_id4').hide();
\$('#classcategory_id5').hide();
\$('.ec-modal-wrap').on('click', function(e) {
// モーダル内の処理は外側にバブリングさせない
e.stopPropagation();
});
\$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
\$('.ec-modal').hide()
});
});
</script>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 142
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 143
echo "<style>
.ec-shelfGrid .ec-shelfGrid__item-image{
height: auto;
}
.ec-productRole__tag{
text-align: justify;
display: inline-block;
background-color: #ebf0f0;
padding: 1px 1px !important;
font-size: 90%;
margin-right: 5px;
}
.ec-shelfGrid .ec-shelfGrid__item {
margin-bottom: 36px;
width: 100%;
display: -ms-flexbox;
display: flex;
-ms-flex-direction: column;
flex-direction: column;
}
@media only screen and (min-width: 768px){
.ec-shelfGrid .ec-shelfGrid__item{
padding: 0 16px;
";
// line 169
if ((((((isset($context["sidebar_type"]) || array_key_exists("sidebar_type", $context) ? $context["sidebar_type"] : (function () { throw new RuntimeError('Variable "sidebar_type" does not exist.', 169, $this->source); })()) == 1) || ((isset($context["sidebar_type"]) || array_key_exists("sidebar_type", $context) ? $context["sidebar_type"] : (function () { throw new RuntimeError('Variable "sidebar_type" does not exist.', 169, $this->source); })()) == 2)) || ((isset($context["sidebar_type"]) || array_key_exists("sidebar_type", $context) ? $context["sidebar_type"] : (function () { throw new RuntimeError('Variable "sidebar_type" does not exist.', 169, $this->source); })()) == 3)) || ((isset($context["sidebar_type"]) || array_key_exists("sidebar_type", $context) ? $context["sidebar_type"] : (function () { throw new RuntimeError('Variable "sidebar_type" does not exist.', 169, $this->source); })()) == 999))) {
// line 170
echo " width: 25%;
";
} else {
// line 172
echo " width: 33%;
";
}
// line 174
echo " }
}
</style>
";
// line 178
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, (isset($context["search_form"]) || array_key_exists("search_form", $context) ? $context["search_form"] : (function () { throw new RuntimeError('Variable "search_form" does not exist.', 178, $this->source); })()), "category_id", [], "any", false, false, false, 178), "vars", [], "any", false, false, false, 178), "errors", [], "any", false, false, false, 178)) > 0)) {
// line 179
echo " <div class=\"ec-searchnavRole\">
<p class=\"errormsg text-danger\">";
// line 180
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ご指定のカテゴリは存在しません"), "html", null, true);
echo "</p>
</div>
";
} else {
// line 183
echo " <div class=\"ec-searchnavRole\">
<form name=\"form1\" id=\"form1\" method=\"get\" action=\"?\">
";
// line 185
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["search_form"]) || array_key_exists("search_form", $context) ? $context["search_form"] : (function () { throw new RuntimeError('Variable "search_form" does not exist.', 185, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
// line 186
echo " <input type=\"hidden\" id=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "vars", [], "any", false, false, false, 186), "id", [], "any", false, false, false, 186), "html", null, true);
echo "\"
name=\"";
// line 187
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "vars", [], "any", false, false, false, 187), "full_name", [], "any", false, false, false, 187), "html", null, true);
echo "\"
";
// line 188
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "vars", [], "any", false, false, false, 188), "value", [], "any", false, false, false, 188))) {
echo "value=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "vars", [], "any", false, false, false, 188), "value", [], "any", false, false, false, 188), "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 190
echo " </form>
<div class=\"ec-searchnavRole__topicpath\">
<ol class=\"ec-topicpath\">
";
// line 194
echo " ";
// line 195
echo " ";
if ( !(null === (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 195, $this->source); })()))) {
// line 196
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 196, $this->source); })()), "path", [], "any", false, false, false, 196));
$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 197
echo " ";
// line 198
echo " <li class=\"ec-topicpath__item";
if (twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, false, 198)) {
echo "--active";
}
echo "\"><a
href=\"";
// line 199
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["Path"], "id", [], "any", false, false, false, 199), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Path"], "name", [], "any", false, false, false, 199), "html", null, true);
echo "</a>
</li>
<li class=\"ec-topicpath__divider\">|</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 203
echo " ";
}
// line 204
echo " ";
// line 205
echo " ";
// line 206
echo " ";
// line 207
echo " ";
// line 208
echo " </ol>
</div>
<div class=\"ec-searchnavRole__infos\">
";
// line 212
echo " ";
// line 213
echo " ";
// line 214
echo " ";
// line 215
echo " ";
// line 216
echo " ";
// line 217
echo " ";
// line 218
echo " ";
// line 219
echo " ";
// line 220
echo " ";
// line 221
echo " ";
// line 222
echo " ";
// line 223
echo " ";
// line 224
echo " ";
// line 225
echo " ";
// line 226
echo " </div>
</div>
";
// line 228
if ((twig_get_attribute($this->env, $this->source, (isset($context["pagination"]) || array_key_exists("pagination", $context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.', 228, $this->source); })()), "totalItemCount", [], "any", false, false, false, 228) > 0)) {
// line 229
echo " <div class=\"ec-shelfRole\">
<ul class=\"ec-shelfGrid\">
";
// line 231
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["pagination"]) || array_key_exists("pagination", $context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.', 231, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["Product"]) {
// line 232
echo " <li class=\"ec-shelfGrid__item\">
<p class=\"ec-shelfGrid__item-image\">
<a href=\"";
// line 234
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_detail", ["id" => twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, false, 234)]), "html", null, true);
echo "\">
<p class=\"ec-shelfGrid__item-image\">
<img src=\"";
// line 236
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->extensions['Eccube\Twig\Extension\EccubeExtension']->getNoImageProduct(twig_get_attribute($this->env, $this->source, $context["Product"], "main_list_image", [], "any", false, false, false, 236)), "save_image"), "html", null, true);
echo "\" alt=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Product"], "name", [], "any", false, false, false, 236), "html", null, true);
echo "\" loading=\"lazy\">
</p>
";
// line 239
if (((isset($context["sidebar_type"]) || array_key_exists("sidebar_type", $context) ? $context["sidebar_type"] : (function () { throw new RuntimeError('Variable "sidebar_type" does not exist.', 239, $this->source); })()) == 1)) {
// line 240
echo " ";
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, $context["Product"], "code_min", [], "any", false, false, false, 240))) {
// line 241
echo " ";
// line 242
echo " <span class=\"product-code-default\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Product"], "code_min", [], "any", false, false, false, 242), "html", null, true);
if ((twig_get_attribute($this->env, $this->source, $context["Product"], "code_min", [], "any", false, false, false, 242) != twig_get_attribute($this->env, $this->source, $context["Product"], "code_max", [], "any", false, false, false, 242))) {
echo " ~ ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Product"], "code_max", [], "any", false, false, false, 242), "html", null, true);
}
echo "</span>
";
}
}
// line 244
echo "\t
<p>";
// line 245
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Product"], "name", [], "any", false, false, false, 245), "html", null, true);
echo "</p>
";
// line 246
if (twig_get_attribute($this->env, $this->source, $context["Product"], "description_list", [], "any", false, false, false, 246)) {
// line 247
echo " <p>";
echo twig_nl2br(twig_get_attribute($this->env, $this->source, $context["Product"], "description_list", [], "any", false, false, false, 247));
echo "</p>
";
}
// line 249
echo " <p>
";
// line 250
$context["flgRental"] = false;
// line 251
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["Product"], "ProductClasses", [], "any", false, false, false, 251));
foreach ($context['_seq'] as $context["_key"] => $context["class"]) {
// line 252
echo " ";
if (twig_get_attribute($this->env, $this->source, ($context["CustomSaleType"] ?? null), twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["class"], "SaleType", [], "any", false, false, false, 252), "Id", [], "any", false, false, false, 252), [], "array", true, true, false, 252)) {
// line 253
echo " ";
if (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["CustomSaleType"]) || array_key_exists("CustomSaleType", $context) ? $context["CustomSaleType"] : (function () { throw new RuntimeError('Variable "CustomSaleType" does not exist.', 253, $this->source); })()), twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["class"], "SaleType", [], "any", false, false, false, 253), "Id", [], "any", false, false, false, 253), [], "array", false, false, false, 253), "Rental", [], "any", false, false, false, 253)) {
// line 254
echo "
";
// line 255
$context["flgRental"] = true;
// line 256
echo " ";
}
// line 257
echo " ";
}
// line 258
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['class'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 259
echo " ";
if ((isset($context["flgRental"]) || array_key_exists("flgRental", $context) ? $context["flgRental"] : (function () { throw new RuntimeError('Variable "flgRental" does not exist.', 259, $this->source); })())) {
// line 260
echo " レンタル月額
";
}
// line 262
echo " </p>
<p class=\"xxxx\">
";
// line 264
echo twig_escape_filter($this->env, twig_number_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMax", [], "any", false, false, false, 264)), "html", null, true);
echo "円税込
</p>
<p class=\"xxxx\">
";
// line 267
if (twig_get_attribute($this->env, $this->source, $context["Product"], "hasProductClass", [], "any", false, false, false, 267)) {
// line 268
echo " ";
if ((twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02Min", [], "any", false, false, false, 268) == twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02Max", [], "any", false, false, false, 268))) {
// line 269
echo " ";
} else {
// line 270
echo " <span class=\"txt\" style=\"font-size: 10px;\">(オートシップメント契約価格";
echo twig_escape_filter($this->env, twig_number_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMin", [], "any", false, false, false, 270)), "html", null, true);
echo "円税込)</span>
";
}
// line 272
echo " ";
} else {
// line 273
echo " ";
}
// line 274
echo " </p>
";
// line 277
echo " <ul class=\"ec-productRole__tags\">
";
// line 278
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["Product"], "Tags", [], "any", false, false, false, 278));
$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["Tag"]) {
// line 279
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, 279), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $context["Tag"], "html", null, true);
echo "</li>
";
// line 280
if (twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, false, 280)) {
// line 281
echo " ";
} else {
// line 282
echo " /
";
}
// line 284
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['Tag'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 285
echo " </ul>
";
// line 287
echo " ";
if (twig_get_attribute($this->env, $this->source, $context["Product"], "stock_find", [], "any", false, false, false, 287)) {
// line 288
echo " ";
// line 289
echo " ";
// line 290
echo " ";
// line 291
echo " ";
// line 292
echo " ";
// line 293
echo " ";
// line 294
echo " ";
// line 295
echo " ";
// line 296
echo " ";
// line 297
echo " ";
// line 298
echo " ";
// line 299
echo " ";
// line 300
echo " ";
// line 301
echo " ";
// line 302
echo " ";
// line 303
echo " ";
// line 304
echo " ";
// line 305
echo " ";
// line 306
echo " ";
// line 307
echo " ";
// line 308
echo " ";
// line 309
echo " ";
// line 310
echo " <div class=\"ec-productRole__btn\">
";
// line 312
echo " ";
// line 313
echo " ";
// line 314
echo " ";
// line 315
echo " ";
// line 316
echo " ";
// line 317
echo " ";
// line 318
echo " ";
// line 319
echo "
";
// line 321
echo " ";
// line 322
echo " ";
// line 323
echo " ";
// line 324
echo " ";
// line 325
echo " ";
// line 326
echo " ";
// line 327
echo " ";
// line 328
echo " ";
// line 329
echo " ";
// line 330
echo " ";
// line 331
echo " </div>
";
} else {
// line 333
echo " ";
// line 334
echo " ";
// line 335
echo " ";
// line 336
echo " ";
// line 337
echo " ";
// line 338
echo " ";
}
// line 339
echo " </li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Product'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 341
echo " </ul>
</div>
<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 346
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 347
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 350
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お買い物を続ける"), "html", null, true);
echo "</span>
<a href=\"";
// line 351
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("cart");
echo "\" class=\"ec-inlineBtn--action\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへ進む"), "html", null, true);
echo "</a>
</div>
</div>
</div>
</div>
</div>
<div class=\"ec-pagerRole\">
";
// line 358
$this->loadTemplate("pager.twig", "Product/list.twig", 358)->display(twig_array_merge($context, ["pages" => twig_get_attribute($this->env, $this->source, (isset($context["pagination"]) || array_key_exists("pagination", $context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.', 358, $this->source); })()), "paginationData", [], "any", false, false, false, 358)]));
// line 359
echo " </div>
";
}
// line 361
echo " ";
}
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "Product/list.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 806 => 361, 802 => 359, 800 => 358, 788 => 351, 784 => 350, 778 => 347, 774 => 346, 767 => 341, 760 => 339, 757 => 338, 755 => 337, 753 => 336, 751 => 335, 749 => 334, 747 => 333, 743 => 331, 741 => 330, 739 => 329, 737 => 328, 735 => 327, 733 => 326, 731 => 325, 729 => 324, 727 => 323, 725 => 322, 723 => 321, 720 => 319, 718 => 318, 716 => 317, 714 => 316, 712 => 315, 710 => 314, 708 => 313, 706 => 312, 703 => 310, 701 => 309, 699 => 308, 697 => 307, 695 => 306, 693 => 305, 691 => 304, 689 => 303, 687 => 302, 685 => 301, 683 => 300, 681 => 299, 679 => 298, 677 => 297, 675 => 296, 673 => 295, 671 => 294, 669 => 293, 667 => 292, 665 => 291, 663 => 290, 661 => 289, 659 => 288, 656 => 287, 653 => 285, 639 => 284, 635 => 282, 632 => 281, 630 => 280, 623 => 279, 606 => 278, 603 => 277, 599 => 274, 596 => 273, 593 => 272, 587 => 270, 584 => 269, 581 => 268, 579 => 267, 573 => 264, 569 => 262, 565 => 260, 562 => 259, 556 => 258, 553 => 257, 550 => 256, 548 => 255, 545 => 254, 542 => 253, 539 => 252, 534 => 251, 532 => 250, 529 => 249, 523 => 247, 521 => 246, 517 => 245, 514 => 244, 503 => 242, 501 => 241, 498 => 240, 496 => 239, 489 => 236, 484 => 234, 480 => 232, 476 => 231, 472 => 229, 470 => 228, 466 => 226, 464 => 225, 462 => 224, 460 => 223, 458 => 222, 456 => 221, 454 => 220, 452 => 219, 450 => 218, 448 => 217, 446 => 216, 444 => 215, 442 => 214, 440 => 213, 438 => 212, 433 => 208, 431 => 207, 429 => 206, 427 => 205, 425 => 204, 422 => 203, 400 => 199, 393 => 198, 391 => 197, 373 => 196, 370 => 195, 368 => 194, 363 => 190, 351 => 188, 347 => 187, 342 => 186, 338 => 185, 334 => 183, 328 => 180, 325 => 179, 323 => 178, 317 => 174, 313 => 172, 309 => 170, 307 => 169, 279 => 143, 269 => 142, 229 => 111, 219 => 104, 188 => 76, 160 => 50, 146 => 49, 138 => 48, 121 => 47, 117 => 45, 107 => 44, 96 => 40, 94 => 42, 90 => 35, 81 => 30, 79 => 29, 77 => 28, 74 => 26, 72 => 25, 70 => 24, 67 => 22, 65 => 21, 63 => 20, 61 => 19, 57 => 18, 55 => 17, 53 => 16, 51 => 13, 49 => 12, 36 => 40,);
}
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.
#}
{% set sidbar_out = false %}
{% set sidebar_type = 0 %}
{# 商品一覧からの場合 #}
{% if Category is defined %}
{% if Category is not null %}
{% for Path in Category.path %}
{% if Path.hierarchy == 1 %}
{% if Path.name == '部品' %}
{% set sidebar_type = 1 %}
{% set sidbar_out = true %}
{% endif %}
{% if Path.name == 'カートリッジ' %}
{% set sidebar_type = 2 %}
{% set sidbar_out = true %}
{% endif %}
{% if Path.name == '取付工事' %}
{% set sidebar_type = 3 %}
{% set sidbar_out = true %}
{% endif %}
{% endif %}
{% endfor %}
{% else %}
{% set sidebar_type = 999 %}
{% endif %}
{% endif %}
{% extends 'default_frame.twig' %}
{% set body_class = 'product_page' %}
{% block javascript %}
<script>
eccube.productsClassCategories = {
{% for Product in pagination %}
\"{{ Product.id|escape('js') }}\": {{ class_categories_as_json(Product)|raw }}{% if loop.last == false %}, {% endif %}
{% endfor %}
};
\$(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('{{ '1以上で入力してください。'|trans }}');
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: '{{ url('block_cart') }}',
type: 'GET',
dataType: 'html'
}).done(function(html) {
\$('.ec-headerRole__cart').html(html);
});
}).fail(function(data) {
alert('{{ 'カートへの追加に失敗しました。'|trans }}');
}).always(function(data) {
// Buttonを有効にする
\$('.add-cart').prop('disabled', false);
});
});
\$('input.quantity').hide();
\$('input.quantity').prev().hide();
\$('select[name=\"classcategory_id1\"]').hide();
\$('select[name=\"classcategory_id2\"]').hide();
\$('select[name=\"classcategory_id3\"]').hide();
\$('select[name=\"classcategory_id4\"]').hide();
\$('select[name=\"classcategory_id5\"]').hide();
\$('#classcategory_id2').hide();
\$('#classcategory_id3').hide();
\$('#classcategory_id4').hide();
\$('#classcategory_id5').hide();
\$('.ec-modal-wrap').on('click', function(e) {
// モーダル内の処理は外側にバブリングさせない
e.stopPropagation();
});
\$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
\$('.ec-modal').hide()
});
});
</script>
{% endblock %}
{% block main %}
<style>
.ec-shelfGrid .ec-shelfGrid__item-image{
height: auto;
}
.ec-productRole__tag{
text-align: justify;
display: inline-block;
background-color: #ebf0f0;
padding: 1px 1px !important;
font-size: 90%;
margin-right: 5px;
}
.ec-shelfGrid .ec-shelfGrid__item {
margin-bottom: 36px;
width: 100%;
display: -ms-flexbox;
display: flex;
-ms-flex-direction: column;
flex-direction: column;
}
@media only screen and (min-width: 768px){
.ec-shelfGrid .ec-shelfGrid__item{
padding: 0 16px;
{% if sidebar_type == 1 or sidebar_type == 2 or sidebar_type == 3 or sidebar_type == 999 %}
width: 25%;
{% else %}
width: 33%;
{% endif %}
}
}
</style>
{% if search_form.category_id.vars.errors|length > 0 %}
<div class=\"ec-searchnavRole\">
<p class=\"errormsg text-danger\">{{ 'ご指定のカテゴリは存在しません'|trans }}</p>
</div>
{% else %}
<div class=\"ec-searchnavRole\">
<form name=\"form1\" id=\"form1\" method=\"get\" action=\"?\">
{% for item in search_form %}
<input type=\"hidden\" id=\"{{ item.vars.id }}\"
name=\"{{ item.vars.full_name }}\"
{% if item.vars.value is not empty %}value=\"{{ item.vars.value }}\" {% endif %}/>
{% endfor %}
</form>
<div class=\"ec-searchnavRole__topicpath\">
<ol class=\"ec-topicpath\">
{# <li class=\"ec-topicpath__item\"><a href=\"{{ url('product_list') }}\">{{ '全て'|trans }}</a> #}
{# </li> #}
{% if Category is not null %}
{% for Path in Category.path %}
{# <li class=\"ec-topicpath__divider\">|</li> #}
<li class=\"ec-topicpath__item{% if loop.last %}--active{% endif %}\"><a
href=\"{{ url('product_list') }}?category_id={{ Path.id }}\">{{ Path.name }}</a>
</li>
<li class=\"ec-topicpath__divider\">|</li>
{% endfor %}
{% endif %}
{#{% if search_form.vars.value and search_form.vars.value.name %}#}
{# <li class=\"ec-topicpath__divider\">|</li>#}
{# <li class=\"ec-topicpath__item\">{{ '「%name%」の検索結果'|trans({ '%name%': search_form.vars.value.name }) }}</li>#}
{#{% endif %}#}
</ol>
</div>
<div class=\"ec-searchnavRole__infos\">
{#<div class=\"ec-searchnavRole__counter\">#}
{# {% if pagination.totalItemCount > 0 %}#}
{# {{ '<span class=\"ec-font-bold\">%count%件</span><span>の商品が見つかりました</span>'|trans({ '%count%': pagination.totalItemCount })|raw }}#}
{# {% else %}#}
{# <span>{{ 'お探しの商品は見つかりませんでした'|trans }}</span>#}
{# {% endif %}#}
{#</div>#}
{#{% if pagination.totalItemCount > 0 %}#}
{# <div class=\"ec-searchnavRole__actions\">#}
{# <div class=\"ec-select\">#}
{# {{ form_widget(disp_number_form, {'id': '', 'attr': {'class': 'disp-number'}}) }}#}
{# {{ form_widget(order_by_form, {'id': '', 'attr': {'class': 'order-by'}}) }}#}
{# </div>#}
{# </div>#}
{#{% endif %}#}
</div>
</div>
{% if pagination.totalItemCount > 0 %}
<div class=\"ec-shelfRole\">
<ul class=\"ec-shelfGrid\">
{% for Product in pagination %}
<li class=\"ec-shelfGrid__item\">
<p class=\"ec-shelfGrid__item-image\">
<a href=\"{{ url('product_detail', {'id': Product.id}) }}\">
<p class=\"ec-shelfGrid__item-image\">
<img src=\"{{ asset(Product.main_list_image|no_image_product, 'save_image') }}\" alt=\"{{ Product.name }}\" loading=\"lazy\">
</p>
{# 部品の場合 #}
{% if sidebar_type == 1 %}
{% if Product.code_min is not empty %}
{#<p style=\"font-size: 12px;\">型番<br /></p>#}
<span class=\"product-code-default\">{{ Product.code_min }}{% if Product.code_min != Product.code_max %} ~ {{ Product.code_max }}{% endif %}</span>
{% endif %}
{% endif %}\t
<p>{{ Product.name }}</p>
{% if Product.description_list %}
<p>{{ Product.description_list|raw|nl2br }}</p>
{% endif %}
<p>
{% set flgRental = false %}
{% for class in Product.ProductClasses %}
{% if CustomSaleType[class.SaleType.Id] is defined %}
{% if CustomSaleType[class.SaleType.Id].Rental %}
{% set flgRental = true %}
{% endif %}
{% endif %}
{% endfor %}
{% if flgRental %}
レンタル月額
{% endif %}
</p>
<p class=\"xxxx\">
{{ Product.getPrice02IncTaxMax|number_format }}円税込
</p>
<p class=\"xxxx\">
{% if Product.hasProductClass %}
{% if Product.getPrice02Min == Product.getPrice02Max %}
{% else %}
<span class=\"txt\" style=\"font-size: 10px;\">(オートシップメント契約価格{{ Product.getPrice02IncTaxMin|number_format }}円税込)</span>
{% endif %}
{% else %}
{% endif %}
</p>
{# タグ #}
<ul class=\"ec-productRole__tags\">
{% for Tag in Product.Tags %}
<li class=\"ec-productRole__tag tag_{{ Tag.id }}\">{{ Tag }}</li>
{% if loop.last %}
{% else %}
/
{% endif %}
{% endfor %}
</ul>
{# タグ #}
{% if Product.stock_find %}
{#{% set form = forms[Product.id] %}#}
{#<form name=\"form{{ Product.id }}\" id=\"productForm{{ Product.id }}\" action=\"{{ url('product_add_cart', {id:Product.id}) }}\" method=\"post\">#}
{#<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, {'attr': {'class': 'quantity'}}) }}#}
{#{{ form_errors(form.quantity) }}#}
{#</div>#}
{#</div>#}
{#{{ form_rest(form) }}#}
{#</form>#}
<div class=\"ec-productRole__btn\">
{#{% set flgCartridge = false %}#}
{#{% for class in Product.ProductClasses %}#}
{# {% if CustomSaleType[class.SaleType.Id] is defined %}#}
{# {% if CustomSaleType[class.SaleType.Id].ExchageCartridge %}#}
{# {% set flgCartridge = true %}#}
{# {% endif %}#}
{# {% endif %}#}
{#{% endfor %}#}
{#{% if Product.IsChangeCartridge %}#}
{# {% if flgCartridge %}#}
{# <p style=\"color:red\">{{ 'customize.cartridge.replacement.supplement.message'|trans }}</p>#}
{# {% endif %}#}
{#{% endif %}#}
{#{% if Product.IsRental %}#}
{#{% else %}#}
{#<button type=\"submit\" class=\"ec-blockBtn--action add-cart\" data-cartid=\"{{ Product.id }}\" form=\"productForm{{ Product.id }}\">#}
{# {{ 'カートに入れる'|trans }}#}
{#</button>#}
{#{% endif %}#}
</div>
{% else %}
{#<div class=\"ec-productRole__btn\">#}
{# <button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">#}
{# {{ 'ただいま品切れ中です。'|trans }}#}
{# </button>#}
{#</div>#}
{% endif %}
</li>
{% endfor %}
</ul>
</div>
<div class=\"ec-modal\">
<div class=\"ec-modal-overlay\">
<div class=\"ec-modal-wrap\">
<span class=\"ec-modal-close\"><span class=\"ec-icon\"><img src=\"{{ asset('assets/icon/cross-dark.svg') }}\" alt=\"\"/></span></span>
<div id=\"ec-modal-header\" class=\"text-center\">{{ 'カートに追加しました。'|trans }}</div>
<div class=\"ec-modal-box\">
<div class=\"ec-role\">
<span class=\"ec-inlineBtn--cancel\">{{ 'お買い物を続ける'|trans }}</span>
<a href=\"{{ url('cart') }}\" class=\"ec-inlineBtn--action\">{{ 'カートへ進む'|trans }}</a>
</div>
</div>
</div>
</div>
</div>
<div class=\"ec-pagerRole\">
{% include \"pager.twig\" with {'pages': pagination.paginationData} %}
</div>
{% endif %}
{% endif %}
{% endblock %}
", "Product/list.twig", "/home/multipure03/multipure.co.jp/public_html/dev-shop.multipure.co.jp/app/template/default/Product/list.twig");
}
}