<?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/sale.twig */
class __TwigTemplate_4122afaef6841cb4cba56ecc94b102269ddead6b231d1613ba9a6a6ef451f5a2 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/sale.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Product/sale.twig"));
// line 13
$context["body_class"] = "product_page";
// line 11
$this->parent = $this->loadTemplate("default_frame.twig", "Product/sale.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.productsClassCategories = {
";
// line 18
$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.', 18, $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["PinpointProduct"]) {
// line 19
echo " ";
$context["Product"] = twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["PinpointProduct"], "ProductClass", [], "any", false, false, false, 19), "Product", [], "any", false, false, false, 19);
// line 20
echo " \"";
echo twig_escape_filter($this->env, 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.', 20, $this->source); })()), "id", [], "any", false, false, false, 20), "js"), "html", null, true);
echo "\": ";
echo $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getClassCategoriesAsJson((isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 20, $this->source); })()));
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, false, 20) == false)) {
echo ", ";
}
// line 21
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['PinpointProduct'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 22
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();
});
var modalTimer;
\$('.add-cart').on('click', function(e) {
var self = \$(this);
onAddCart(e, \$(this), 1, function() {
var \$form = self.parents('li');
\$form.find(\".ec-productRole__btn--only\").addClass(\"d-none\");
\$form.find(\".ec-productRole__btn--group\").removeClass(\"d-none\");
window.clearTimeout(modalTimer);
\$('.ec-modal').show()
modalTimer = window.setTimeout(function() {
\$('.ec-modal').hide();
}, 1500)
});
});
\$('.minus__btn').on('click', function(e) {
onAddCart(e, \$(this), -1);
})
\$('.plus__btn').on('click', function(e) {
onAddCart(e, \$(this));
})
function onAddCart(e, self, quantity = 1, callback) {
var \$form = \$(self).parents('li').find('form.productForm');
// 個数フォームのチェック
\$form.parent().find('.quantity').val(quantity);
e.preventDefault();
\$.ajax({
url: \$form.attr('action'),
type: \$form.attr('method'),
data: \$form.serialize(),
dataType: 'json',
beforeSend: function(xhr, settings) {
// Buttonを無効にする
\$(self).prop('disabled', true);
}
}).done(function(data) {
// レスポンス内のメッセージをalertで表示
\$.each(data.messages, function() {
\$('#ec-modal-header').text(this);
});
var \$quantityLabelEl = \$(self).parents('li').find('.quantity_label');
\$quantityLabelEl.text(\$quantityLabelEl.text() * 1 + quantity * 1);
if(callback) {
callback();
}
// カートブロックを更新する
\$.ajax({
url: '";
// line 93
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 100
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへの追加に失敗しました。"), "html", null, true);
echo "');
\$(self).prop('disabled', false);
}).always(function(data) {
var \$parent = \$(self).parents('li');
let stockVal = \$parent.find('.stock').val() * 1;
var \$quantityLabelEl = \$parent.find('.quantity_label');
var _quantity = \$quantityLabelEl.text() * 1;
if(_quantity == 0) {
// enable minus button
\$(self).prop('disabled', false);
\$parent.find(\".ec-productRole__btn--only\").removeClass(\"d-none\");
\$parent.find(\".ec-productRole__btn--group\").addClass(\"d-none\");
}
if(_quantity > 0 && _quantity < stockVal) {
// Buttonを有効にする
\$(self).prop('disabled', false);
\$parent.find('.plus__btn').prop('disabled', false);
}
});
}
});
\$('.ec-modal-wrap').on('click', function(e) {
// モーダル内の処理は外側にバブリングさせない
e.stopPropagation();
});
\$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
\$('.ec-modal').hide()
});
</script>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 135
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 136
echo " <ul class=\"breadcrumb w-p\">
<li class=\"breadcrumb__item\">
<a href=\"";
// line 138
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("homepage");
echo "\" class=\"breadcrumb__item__link\">
ホーム
</a>
</li>
<li class=\"breadcrumb__item\">
<p class=\"breadcrumb__item__arrow\">></p>
</li>
<li class=\"breadcrumb__item\">
<p class=\"breadcrumb__item__text\">セール商品一覧</p>
</li>
</ul>
<div class=\"ec-pageHeader contentHeader\">
<h1>";
// line 150
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("セール商品一覧"), "html", null, true);
echo "</h1>
</div>
";
// line 152
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.', 152, $this->source); })()), "category_id", [], "any", false, false, false, 152), "vars", [], "any", false, false, false, 152), "errors", [], "any", false, false, false, 152)) > 0)) {
// line 153
echo " <div class=\"ec-searchnavRole\">
<p class=\"errormsg text-danger\">";
// line 154
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ご指定のカテゴリは存在しません"), "html", null, true);
echo "</p>
</div>
";
} else {
// line 157
echo " <div class=\"ec-searchnavRole\">
<form name=\"form1\" id=\"form1\" method=\"get\" action=\"?\">
";
// line 159
$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.', 159, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
// line 160
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, 160), "id", [], "any", false, false, false, 160), "html", null, true);
echo "\"
name=\"";
// line 161
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, 161), "full_name", [], "any", false, false, false, 161), "html", null, true);
echo "\"
";
// line 162
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, 162), "value", [], "any", false, false, false, 162))) {
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, 162), "value", [], "any", false, false, false, 162), "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 164
echo " </form>
";
// line 183
echo " <div class=\"ec-searchnavRole__infos\">
<div class=\"ec-searchnavRole__counter\">
";
// line 185
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.', 185, $this->source); })()), "totalItemCount", [], "any", false, false, false, 185) > 0)) {
// line 186
echo " <p class=\"ec-searchnavRole__counter__title\">検索結果</p>
";
// line 187
echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("<p class=\"ec-searchnavRole__counter__number\">%count%件</p>", ["%count%" => 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.', 187, $this->source); })()), "totalItemCount", [], "any", false, false, false, 187)]);
echo "
";
} else {
// line 189
echo " <span class=\"\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お探しの商品は見つかりませんでした"), "html", null, true);
echo "</span>
";
}
// line 191
echo " </div>
";
// line 192
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.', 192, $this->source); })()), "totalItemCount", [], "any", false, false, false, 192) > 0)) {
// line 193
echo " <div class=\"ec-searchnavRole__actions\">
<div class=\"ec-select\">
";
// line 195
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(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.', 195, $this->source); })()), "disp_number", [], "any", false, false, false, 195), 'widget', ["id" => "", "attr" => ["class" => "disp-number"]]);
echo "
";
// line 196
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(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.', 196, $this->source); })()), "orderby", [], "any", false, false, false, 196), 'widget', ["id" => "", "attr" => ["class" => "order-by"]]);
echo "
</div>
</div>
";
}
// line 200
echo " </div>
</div>
<ul class=\"stockList\">
<li class=\"stockList__block\">
<p class=\"stockList__block__text\">在庫あり:</p>
<p class=\"stockList__block__mark\">◎</p>
</li>
<li class=\"stockList__block\">
<p class=\"stockList__block__text\">残りわずか:</p>
<p class=\"stockList__block__mark\">○</p>
</li>
<li class=\"stockList__block\">
<p class=\"stockList__block__text\">取り寄せ:</p>
<p class=\"stockList__block__mark\">■</p>
</li>
</ul>
";
// line 216
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.', 216, $this->source); })()), "totalItemCount", [], "any", false, false, false, 216) > 0)) {
// line 217
echo " <div class=\"ec-shelfRole\">
<ul class=\"ec-shelfGrid\">
";
// line 219
$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.', 219, $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["PinpointProduct"]) {
// line 220
echo " ";
$context["Product"] = twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["PinpointProduct"], "ProductClass", [], "any", false, false, false, 220), "Product", [], "any", false, false, false, 220);
// line 221
echo " <li class=\"ec-shelfGrid__item\">
<a href=\"";
// line 222
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_detail", ["id" => twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 222, $this->source); })()), "id", [], "any", false, false, false, 222)]), "html", null, true);
echo "\">
<div class=\"ec-shelfGrid__item-image\">
<img src=\"";
// line 224
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, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 224, $this->source); })()), "main_list_image", [], "any", false, false, false, 224)), "save_image"), "html", null, true);
echo "\" alt=\"";
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.', 224, $this->source); })()), "name", [], "any", false, false, false, 224), "html", null, true);
echo "\" ";
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 224) > 5)) {
echo " loading=\"lazy\"";
}
echo ">
";
// line 225
if ((twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 225, $this->source); })()), "Tags", [], "any", false, false, false, 225)) > 0)) {
// line 226
echo " <ul class=\"ec-shelfGrid__item-tags\">
";
// line 227
$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.', 227, $this->source); })()), "Tags", [], "any", false, false, false, 227));
foreach ($context['_seq'] as $context["_key"] => $context["Tag"]) {
// line 228
echo " <li class=\"ec-shelfGrid__item-tags__tag tag_";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Tag"], "id", [], "any", false, false, false, 228), "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 230
echo " </ul>
";
}
// line 232
echo " </div>
<p class=\"ec-shelfGrid__item-name\">";
// line 233
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.', 233, $this->source); })()), "name", [], "any", false, false, false, 233), "html", null, true);
echo "</p>
";
// line 234
if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_USER")) {
// line 235
echo "
<div class=\"ec-shelfGrid__item-stock\">
<div class=\"ec-shelfGrid__item-stock__block\">
<p class=\"ec-shelfGrid__item-stock__block__title\">
【発送目安】
</p>
<p class=\"ec-shelfGrid__item-stock__block__detail\">
";
// line 242
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.', 242, $this->source); })()), "getDeliveryDuration", [], "any", false, false, false, 242)) {
// line 243
echo " ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, 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); })()), "getDeliveryDuration", [], "any", false, false, false, 243), "name", [], "any", false, false, false, 243), "html", null, true);
echo "
";
} else {
// line 245
echo " 指定なし
";
}
// line 247
echo " </p>
</div>
<div class=\"ec-shelfGrid__item-stock__block\">
<p class=\"ec-shelfGrid__item-stock__block__title\">
【在庫】
</p>
";
// line 254
echo " <p class=\"ec-shelfGrid__item-stock__block__detail\">
";
// line 255
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.', 255, $this->source); })()), "getStockUnlimitedMin", [], "any", false, false, false, 255) || (twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 255, $this->source); })()), "getStockMin", [], "any", false, false, false, 255) >= 10))) {
// line 256
echo " ◎
";
} else {
// line 258
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.', 258, $this->source); })()), "getStockMin", [], "any", false, false, false, 258) >= 1) && (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); })()), "getStockMin", [], "any", false, false, false, 258) <= 9))) {
// line 259
echo " ○
";
}
// line 261
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.', 261, $this->source); })()), "getStockMin", [], "any", false, false, false, 261) <= 0)) {
// line 262
echo " ■
";
}
// line 264
echo " ";
}
// line 265
echo " </p>
</div>
</div>
";
// line 273
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.', 273, $this->source); })()), "description_list", [], "any", false, false, false, 273)) {
// line 274
echo " <p>";
echo twig_nl2br(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 274, $this->source); })()), "description_list", [], "any", false, false, false, 274));
echo "</p>
";
}
// line 276
echo " <div class=\"ec-shelfGrid__item-flex\">
<p class=\"price02-default ec-shelfGrid__item-price\">
";
// line 278
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.', 278, $this->source); })()), "isInSale", [], "any", false, false, false, 278)) {
// line 279
echo " <span class=\"ec-shelfGrid__item-price__sale\">セール商品</span>
";
}
// line 281
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.', 281, $this->source); })()), "hasProductClass", [], "any", false, false, false, 281)) {
// line 282
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.', 282, $this->source); })()), "getPrice02Min", [], "any", false, false, false, 282) == 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.', 282, $this->source); })()), "getPrice02Max", [], "any", false, false, false, 282))) {
// line 283
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.', 283, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 283)), "html", null, true);
echo "
";
} else {
// line 285
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.', 285, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 285)), "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.', 285, $this->source); })()), "getPrice02IncTaxMax", [], "any", false, false, false, 285)), "html", null, true);
echo "
";
}
// line 287
echo " ";
} else {
// line 288
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.', 288, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 288)), "html", null, true);
echo "
";
}
// line 290
echo " </p>
<div class=\"ec-shelfGrid__item-flex__favorite\">
<form class=\"ec-favoriteForm\" action=\"?\" method=\"?\">
<div class=\"ec-productRole__btn\">
<button data-method=\"POST\" data-action=\"";
// line 294
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.', 294, $this->source); })()), "id", [], "any", false, false, false, 294)]), "html", null, true);
echo "\" id=\"favorite\" class=\"";
if ((twig_get_attribute($this->env, $this->source, ($context["isFavorite"] ?? 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.', 294, $this->source); })()), "id", [], "any", false, false, false, 294), [], "array", true, true, false, 294) && (twig_get_attribute($this->env, $this->source, (isset($context["isFavorite"]) || array_key_exists("isFavorite", $context) ? $context["isFavorite"] : (function () { throw new RuntimeError('Variable "isFavorite" does not exist.', 294, $this->source); })()), twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 294, $this->source); })()), "id", [], "any", false, false, false, 294), [], "array", false, false, false, 294) == true))) {
echo " d-none ";
}
echo " ec-blockFavoriteBtn ec-blockBtn--cancel ec-shelfGrid__item-flex__favorite__btn\">
<img src=\"";
// line 295
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/favorite/before.svg"), "html", null, true);
echo "\" alt=\"お気に入り\" width=\"24\" height=\"24\" loading=\"lazy\">
</button>
<button data-method=\"DELETE\" data-action=\"";
// line 297
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_favorite_delete", ["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.', 297, $this->source); })()), "id", [], "any", false, false, false, 297)]), "html", null, true);
echo "\" id=\"favorite\" class=\"";
if ((twig_get_attribute($this->env, $this->source, ($context["isFavorite"] ?? 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.', 297, $this->source); })()), "id", [], "any", false, false, false, 297), [], "array", true, true, false, 297) && (twig_get_attribute($this->env, $this->source, (isset($context["isFavorite"]) || array_key_exists("isFavorite", $context) ? $context["isFavorite"] : (function () { throw new RuntimeError('Variable "isFavorite" does not exist.', 297, $this->source); })()), twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 297, $this->source); })()), "id", [], "any", false, false, false, 297), [], "array", false, false, false, 297) == false))) {
echo " d-none ";
}
echo "ec-blockFavoriteBtnDisable ec-blockBtn--cancel ec-shelfGrid__item-flex__favorite__btn\">
<img src=\"";
// line 298
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/favorite/after.svg"), "html", null, true);
echo "\" alt=\"お気に入り\" width=\"24\" height=\"24\" loading=\"lazy\">
</button>
</div>
</form>
</div>
</div>
</a>
";
// line 306
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.', 306, $this->source); })()), "getStockUnlimitedMin", [], "any", false, false, false, 306) && (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.', 306, $this->source); })()), "getStockMin", [], "any", false, false, false, 306) <= 0)) && 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.', 306, $this->source); })()), "isStockDiscontinued", [], "any", false, false, false, 306))) {
// line 307
echo " <div class=\"ec-productRole__btn\">
<button type=\"button\" class=\"ec-disabled__btn\" disabled=\"disabled\">
";
// line 309
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("在庫なし"), "html", null, true);
echo "
</button>
</div>
";
} else {
// line 313
echo " ";
$context["form"] = twig_get_attribute($this->env, $this->source, (isset($context["forms"]) || array_key_exists("forms", $context) ? $context["forms"] : (function () { throw new RuntimeError('Variable "forms" does not exist.', 313, $this->source); })()), 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.', 313, $this->source); })()), "id", [], "any", false, false, false, 313), [], "array", false, false, false, 313);
// line 314
echo " <form class=\"productForm\" name=\"form";
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.', 314, $this->source); })()), "id", [], "any", false, false, false, 314), "html", null, true);
echo "\" id=\"productForm";
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.', 314, $this->source); })()), "id", [], "any", false, false, false, 314), "html", null, true);
echo "\" action=\"";
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.', 314, $this->source); })()), "id", [], "any", false, false, false, 314)]), "html", null, true);
echo "\" method=\"post\">
<div class=\"ec-productRole__actions\">
";
// line 316
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id1", [], "any", true, true, false, 316)) {
// line 317
echo " <div class=\"ec-select\">
";
// line 318
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.', 318, $this->source); })()), "classcategory_id1", [], "any", false, false, false, 318), 'widget');
echo "
";
// line 319
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.', 319, $this->source); })()), "classcategory_id1", [], "any", false, false, false, 319), 'errors');
echo "
</div>
";
// line 321
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id2", [], "any", true, true, false, 321)) {
// line 322
echo " <div class=\"ec-select\">
";
// line 323
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.', 323, $this->source); })()), "classcategory_id2", [], "any", false, false, false, 323), 'widget');
echo "
";
// line 324
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.', 324, $this->source); })()), "classcategory_id2", [], "any", false, false, false, 324), 'errors');
echo "
</div>
";
}
// line 327
echo " ";
}
// line 328
echo " <div class=\"ec-numberInput d-none\"><span>";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("数量"), "html", null, true);
echo "</span>
";
// line 329
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.', 329, $this->source); })()), "quantity", [], "any", false, false, false, 329), 'widget', ["attr" => ["class" => "quantity"]]);
echo "
";
// line 330
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.', 330, $this->source); })()), "quantity", [], "any", false, false, false, 330), 'errors');
echo "
</div>
</div>
";
// line 334
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.', 334, $this->source); })()), 'rest');
echo "
</form>
";
// line 336
$context["default"] = 0;
// line 337
echo " ";
if (twig_get_attribute($this->env, $this->source, ($context["itemInCart"] ?? 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.', 337, $this->source); })()), "id", [], "any", false, false, false, 337), [], "array", true, true, false, 337)) {
// line 338
echo " ";
$context["default"] = twig_get_attribute($this->env, $this->source, (isset($context["itemInCart"]) || array_key_exists("itemInCart", $context) ? $context["itemInCart"] : (function () { throw new RuntimeError('Variable "itemInCart" does not exist.', 338, $this->source); })()), 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.', 338, $this->source); })()), "id", [], "any", false, false, false, 338), [], "array", false, false, false, 338);
// line 339
echo " ";
}
// line 340
echo " ";
$context["disabled"] = false;
// line 341
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.', 341, $this->source); })()), "isStockDiscontinued", [], "any", false, false, false, 341)) {
// line 342
echo " <input type=\"hidden\" name=\"stock\" class=\"stock\" value=\"999999999999\">
";
} else {
// line 344
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.', 344, $this->source); })()), "getStockMin", [], "any", false, false, false, 344) <= (isset($context["default"]) || array_key_exists("default", $context) ? $context["default"] : (function () { throw new RuntimeError('Variable "default" does not exist.', 344, $this->source); })()))) {
// line 345
echo " ";
$context["disabled"] = true;
// line 346
echo " ";
}
// line 347
echo " <input type=\"hidden\" name=\"stock\" class=\"stock\" value=\"";
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.', 347, $this->source); })()), "getStockMin", [], "any", false, false, false, 347), "html", null, true);
echo "\">
";
}
// line 349
echo " <div class=\"ec-productRole__btn--group ec-productRole__btn ";
if (twig_get_attribute($this->env, $this->source, ($context["itemInCart"] ?? 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.', 349, $this->source); })()), "id", [], "any", false, false, false, 349), [], "array", true, true, false, 349)) {
echo " d-block ";
} else {
echo " d-none ";
}
echo "\">
<div class=\"d-flex align-items-center ec-productRole__btn-wrapper\">
<button class=\"minus__btn\" data-cartid=\"";
// line 351
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.', 351, $this->source); })()), "id", [], "any", false, false, false, 351), "html", null, true);
echo "\" form=\"productForm";
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.', 351, $this->source); })()), "id", [], "any", false, false, false, 351), "html", null, true);
echo "\">
<span>−</span>
</button>
<span class=\"quantity_label\">";
// line 354
echo twig_escape_filter($this->env, (isset($context["default"]) || array_key_exists("default", $context) ? $context["default"] : (function () { throw new RuntimeError('Variable "default" does not exist.', 354, $this->source); })()), "html", null, true);
echo "</span>
<button class=\"plus__btn\" data-cartid=\"";
// line 355
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.', 355, $this->source); })()), "id", [], "any", false, false, false, 355), "html", null, true);
echo "\" form=\"productForm";
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.', 355, $this->source); })()), "id", [], "any", false, false, false, 355), "html", null, true);
echo "\" ";
if ((isset($context["disabled"]) || array_key_exists("disabled", $context) ? $context["disabled"] : (function () { throw new RuntimeError('Variable "disabled" does not exist.', 355, $this->source); })())) {
echo "disabled";
}
echo ">
<span>+</span>
</button>
</div>
</div>
<div class=\"ec-productRole__btn--only ec-productRole__btn ";
// line 360
if (twig_get_attribute($this->env, $this->source, ($context["itemInCart"] ?? 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.', 360, $this->source); })()), "id", [], "any", false, false, false, 360), [], "array", true, true, false, 360)) {
echo " d-none ";
} else {
echo " d-block ";
}
echo "\">
<button type=\"submit\" class=\"ec-regular__btn add-cart\" data-cartid=\"";
// line 361
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.', 361, $this->source); })()), "id", [], "any", false, false, false, 361), "html", null, true);
echo "\" form=\"productForm";
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.', 361, $this->source); })()), "id", [], "any", false, false, false, 361), "html", null, true);
echo "\">
";
// line 362
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに入れる"), "html", null, true);
echo "
</button>
</div>
";
}
// line 366
echo " ";
} else {
// line 367
echo " <a href=\"";
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("entry_contact");
echo "\" class=\"ec-blockProductBtn--action\">会員登録はこちら</a>
";
}
// line 369
echo " </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['PinpointProduct'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 371
echo " </ul>
</div>
<div class=\"ec-modal\">
<div class=\"ec-modal-overlay\">
<div class=\"ec-modal-wrap\">
<div class=\"ec-modal-box\">
<div class=\"ec-role\">
<div class=\"ec-modal-icon\">
<img src=\"";
// line 379
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/icon/icon_cart.png", "user_data"), "html", null, true);
echo "\" alt=\"\">
</div>
</div>
</div>
<div id=\"ec-modal-header\" class=\"text-center\">";
// line 383
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに追加しました。"), "html", null, true);
echo "</div>
</div>
</div>
</div>
<ul class=\"stockList bottom\">
<li class=\"stockList__block\">
<p class=\"stockList__block__text\">在庫あり:</p>
<p class=\"stockList__block__mark\">◎</p>
</li>
<li class=\"stockList__block\">
<p class=\"stockList__block__text\">残りわずか:</p>
<p class=\"stockList__block__mark\">○</p>
</li>
<li class=\"stockList__block\">
<p class=\"stockList__block__text\">取り寄せ:</p>
<p class=\"stockList__block__mark\">■</p>
</li>
</ul>
<div class=\"ec-pagerRole\">
";
// line 402
$this->loadTemplate("pager.twig", "Product/sale.twig", 402)->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.', 402, $this->source); })()), "paginationData", [], "any", false, false, false, 402)]));
// line 403
echo " </div>
";
}
// line 405
echo " ";
}
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "Product/sale.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 844 => 405, 840 => 403, 838 => 402, 816 => 383, 809 => 379, 799 => 371, 784 => 369, 778 => 367, 775 => 366, 768 => 362, 762 => 361, 754 => 360, 740 => 355, 736 => 354, 728 => 351, 718 => 349, 712 => 347, 709 => 346, 706 => 345, 703 => 344, 699 => 342, 696 => 341, 693 => 340, 690 => 339, 687 => 338, 684 => 337, 682 => 336, 677 => 334, 670 => 330, 666 => 329, 661 => 328, 658 => 327, 652 => 324, 648 => 323, 645 => 322, 643 => 321, 638 => 319, 634 => 318, 631 => 317, 629 => 316, 619 => 314, 616 => 313, 609 => 309, 605 => 307, 603 => 306, 592 => 298, 584 => 297, 579 => 295, 571 => 294, 565 => 290, 559 => 288, 556 => 287, 548 => 285, 542 => 283, 539 => 282, 536 => 281, 532 => 279, 530 => 278, 526 => 276, 520 => 274, 517 => 273, 512 => 265, 509 => 264, 505 => 262, 502 => 261, 498 => 259, 495 => 258, 491 => 256, 489 => 255, 486 => 254, 478 => 247, 474 => 245, 468 => 243, 466 => 242, 457 => 235, 455 => 234, 451 => 233, 448 => 232, 444 => 230, 433 => 228, 429 => 227, 426 => 226, 424 => 225, 414 => 224, 409 => 222, 406 => 221, 403 => 220, 386 => 219, 382 => 217, 380 => 216, 362 => 200, 355 => 196, 351 => 195, 347 => 193, 345 => 192, 342 => 191, 336 => 189, 331 => 187, 328 => 186, 326 => 185, 322 => 183, 319 => 164, 307 => 162, 303 => 161, 298 => 160, 294 => 159, 290 => 157, 284 => 154, 281 => 153, 279 => 152, 274 => 150, 259 => 138, 255 => 136, 245 => 135, 201 => 100, 191 => 93, 118 => 22, 104 => 21, 96 => 20, 93 => 19, 76 => 18, 72 => 16, 62 => 15, 51 => 11, 49 => 13, 36 => 11,);
}
public function getSourceContext()
{
return new Source("{#
This file is part of EC-CUBE
Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
http://www.ec-cube.co.jp/
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
{% extends 'default_frame.twig' %}
{% set body_class = 'product_page' %}
{% block javascript %}
<script>
eccube.productsClassCategories = {
{% for PinpointProduct in pagination %}
{% set Product = PinpointProduct.ProductClass.Product %}
\"{{ 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();
});
var modalTimer;
\$('.add-cart').on('click', function(e) {
var self = \$(this);
onAddCart(e, \$(this), 1, function() {
var \$form = self.parents('li');
\$form.find(\".ec-productRole__btn--only\").addClass(\"d-none\");
\$form.find(\".ec-productRole__btn--group\").removeClass(\"d-none\");
window.clearTimeout(modalTimer);
\$('.ec-modal').show()
modalTimer = window.setTimeout(function() {
\$('.ec-modal').hide();
}, 1500)
});
});
\$('.minus__btn').on('click', function(e) {
onAddCart(e, \$(this), -1);
})
\$('.plus__btn').on('click', function(e) {
onAddCart(e, \$(this));
})
function onAddCart(e, self, quantity = 1, callback) {
var \$form = \$(self).parents('li').find('form.productForm');
// 個数フォームのチェック
\$form.parent().find('.quantity').val(quantity);
e.preventDefault();
\$.ajax({
url: \$form.attr('action'),
type: \$form.attr('method'),
data: \$form.serialize(),
dataType: 'json',
beforeSend: function(xhr, settings) {
// Buttonを無効にする
\$(self).prop('disabled', true);
}
}).done(function(data) {
// レスポンス内のメッセージをalertで表示
\$.each(data.messages, function() {
\$('#ec-modal-header').text(this);
});
var \$quantityLabelEl = \$(self).parents('li').find('.quantity_label');
\$quantityLabelEl.text(\$quantityLabelEl.text() * 1 + quantity * 1);
if(callback) {
callback();
}
// カートブロックを更新する
\$.ajax({
url: '{{ url('block_cart') }}',
type: 'GET',
dataType: 'html'
}).done(function(html) {
\$('.ec-headerRole__cart').html(html);
});
}).fail(function(data) {
alert('{{ 'カートへの追加に失敗しました。'|trans }}');
\$(self).prop('disabled', false);
}).always(function(data) {
var \$parent = \$(self).parents('li');
let stockVal = \$parent.find('.stock').val() * 1;
var \$quantityLabelEl = \$parent.find('.quantity_label');
var _quantity = \$quantityLabelEl.text() * 1;
if(_quantity == 0) {
// enable minus button
\$(self).prop('disabled', false);
\$parent.find(\".ec-productRole__btn--only\").removeClass(\"d-none\");
\$parent.find(\".ec-productRole__btn--group\").addClass(\"d-none\");
}
if(_quantity > 0 && _quantity < stockVal) {
// Buttonを有効にする
\$(self).prop('disabled', false);
\$parent.find('.plus__btn').prop('disabled', false);
}
});
}
});
\$('.ec-modal-wrap').on('click', function(e) {
// モーダル内の処理は外側にバブリングさせない
e.stopPropagation();
});
\$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
\$('.ec-modal').hide()
});
</script>
{% endblock %}
{% block main %}
<ul class=\"breadcrumb w-p\">
<li class=\"breadcrumb__item\">
<a href=\"{{ url('homepage') }}\" class=\"breadcrumb__item__link\">
ホーム
</a>
</li>
<li class=\"breadcrumb__item\">
<p class=\"breadcrumb__item__arrow\">></p>
</li>
<li class=\"breadcrumb__item\">
<p class=\"breadcrumb__item__text\">セール商品一覧</p>
</li>
</ul>
<div class=\"ec-pageHeader contentHeader\">
<h1>{{ 'セール商品一覧'|trans }}</h1>
</div>
{% 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>
{% 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 %}
<p class=\"ec-searchnavRole__counter__title\">検索結果</p>
{{ '<p class=\"ec-searchnavRole__counter__number\">%count%件</p>'|trans({ '%count%': pagination.totalItemCount })|raw }}
{% else %}
<span class=\"\">{{ 'お探しの商品は見つかりませんでした'|trans }}</span>
{% endif %}
</div>
{% if pagination.totalItemCount > 0 %}
<div class=\"ec-searchnavRole__actions\">
<div class=\"ec-select\">
{{ form_widget(search_form.disp_number, {'id': '', 'attr': {'class': 'disp-number'}}) }}
{{ form_widget(search_form.orderby, {'id': '', 'attr': {'class': 'order-by'}}) }}
</div>
</div>
{% endif %}
</div>
</div>
<ul class=\"stockList\">
<li class=\"stockList__block\">
<p class=\"stockList__block__text\">在庫あり:</p>
<p class=\"stockList__block__mark\">◎</p>
</li>
<li class=\"stockList__block\">
<p class=\"stockList__block__text\">残りわずか:</p>
<p class=\"stockList__block__mark\">○</p>
</li>
<li class=\"stockList__block\">
<p class=\"stockList__block__text\">取り寄せ:</p>
<p class=\"stockList__block__mark\">■</p>
</li>
</ul>
{% if pagination.totalItemCount > 0 %}
<div class=\"ec-shelfRole\">
<ul class=\"ec-shelfGrid\">
{% for PinpointProduct in pagination %}
{% set Product = PinpointProduct.ProductClass.Product %}
<li class=\"ec-shelfGrid__item\">
<a href=\"{{ url('product_detail', {'id': Product.id}) }}\">
<div class=\"ec-shelfGrid__item-image\">
<img src=\"{{ asset(Product.main_list_image|no_image_product, 'save_image') }}\" alt=\"{{ Product.name }}\" {% if loop.index > 5 %} loading=\"lazy\"{% endif %}>
{% if Product.Tags|length > 0 %}
<ul class=\"ec-shelfGrid__item-tags\">
{% for Tag in Product.Tags %}
<li class=\"ec-shelfGrid__item-tags__tag tag_{{ Tag.id }}\">{{ Tag }}</li>
{% endfor %}
</ul>
{% endif %}
</div>
<p class=\"ec-shelfGrid__item-name\">{{ Product.name }}</p>
{% if is_granted('ROLE_USER') %}
<div class=\"ec-shelfGrid__item-stock\">
<div class=\"ec-shelfGrid__item-stock__block\">
<p class=\"ec-shelfGrid__item-stock__block__title\">
【発送目安】
</p>
<p class=\"ec-shelfGrid__item-stock__block__detail\">
{% if Product.getDeliveryDuration %}
{{Product.getDeliveryDuration.name}}
{% else %}
指定なし
{% endif %}
</p>
</div>
<div class=\"ec-shelfGrid__item-stock__block\">
<p class=\"ec-shelfGrid__item-stock__block__title\">
【在庫】
</p>
{# 在庫をマークで表示何個から何個か◎等はこれから確認 #}
<p class=\"ec-shelfGrid__item-stock__block__detail\">
{% if Product.getStockUnlimitedMin or Product.getStockMin >= 10 %}
◎
{% else %}
{% if Product.getStockMin >= 1 and Product.getStockMin <= 9 %}
○
{% endif %}
{% if Product.getStockMin <= 0 %}
■
{% endif %}
{% endif %}
</p>
</div>
</div>
{# {% if not Product.getStockUnlimitedMin %}
<p>
発送可能{{Product.getStockMin}}個
</p>
{% endif %} #}
{% if Product.description_list %}
<p>{{ Product.description_list|raw|nl2br }}</p>
{% endif %}
<div class=\"ec-shelfGrid__item-flex\">
<p class=\"price02-default ec-shelfGrid__item-price\">
{% if Product.isInSale %}
<span class=\"ec-shelfGrid__item-price__sale\">セール商品</span>
{% endif %}
{% if Product.hasProductClass %}
{% if Product.getPrice02Min == Product.getPrice02Max %}
{{ Product.getPrice02IncTaxMin|price }}
{% else %}
{{ Product.getPrice02IncTaxMin|price }} ~ {{ Product.getPrice02IncTaxMax|price }}
{% endif %}
{% else %}
{{ Product.getPrice02IncTaxMin|price }}
{% endif %}
</p>
<div class=\"ec-shelfGrid__item-flex__favorite\">
<form class=\"ec-favoriteForm\" action=\"?\" method=\"?\">
<div class=\"ec-productRole__btn\">
<button data-method=\"POST\" data-action=\"{{ url('product_add_favorite', {id:Product.id}) }}\" id=\"favorite\" class=\"{% if isFavorite[Product.id] is defined and isFavorite[Product.id] == true %} d-none {% endif %} ec-blockFavoriteBtn ec-blockBtn--cancel ec-shelfGrid__item-flex__favorite__btn\">
<img src=\"{{ asset('assets/img/favorite/before.svg') }}\" alt=\"お気に入り\" width=\"24\" height=\"24\" loading=\"lazy\">
</button>
<button data-method=\"DELETE\" data-action=\"{{ url('product_favorite_delete', {id:Product.id}) }}\" id=\"favorite\" class=\"{% if isFavorite[Product.id] is defined and isFavorite[Product.id] == false %} d-none {% endif %}ec-blockFavoriteBtnDisable ec-blockBtn--cancel ec-shelfGrid__item-flex__favorite__btn\">
<img src=\"{{ asset('assets/img/favorite/after.svg') }}\" alt=\"お気に入り\" width=\"24\" height=\"24\" loading=\"lazy\">
</button>
</div>
</form>
</div>
</div>
</a>
{% if not Product.getStockUnlimitedMin and Product.getStockMin <= 0 and Product.isStockDiscontinued %}
<div class=\"ec-productRole__btn\">
<button type=\"button\" class=\"ec-disabled__btn\" disabled=\"disabled\">
{{ '在庫なし'|trans }}
</button>
</div>
{% else %}
{% set form = forms[Product.id] %}
<form class=\"productForm\" 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 d-none\"><span>{{ '数量'|trans }}</span>
{{ form_widget(form.quantity, {'attr': {'class': 'quantity'}} ) }}
{{ form_errors(form.quantity) }}
</div>
</div>
{{ form_rest(form) }}
</form>
{% set default = 0 %}
{% if itemInCart[Product.id] is defined %}
{% set default = itemInCart[Product.id] %}
{% endif %}
{% set disabled = false %}
{% if not Product.isStockDiscontinued %}
<input type=\"hidden\" name=\"stock\" class=\"stock\" value=\"999999999999\">
{% else %}
{% if Product.getStockMin <= default %}
{% set disabled = true %}
{% endif %}
<input type=\"hidden\" name=\"stock\" class=\"stock\" value=\"{{Product.getStockMin}}\">
{% endif %}
<div class=\"ec-productRole__btn--group ec-productRole__btn {% if itemInCart[Product.id] is defined %} d-block {% else %} d-none {% endif %}\">
<div class=\"d-flex align-items-center ec-productRole__btn-wrapper\">
<button class=\"minus__btn\" data-cartid=\"{{ Product.id }}\" form=\"productForm{{ Product.id }}\">
<span>−</span>
</button>
<span class=\"quantity_label\">{{ default }}</span>
<button class=\"plus__btn\" data-cartid=\"{{ Product.id }}\" form=\"productForm{{ Product.id }}\" {% if disabled %}disabled{% endif %}>
<span>+</span>
</button>
</div>
</div>
<div class=\"ec-productRole__btn--only ec-productRole__btn {% if itemInCart[Product.id] is defined %} d-none {% else %} d-block {% endif %}\">
<button type=\"submit\" class=\"ec-regular__btn add-cart\" data-cartid=\"{{ Product.id }}\" form=\"productForm{{ Product.id }}\">
{{ 'カートに入れる'|trans }}
</button>
</div>
{% endif %}
{% else %}
<a href=\"{{ url('entry_contact') }}\" class=\"ec-blockProductBtn--action\">会員登録はこちら</a>
{% endif %}
</li>
{% endfor %}
</ul>
</div>
<div class=\"ec-modal\">
<div class=\"ec-modal-overlay\">
<div class=\"ec-modal-wrap\">
<div class=\"ec-modal-box\">
<div class=\"ec-role\">
<div class=\"ec-modal-icon\">
<img src=\"{{ asset('assets/img/icon/icon_cart.png', 'user_data') }}\" alt=\"\">
</div>
</div>
</div>
<div id=\"ec-modal-header\" class=\"text-center\">{{ 'カートに追加しました。'|trans }}</div>
</div>
</div>
</div>
<ul class=\"stockList bottom\">
<li class=\"stockList__block\">
<p class=\"stockList__block__text\">在庫あり:</p>
<p class=\"stockList__block__mark\">◎</p>
</li>
<li class=\"stockList__block\">
<p class=\"stockList__block__text\">残りわずか:</p>
<p class=\"stockList__block__mark\">○</p>
</li>
<li class=\"stockList__block\">
<p class=\"stockList__block__text\">取り寄せ:</p>
<p class=\"stockList__block__mark\">■</p>
</li>
</ul>
<div class=\"ec-pagerRole\">
{% include \"pager.twig\" with {'pages': pagination.paginationData} %}
</div>
{% endif %}
{% endif %}
{% endblock %}
", "Product/sale.twig", "/home/bravers/bravers.xbiz.jp/public_html/app/template/bravers/Product/sale.twig");
}
}