<?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/new.twig */
class __TwigTemplate_b1808fd320936418c90bbf427e88881bae50f96fa5bd40c614266509ad2f3e00 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/new.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Product/new.twig"));
// line 13
$context["body_class"] = "product_page";
// line 11
$this->parent = $this->loadTemplate("default_frame.twig", "Product/new.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["Product"]) {
// line 19
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, 19), "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, 19) == false)) {
echo ", ";
}
// line 20
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 21
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 91
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 98
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 133
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 134
echo " <ul class=\"breadcrumb w-p\">
<li class=\"breadcrumb__item\">
<a href=\"";
// line 136
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 148
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("新着商品一覧"), "html", null, true);
echo "</h1>
</div>
";
// line 150
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.', 150, $this->source); })()), "category_id", [], "any", false, false, false, 150), "vars", [], "any", false, false, false, 150), "errors", [], "any", false, false, false, 150)) > 0)) {
// line 151
echo " <div class=\"ec-searchnavRole\">
<p class=\"errormsg text-danger\">";
// line 152
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ご指定のカテゴリは存在しません"), "html", null, true);
echo "</p>
</div>
";
} else {
// line 155
echo " <div class=\"ec-searchnavRole\">
<form name=\"form1\" id=\"form1\" method=\"get\" action=\"?\">
";
// line 157
$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.', 157, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
// line 158
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, 158), "id", [], "any", false, false, false, 158), "html", null, true);
echo "\"
name=\"";
// line 159
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, 159), "full_name", [], "any", false, false, false, 159), "html", null, true);
echo "\"
";
// line 160
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, 160), "value", [], "any", false, false, false, 160))) {
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, 160), "value", [], "any", false, false, false, 160), "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 162
echo " </form>
";
// line 181
echo " <div class=\"ec-searchnavRole__infos\">
<div class=\"ec-searchnavRole__counter\">
";
// line 189
echo " </div>
";
// line 190
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.', 190, $this->source); })()), "totalItemCount", [], "any", false, false, false, 190) > 0)) {
// line 191
echo " <div class=\"ec-searchnavRole__actions\">
<div class=\"ec-select\">
";
// line 193
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.', 193, $this->source); })()), "disp_number", [], "any", false, false, false, 193), 'widget', ["id" => "", "attr" => ["class" => "disp-number"]]);
echo "
";
// line 194
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.', 194, $this->source); })()), "orderby", [], "any", false, false, false, 194), 'widget', ["id" => "", "attr" => ["class" => "order-by d-none"]]);
echo "
</div>
</div>
";
}
// line 198
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 214
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.', 214, $this->source); })()), "totalItemCount", [], "any", false, false, false, 214) > 0)) {
// line 215
echo " <div class=\"ec-shelfRole\">
<ul class=\"ec-shelfGrid\">
";
// line 217
$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.', 217, $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 218
echo " <li class=\"ec-shelfGrid__item\">
<a href=\"";
// line 219
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, 219)]), "html", null, true);
echo "\">
<div class=\"ec-shelfGrid__item-image\">
<img src=\"";
// line 221
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, 221)), "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, 221), "html", null, true);
echo "\" ";
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 221) > 5)) {
echo " loading=\"lazy\"";
}
echo ">
";
// line 222
if ((twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Product"], "Tags", [], "any", false, false, false, 222)) > 0)) {
// line 223
echo " <ul class=\"ec-shelfGrid__item-tags\">
";
// line 224
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["Product"], "Tags", [], "any", false, false, false, 224));
foreach ($context['_seq'] as $context["_key"] => $context["Tag"]) {
// line 225
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, 225), "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 227
echo " </ul>
";
}
// line 229
echo " </div>
<p class=\"ec-shelfGrid__item-name\">";
// line 230
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Product"], "name", [], "any", false, false, false, 230), "html", null, true);
echo "</p>
";
// line 231
if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_USER")) {
// line 232
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 239
if (twig_get_attribute($this->env, $this->source, $context["Product"], "getDeliveryDuration", [], "any", false, false, false, 239)) {
// line 240
echo " ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["Product"], "getDeliveryDuration", [], "any", false, false, false, 240), "name", [], "any", false, false, false, 240), "html", null, true);
echo "
";
} else {
// line 242
echo " 指定なし
";
}
// line 244
echo " </p>
</div>
<div class=\"ec-shelfGrid__item-stock__block\">
<p class=\"ec-shelfGrid__item-stock__block__title\">
【在庫】
</p>
";
// line 251
echo " <p class=\"ec-shelfGrid__item-stock__block__detail\">
";
// line 252
if ((twig_get_attribute($this->env, $this->source, $context["Product"], "getStockUnlimitedMin", [], "any", false, false, false, 252) || (twig_get_attribute($this->env, $this->source, $context["Product"], "getStockMin", [], "any", false, false, false, 252) >= 10))) {
// line 253
echo " ◎
";
} else {
// line 255
echo " ";
if (((twig_get_attribute($this->env, $this->source, $context["Product"], "getStockMin", [], "any", false, false, false, 255) >= 1) && (twig_get_attribute($this->env, $this->source, $context["Product"], "getStockMin", [], "any", false, false, false, 255) <= 9))) {
// line 256
echo " ○
";
}
// line 258
echo " ";
if ((twig_get_attribute($this->env, $this->source, $context["Product"], "getStockMin", [], "any", false, false, false, 258) <= 0)) {
// line 259
echo " ■
";
}
// line 261
echo " ";
}
// line 262
echo " </p>
</div>
</div>
";
// line 270
echo " ";
if (twig_get_attribute($this->env, $this->source, $context["Product"], "description_list", [], "any", false, false, false, 270)) {
// line 271
echo " <p>";
echo twig_nl2br(twig_get_attribute($this->env, $this->source, $context["Product"], "description_list", [], "any", false, false, false, 271));
echo "</p>
";
}
// line 273
echo " <div class=\"ec-shelfGrid__item-flex\">
<p class=\"price02-default ec-shelfGrid__item-price\">
";
// line 275
if (twig_get_attribute($this->env, $this->source, $context["Product"], "isInSale", [], "any", false, false, false, 275)) {
// line 276
echo " <span class=\"ec-shelfGrid__item-price__sale\">セール商品</span>
";
}
// line 278
echo " ";
if (twig_get_attribute($this->env, $this->source, $context["Product"], "hasProductClass", [], "any", false, false, false, 278)) {
// line 279
echo " ";
if ((twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02Min", [], "any", false, false, false, 279) == twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02Max", [], "any", false, false, false, 279))) {
// line 280
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMin", [], "any", false, false, false, 280)), "html", null, true);
echo "
";
} else {
// line 282
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMin", [], "any", false, false, false, 282)), "html", null, true);
echo " ~ ";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMax", [], "any", false, false, false, 282)), "html", null, true);
echo "
";
}
// line 284
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, $context["Product"], "getPrice02IncTaxMin", [], "any", false, false, false, 285)), "html", null, true);
echo "
";
}
// line 287
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 291
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, $context["Product"], "id", [], "any", false, false, false, 291)]), "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, $context["Product"], "id", [], "any", false, false, false, 291), [], "array", true, true, false, 291) && (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.', 291, $this->source); })()), twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, false, 291), [], "array", false, false, false, 291) == true))) {
echo " d-none ";
}
echo " ec-blockFavoriteBtn ec-blockBtn--cancel ec-shelfGrid__item-flex__favorite__btn\">
<img src=\"";
// line 292
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 294
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, $context["Product"], "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, $context["Product"], "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, $context["Product"], "id", [], "any", false, false, false, 294), [], "array", false, false, false, 294) == false))) {
echo " d-none ";
}
echo "ec-blockFavoriteBtnDisable 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/after.svg"), "html", null, true);
echo "\" alt=\"お気に入り\" width=\"24\" height=\"24\" loading=\"lazy\">
</button>
</div>
</form>
</div>
</div>
</a>
";
// line 303
if ((( !twig_get_attribute($this->env, $this->source, $context["Product"], "getStockUnlimitedMin", [], "any", false, false, false, 303) && (twig_get_attribute($this->env, $this->source, $context["Product"], "getStockMin", [], "any", false, false, false, 303) <= 0)) && twig_get_attribute($this->env, $this->source, $context["Product"], "isStockDiscontinued", [], "any", false, false, false, 303))) {
// line 304
echo " <div class=\"ec-productRole__btn\">
<button type=\"button\" class=\"ec-disabled__btn\" disabled=\"disabled\">
";
// line 306
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("在庫なし"), "html", null, true);
echo "
</button>
</div>
";
} else {
// line 310
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.', 310, $this->source); })()), twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, false, 310), [], "array", false, false, false, 310);
// line 311
echo " <form class=\"productForm\" name=\"form";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, false, 311), "html", null, true);
echo "\" id=\"productForm";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, false, 311), "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, $context["Product"], "id", [], "any", false, false, false, 311)]), "html", null, true);
echo "\" method=\"post\">
<div class=\"ec-productRole__actions\">
";
// line 313
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id1", [], "any", true, true, false, 313)) {
// line 314
echo " <div class=\"ec-select\">
";
// line 315
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 315, $this->source); })()), "classcategory_id1", [], "any", false, false, false, 315), 'widget');
echo "
";
// line 316
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 316, $this->source); })()), "classcategory_id1", [], "any", false, false, false, 316), 'errors');
echo "
</div>
";
// line 318
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id2", [], "any", true, true, false, 318)) {
// line 319
echo " <div class=\"ec-select\">
";
// line 320
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.', 320, $this->source); })()), "classcategory_id2", [], "any", false, false, false, 320), 'widget');
echo "
";
// line 321
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.', 321, $this->source); })()), "classcategory_id2", [], "any", false, false, false, 321), 'errors');
echo "
</div>
";
}
// line 324
echo " ";
}
// line 325
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 326
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.', 326, $this->source); })()), "quantity", [], "any", false, false, false, 326), 'widget', ["attr" => ["class" => "quantity"]]);
echo "
";
// line 327
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.', 327, $this->source); })()), "quantity", [], "any", false, false, false, 327), 'errors');
echo "
</div>
</div>
";
// line 331
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.', 331, $this->source); })()), 'rest');
echo "
</form>
";
// line 333
$context["default"] = 0;
// line 334
echo " ";
if (twig_get_attribute($this->env, $this->source, ($context["itemInCart"] ?? null), twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, false, 334), [], "array", true, true, false, 334)) {
// line 335
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.', 335, $this->source); })()), twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, false, 335), [], "array", false, false, false, 335);
// line 336
echo " ";
}
// line 337
echo " ";
$context["disabled"] = false;
// line 338
echo " ";
if ( !twig_get_attribute($this->env, $this->source, $context["Product"], "isStockDiscontinued", [], "any", false, false, false, 338)) {
// line 339
echo " <input type=\"hidden\" name=\"stock\" class=\"stock\" value=\"999999999999\">
";
} else {
// line 341
echo " ";
if ((twig_get_attribute($this->env, $this->source, $context["Product"], "getStockMin", [], "any", false, false, false, 341) <= (isset($context["default"]) || array_key_exists("default", $context) ? $context["default"] : (function () { throw new RuntimeError('Variable "default" does not exist.', 341, $this->source); })()))) {
// line 342
echo " ";
$context["disabled"] = true;
// line 343
echo " ";
}
// line 344
echo " <input type=\"hidden\" name=\"stock\" class=\"stock\" value=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Product"], "getStockMin", [], "any", false, false, false, 344), "html", null, true);
echo "\">
";
}
// line 346
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, $context["Product"], "id", [], "any", false, false, false, 346), [], "array", true, true, false, 346)) {
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 348
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, false, 348), "html", null, true);
echo "\" form=\"productForm";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, false, 348), "html", null, true);
echo "\">
<span>−</span>
</button>
<span class=\"quantity_label\">";
// line 351
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.', 351, $this->source); })()), "html", null, true);
echo "</span>
<button class=\"plus__btn\" data-cartid=\"";
// line 352
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, false, 352), "html", null, true);
echo "\" form=\"productForm";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, false, 352), "html", null, true);
echo "\" ";
if ((isset($context["disabled"]) || array_key_exists("disabled", $context) ? $context["disabled"] : (function () { throw new RuntimeError('Variable "disabled" does not exist.', 352, $this->source); })())) {
echo "disabled";
}
echo ">
<span>+</span>
</button>
</div>
</div>
<div class=\"ec-productRole__btn--only ec-productRole__btn ";
// line 357
if (twig_get_attribute($this->env, $this->source, ($context["itemInCart"] ?? null), twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, false, 357), [], "array", true, true, false, 357)) {
echo " d-none ";
} else {
echo " d-block ";
}
echo "\">
<button type=\"submit\" class=\"ec-regular__btn add-cart\" data-cartid=\"";
// line 358
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, false, 358), "html", null, true);
echo "\" form=\"productForm";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, false, 358), "html", null, true);
echo "\">
";
// line 359
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに入れる"), "html", null, true);
echo "
</button>
</div>
";
}
// line 363
echo " ";
} else {
// line 364
echo " <a href=\"";
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("entry_contact");
echo "\" class=\"ec-blockProductBtn--action\">会員登録はこちら</a>
";
}
// line 366
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['Product'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 368
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 376
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 380
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 399
$this->loadTemplate("pager.twig", "Product/new.twig", 399)->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.', 399, $this->source); })()), "paginationData", [], "any", false, false, false, 399)]));
// line 400
echo " </div>
";
}
// line 402
echo " ";
}
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "Product/new.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 821 => 402, 817 => 400, 815 => 399, 793 => 380, 786 => 376, 776 => 368, 761 => 366, 755 => 364, 752 => 363, 745 => 359, 739 => 358, 731 => 357, 717 => 352, 713 => 351, 705 => 348, 695 => 346, 689 => 344, 686 => 343, 683 => 342, 680 => 341, 676 => 339, 673 => 338, 670 => 337, 667 => 336, 664 => 335, 661 => 334, 659 => 333, 654 => 331, 647 => 327, 643 => 326, 638 => 325, 635 => 324, 629 => 321, 625 => 320, 622 => 319, 620 => 318, 615 => 316, 611 => 315, 608 => 314, 606 => 313, 596 => 311, 593 => 310, 586 => 306, 582 => 304, 580 => 303, 569 => 295, 561 => 294, 556 => 292, 548 => 291, 542 => 287, 536 => 285, 533 => 284, 525 => 282, 519 => 280, 516 => 279, 513 => 278, 509 => 276, 507 => 275, 503 => 273, 497 => 271, 494 => 270, 489 => 262, 486 => 261, 482 => 259, 479 => 258, 475 => 256, 472 => 255, 468 => 253, 466 => 252, 463 => 251, 455 => 244, 451 => 242, 445 => 240, 443 => 239, 434 => 232, 432 => 231, 428 => 230, 425 => 229, 421 => 227, 410 => 225, 406 => 224, 403 => 223, 401 => 222, 391 => 221, 386 => 219, 383 => 218, 366 => 217, 362 => 215, 360 => 214, 342 => 198, 335 => 194, 331 => 193, 327 => 191, 325 => 190, 322 => 189, 318 => 181, 315 => 162, 303 => 160, 299 => 159, 294 => 158, 290 => 157, 286 => 155, 280 => 152, 277 => 151, 275 => 150, 270 => 148, 255 => 136, 251 => 134, 241 => 133, 197 => 98, 187 => 91, 115 => 21, 101 => 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 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();
});
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>{{ 'お探しの商品は見つかりませんでした'|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 d-none'}}) }}
</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 Product in pagination %}
<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/new.twig", "/home/bravers/bravers.xbiz.jp/public_html/app/template/bravers/Product/new.twig");
}
}