<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* __string_template__7d553b6484c188d36805282a68be9e1d */
class __TwigTemplate_a21fd4125aac7037bdc46e1d2c98244a extends \Eccube\Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'stylesheet' => [$this, 'block_stylesheet'],
'javascript' => [$this, 'block_javascript'],
'main' => [$this, 'block_main'],
];
$this->sandbox = $this->env->getExtension('\Twig\Extension\SandboxExtension');
$this->checkSecurity();
}
protected function doGetParent(array $context)
{
// line 125
return "default_frame.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "__string_template__7d553b6484c188d36805282a68be9e1d"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "__string_template__7d553b6484c188d36805282a68be9e1d"));
// line 127
$context["body_class"] = "product_page";
// line 125
$this->parent = $this->loadTemplate("default_frame.twig", "__string_template__7d553b6484c188d36805282a68be9e1d", 125);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 1
public function block_stylesheet($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheet"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheet"));
// line 2
echo " <style>
.ec-blockBtn--action {
background-color: #E65F6E;
border-radius: 5px;
}
.ec-blockBtn--cancel {
border-radius: 5px;
}
.freeze {
position: absolute;
top: 5px;
left: 5px;
width: 40px;
line-height: 1em;
padding: 5px 0;
background-color: #00B0EC;
color: white;
text-align: center;
font-size: 10px;
font-weight: 700;
border-radius: 5px;
margin-bottom: 5px;
}
.original {
position: absolute;
top: 5px;
left: 50px;
width: 60px;
line-height: 1em;
padding: 5px 0;
background-color: #fff100;
color: black;
text-align: center;
font-size: 10px;
font-weight: 700;
border-radius: 5px;
margin-bottom: 5px;
}
.ec-select {
margin-bottom: 5px;
}
.ec-select select {
font-size: 12px;
}
.ec-shelfRole img.product_image {
float: left;
width: 40%;
object-fit: cover;
height: 120px;
}
.product_info {
width: 60%; float: inline-end; padding-left: 5px;
}
.product_hr {
width: 100%; color: #DDDDDD;
}
.about_shikomel {
font-size: 14px; letter-spacing: normal; color: black; max-width: 120px; float: inline-end; display: none; font-weight: bold;
}
/* PC(画面幅768px以上)の場合 */
@media screen and (min-width: 768px) {
.ec-shelfGrid {
margin-left: 0px;
margin-right: 0px;
}
.ec-shelfRole img.product_image {
width: 100%;
height: auto;
}
.product_li {
width: 25%;
margin-bottom: 15px;
}
.product_li:nth-of-type(4n + 1) {
padding-left: 0px;
padding-right: 14px;
}
.product_li:nth-of-type(4n + 2) {
padding-left: 0px;
padding-right: 7px;
}
.product_li:nth-of-type(4n + 3) {
padding-left: 7px;
padding-right: 0px;
}
.product_li:nth-of-type(4n + 4) {
padding-left: 14px;
padding-right: 0px;
}
.product_info {
width: 100%;
padding-left: 0px;
margin-top: 10px;
}
.product_hr {
display: none;
}
.about_shikomel {
display: block;
}
}
</style>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 129
public function block_javascript($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascript"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascript"));
// line 130
echo " <script>
eccube.productsClassCategories = {
";
// line 132
$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.', 132, $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 133
echo " \"";
echo twig_escape_filter($this->env, twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, true, 133), 133, $this->source), "js"), "html", null, true);
echo "\": ";
echo $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getClassCategoriesAsJson($this->sandbox->ensureToStringAllowed($context["Product"], 133, $this->source));
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, true, 133) == false)) {
echo ", ";
}
// line 134
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 135
echo " };
";
// line 137
$context["current_domain"] = twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 137, $this->source); })()), "request", [], "any", false, false, true, 137), "getHost", [], "method", false, false, true, 137);
// line 138
echo "
";
// line 139
$context["is_prod"] = twig_in_filter("web-order.shikomel.com", (isset($context["current_domain"]) || array_key_exists("current_domain", $context) ? $context["current_domain"] : (function () { throw new RuntimeError('Variable "current_domain" does not exist.', 139, $this->source); })()));
// line 140
echo " ";
$context["is_stg"] = twig_in_filter("web-order-stg.shikomel.com", (isset($context["current_domain"]) || array_key_exists("current_domain", $context) ? $context["current_domain"] : (function () { throw new RuntimeError('Variable "current_domain" does not exist.', 140, $this->source); })()));
// line 141
echo "
\$(function() {
// 表示件数を変更
\$('.disp-number').change(function() {
var dispNumber = \$(this).val();
\$('#disp_number').val(dispNumber);
\$('#pageno').val(1);
\$(\"#form1\").submit();
});
// 並び順を変更
\$('.order-by').change(function() {
var orderBy = \$(this).val();
\$('#orderby').val(orderBy);
\$('#pageno').val(1);
\$(\"#form1\").submit();
});
\$('.add-cart').on('click', function(e) {
var \$form = \$(this).parents('li').find('form');
var cartid = \$(this).attr(\"data-cartid\");
// 個数フォームのチェック
var \$quantity = \$form.parent().find('.quantity');
if (\$quantity.val() < 1) {
\$quantity[0].setCustomValidity('";
// line 168
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("1以上で入力してください。"), "html", null, true);
echo "');
setTimeout(function() {
loadingOverlay('hide');
}, 100);
return true;
} else {
\$quantity[0].setCustomValidity('');
}
e.preventDefault();
\$.ajax({
url: \$form.attr('action'),
type: \$form.attr('method'),
data: \$form.serialize(),
dataType: 'json',
beforeSend: function(xhr, settings) {
// Buttonを無効にする
\$('.add-cart').prop('disabled', true);
}
}).done(function(data) {
// レスポンス内のメッセージをalertで表示
\$.each(data.messages, function() {
var \$cartBtn = \$('div.ec-modal-overlay').find('a.ec-inlineBtn--action');
\$cartBtn.removeAttr('disabled');
\$cartBtn.off('click');
// responseを判別
if(data.product_id !== undefined) {
var product_id = data.product_id;
var under_quantity = data.under_quantity;
// 最低購入数を下回る場合は、選択数量を最低購入数に変更
if(\$('#quantity' + product_id).length) {
\$('#quantity' + product_id).val(under_quantity);
} else {
\$('#quantity').val(under_quantity);
}
// カートに進むボタンを無効化
\$cartBtn.attr('disabled', 'disabled');
\$cartBtn.on('click', function() {
return false;
})
}
\$('#ec-modal-header').text(this);
});
\$('.ec-modal').show()
// カートブロックを更新する
\$.ajax({
url: '";
// line 223
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("block_cart");
echo "',
type: 'GET',
dataType: 'html'
}).done(function(html) {
\$('.ec-headerRole__cart').html(html);
});
\$.ajax({
url: '";
// line 231
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("modal_cart");
echo "',
type: 'GET',
dataType: 'html'
}).done(function(html) {
\$('.ec-Modalfooter__cart').html(html);
});
\$.ajax({
url: '";
// line 239
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("header_cart_icon");
echo "',
type: 'GET',
dataType: 'html'
}).done(function(html) {
console.log(html)
\$('.cart_icon_outer').html(html);
});
";
// line 247
if ((isset($context["is_prod"]) || array_key_exists("is_prod", $context) ? $context["is_prod"] : (function () { throw new RuntimeError('Variable "is_prod" does not exist.', 247, $this->source); })())) {
// line 248
echo "
fbq('track', 'AddToCart', {
content_type: \"Product\",
content_ids: cartid,
contents:
[{
id: cartid,
quantity: 1
}],
content_name: \"\",
currency: \"JPY\",
value: 50,
});
fbq('trackCustom', 'ce_add_to_cart', {
content_type: \"Product\",
content_ids: cartid,
contents:
[{
id: cartid,
quantity: 1
}],
content_name: \"\",
currency: \"JPY\",
value: 50,
});
window.dataLayer.push({
event: 'ce_add_to_cart',
custom_event_name: 'ce_add_to_cart',
custom_product_id: cartid,
custom_product_name: '',
custom_quantity: 1,
custom_customer_id: '',
custom_user_agent: \$(\"#user_agent\").val(),
custom_is_ig: \$(\"#is_ig\").val(),
custom_is_line: \$(\"#is_line\").val(),
custom_referer: \$(\"#referer\").val(),
custom_real_ip: \$(\"#real_ip\").val(),
});
_lt('send', 'cv', {
type: 'add_to_cart'
},['d6fb195c-aa19-4109-8ea0-7b1d883fb349']);
";
}
// line 294
echo "
}).fail(function(data) {
alert('";
// line 296
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへの追加に失敗しました。"), "html", null, true);
echo "');
}).always(function(data) {
// Buttonを有効にする
\$('.add-cart').prop('disabled', false);
});
});
});
\$('.ec-modal-wrap').on('click', function(e) {
// モーダル内の処理は外側にバブリングさせない
e.stopPropagation();
});
\$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
\$('.ec-modal').hide()
});
// Lineバナークリックイベント
\$('#line_link_list').on('click', function(event) {
const currentPageUrl = window.location.href;
fbq('trackCustom', 'ce_click_line_btn', {
content_type: \"ClickLineBtn\",
content_name: currentPageUrl,
value: 50
});
window.dataLayer.push({
event: 'ce_click_line_btn',
custom_event_name: 'ce_click_line_btn',
custom_page_url: currentPageUrl,
custom_customer_id: '',
custom_user_agent: \$(\"#user_agent\").val(),
custom_is_ig: \$(\"#is_ig\").val(),
custom_is_line: \$(\"#is_line\").val(),
custom_referer: \$(\"#referer\").val(),
custom_real_ip: \$(\"#real_ip\").val(),
});
_lt('send', 'cv', {
type: 'ce_click_line_btn'
},['d6fb195c-aa19-4109-8ea0-7b1d883fb349']);
});
</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 342
public function block_main($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "main"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "main"));
// line 343
echo " ";
if ((twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["search_form"]) || array_key_exists("search_form", $context) ? $context["search_form"] : (function () { throw new RuntimeError('Variable "search_form" does not exist.', 343, $this->source); })()), "category_id", [], "any", false, false, true, 343), "vars", [], "any", false, false, true, 343), "errors", [], "any", false, false, true, 343)) > 0)) {
// line 344
echo " <div class=\"ec-searchnavRole\">
<p class=\"errormsg text-danger\">";
// line 345
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ご指定のカテゴリは存在しません"), "html", null, true);
echo "</p>
</div>
";
} else {
// line 348
echo " <div class=\"ec-searchnavRole\">
<form name=\"form1\" id=\"form1\" method=\"get\" action=\"?\">
";
// line 350
$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.', 350, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
// line 351
echo " <input type=\"hidden\" id=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "vars", [], "any", false, false, true, 351), "id", [], "any", false, false, true, 351), 351, $this->source), "html", null, true);
echo "\"
name=\"";
// line 352
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "vars", [], "any", false, false, true, 352), "full_name", [], "any", false, false, true, 352), 352, $this->source), "html", null, true);
echo "\"
";
// line 353
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "vars", [], "any", false, false, true, 353), "value", [], "any", false, false, true, 353))) {
echo "value=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "vars", [], "any", false, false, true, 353), "value", [], "any", false, false, true, 353), 353, $this->source), "html", null, true);
echo "\" ";
}
echo "/>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 355
echo " </form>
<div class=\"ec-searchnavRole__topicpath\" style=\"\">
<ol class=\"ec-topicpath\" style=\"border-top: none; border-bottom: 1px solid #ccc;\">
<div class=\"about_shikomel\">
<a href=\"https://shikomel.com/\" style=\"color: #337AB7;\" target=\"_blank\">
シコメルとは
<i class=\"far fa-question-circle\" style=\"margin-left: 5px;\"></i>
</a>
</div>
";
// line 365
echo " ";
if ( !(null === (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 365, $this->source); })()))) {
// line 366
echo " <div class=\"\" style=\"font-size: 11px; letter-spacing: normal; color: black;\">
<div><a href=\"";
// line 367
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("homepage");
echo "\" style=\"color: #337ab7;\">ホーム</a> > ";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 367, $this->source); })()), "name", [], "any", false, false, true, 367), 367, $this->source), "html", null, true);
echo "</div>
</div>
";
} elseif ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 369
(isset($context["search_form"]) || array_key_exists("search_form", $context) ? $context["search_form"] : (function () { throw new RuntimeError('Variable "search_form" does not exist.', 369, $this->source); })()), "vars", [], "any", false, false, true, 369), "value", [], "any", false, false, true, 369) && 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.', 369, $this->source); })()), "vars", [], "any", false, false, true, 369), "value", [], "any", false, false, true, 369), "name", [], "any", false, false, true, 369))) {
// line 370
echo " <div class=\"\" style=\"font-size: 11px; letter-spacing: normal; color: black;\">
<div><a href=\"";
// line 371
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("homepage");
echo "\" style=\"color: #337ab7;\">ホーム</a> > ";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("「%name%」に一致する商品一覧", ["%name%" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["search_form"]) || array_key_exists("search_form", $context) ? $context["search_form"] : (function () { throw new RuntimeError('Variable "search_form" does not exist.', 371, $this->source); })()), "vars", [], "any", false, false, true, 371), "value", [], "any", false, false, true, 371), "name", [], "any", false, false, true, 371)]), "html", null, true);
echo "</div>
</div>
";
} else {
// line 374
echo " <div class=\"\" style=\"font-size: 11px; letter-spacing: normal; color: black; max-width: 900px;\">
<div><a href=\"";
// line 375
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("homepage");
echo "\" style=\"color: #337ab7;\">ホーム</a> > 全ての商品</div>
</div>
";
}
// line 378
echo " </ol>
</div>
<div class=\"cu-ec-searchnavRole__infos\" style=\"margin-top: 10px; display: block;\">
";
// line 381
if ( !(null === (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 381, $this->source); })()))) {
// line 382
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 382, $this->source); })()), "path", [], "any", false, false, true, 382));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["Path"]) {
// line 383
echo " <div class=\"ec-topicpath__item";
if (twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, true, 383)) {
echo "--active";
}
echo "\">
<a href=\"";
// line 384
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
echo "?category_id=";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Path"], "id", [], "any", false, false, true, 384), 384, $this->source), "html", null, true);
echo "\" style=\"color: black; font-weight: bold; font-size: 14px;\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Path"], "name", [], "any", false, false, true, 384), 384, $this->source), "html", null, true);
echo "</a>
</div>
";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Path'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 387
echo " ";
} elseif ((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.', 387, $this->source); })()), "vars", [], "any", false, false, true, 387), "value", [], "any", false, false, true, 387) && 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.', 387, $this->source); })()), "vars", [], "any", false, false, true, 387), "value", [], "any", false, false, true, 387), "name", [], "any", false, false, true, 387))) {
// line 388
echo " <div class=\"ec-topicpath__item\" style=\"color: black; font-weight: bold; font-size: 16px;\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("「%name%」に一致する商品一覧", ["%name%" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["search_form"]) || array_key_exists("search_form", $context) ? $context["search_form"] : (function () { throw new RuntimeError('Variable "search_form" does not exist.', 388, $this->source); })()), "vars", [], "any", false, false, true, 388), "value", [], "any", false, false, true, 388), "name", [], "any", false, false, true, 388)]), "html", null, true);
echo "</div>
";
} else {
// line 390
echo " <div class=\"ec-topicpath__item\" style=\"color: black; font-weight: bold; font-size: 16px;\">全ての商品</div>
";
}
// line 392
echo " <div class=\"ec-searchnavRole__counter\" style=\"margin-top: 10px; margin-bottom: 0px; width: 100%;\">
";
// line 393
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.', 393, $this->source); })()), "totalItemCount", [], "any", false, false, true, 393) > 0)) {
// line 394
echo " ";
echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("<span class=\"ec-font-bold\" style=\"font-size: 13px; font-weight: 500; float: left; line-height: 32px;\">%count%件</span>", ["%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.', 394, $this->source); })()), "totalItemCount", [], "any", false, false, true, 394)]);
echo "
";
// line 395
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.', 395, $this->source); })()), "totalItemCount", [], "any", false, false, true, 395) > 0)) {
// line 396
echo " <div class=\"ec-searchnavRole__actions\" style=\"width: 100%;\">
<div class=\"ec-select\">
";
// line 399
echo " ";
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(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.', 399, $this->source); })()), "orderby", [], "any", false, false, true, 399), 399, $this->source), 'widget', ["id" => "", "attr" => ["class" => "order-by"]]);
echo "
</div>
</div>
";
}
// line 403
echo " ";
} else {
// line 404
echo " <span>";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お探しの商品は見つかりませんでした"), "html", null, true);
echo "</span>
";
}
// line 406
echo " </div>
</div>
</div>
";
// line 409
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.', 409, $this->source); })()), "totalItemCount", [], "any", false, false, true, 409) > 0)) {
// line 410
echo " <div class=\"ec-shelfRole\">
<ul class=\"ec-shelfGrid\">
";
// line 412
$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.', 412, $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 413
echo " <li class=\"product_li\">
<a href=\"";
// line 414
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, true, 414)]), "html", null, true);
echo "\">
<div class=\"ec-shelfGrid__item-image\" style=\"margin-bottom: 5px; position: relative; text-align: left;\">
<div>
<img class=\"product_image\" src=\"";
// line 417
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->extensions['Eccube\Twig\Extension\EccubeExtension']->getNoImageProduct($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "main_list_image", [], "any", false, false, true, 417), 417, $this->source)), "save_image"), "html", null, true);
echo "\" alt=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "name", [], "any", false, false, true, 417), 417, $this->source), "html", null, true);
echo "\" ";
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, true, 417) > 5)) {
echo " loading=\"lazy\"";
}
echo ">
";
// line 418
if ((twig_get_attribute($this->env, $this->source, $context["Product"], "is_original", [], "any", false, false, true, 418) == "1")) {
// line 419
echo " <span class=\"original\">オリジナル</span>
";
}
// line 421
echo " ";
if ((twig_get_attribute($this->env, $this->source, $context["Product"], "is_freeze", [], "any", false, false, true, 421) == "1")) {
// line 422
echo " <span class=\"freeze\">冷凍</span>
";
}
// line 424
echo " </div>
<div class=\"product_info\">
";
// line 427
echo " <p class=\"product_info__name\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "name", [], "any", false, false, true, 427), 427, $this->source), "html", null, true);
echo "</p>
";
// line 429
echo " ";
if (twig_get_attribute($this->env, $this->source, $context["Product"], "description_list", [], "any", false, false, true, 429)) {
// line 430
echo " <p class=\"product_info__description\">";
echo twig_nl2br($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "description_list", [], "any", false, false, true, 430), 430, $this->source));
echo "</p>
";
}
// line 432
echo " ";
// line 433
echo " <div>
<span class=\"product_info__unitCost\">";
// line 434
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "cost_per_unit", [], "any", false, false, true, 434), 434, $this->source), "html", null, true);
echo "</span>
";
// line 435
if (twig_get_attribute($this->env, $this->source, $context["Product"], "cost_per_unit_gram", [], "any", false, false, true, 435)) {
// line 436
echo " <span class=\"product_info__gramCost\">(";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "cost_per_unit_gram", [], "any", false, false, true, 436), 436, $this->source), "html", null, true);
echo ")</span>
";
}
// line 438
echo " </div>
";
// line 440
if ( !(null === twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice01Max", [], "any", false, false, true, 440))) {
// line 441
echo " <span class=\"ec-productRole__priceRegularPrice\" style=\"font-size: 12px;\">通常価格:</span><span class=\"ec-productRole__priceRegularPrice\" style=\"font-size: 14px; text-decoration: line-through;\">";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice01IncTaxMin", [], "any", false, false, true, 441), 441, $this->source)), "html", null, true);
echo "(<span style=\"font-size: 14px;\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "getStandardText", [], "any", false, false, true, 441), 441, $this->source), "html", null, true);
echo "</span>)</span>
<p style=\"font-size: 12px; margin: 2px 0px;\" class=\"price02-default\">
→";
// line 443
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMin", [], "any", false, false, true, 443), 443, $this->source)), "html", null, true);
echo "(<span style=\"font-size: 14px;\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "getStandardText", [], "any", false, false, true, 443), 443, $this->source), "html", null, true);
echo "</span>)
</p>
";
} else {
// line 446
echo " <p style=\"font-size: 12px; margin: 2px 0px;\" class=\"price02-default\">
";
// line 447
if ( !(null === twig_get_attribute($this->env, $this->source, $context["Product"], "getStandardText", [], "any", false, false, true, 447))) {
// line 448
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMin", [], "any", false, false, true, 448), 448, $this->source)), "html", null, true);
echo "(<span style=\"font-size: 12px;\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "getStandardText", [], "any", false, false, true, 448), 448, $this->source), "html", null, true);
echo "</span>)
";
} else {
// line 450
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMin", [], "any", false, false, true, 450), 450, $this->source)), "html", null, true);
echo "
";
}
// line 452
echo " </p>
";
}
// line 454
echo " ";
if (twig_get_attribute($this->env, $this->source, $context["Product"], "stock_find", [], "any", false, false, true, 454)) {
// line 455
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.', 455, $this->source); })()), twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, true, 455), [], "array", false, false, true, 455);
// line 456
echo " <form name=\"form";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, true, 456), 456, $this->source), "html", null, true);
echo "\" id=\"productForm";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, true, 456), 456, $this->source), "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, true, 456)]), "html", null, true);
echo "\" method=\"post\">
<div class=\"ec-productRole__actions\">
<div class=\"ec-numberInput\" style=\"display: none;\"><span>";
// line 458
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("数量"), "html", null, true);
echo "</span>
";
// line 459
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(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.', 459, $this->source); })()), "quantity", [], "any", false, false, true, 459), 459, $this->source), 'widget', ["attr" => ["class" => "quantity"]]);
echo "
";
// line 460
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(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.', 460, $this->source); })()), "quantity", [], "any", false, false, true, 460), 460, $this->source), 'errors');
echo "
</div>
</div>
";
// line 463
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 463, $this->source); })()), 463, $this->source), 'rest');
echo "
</form>
<div class=\"ec-productRole__btn\">
<button type=\"submit\" class=\"ec-blockBtn--action add-cart\" data-cartid=\"";
// line 466
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, true, 466), 466, $this->source), "html", null, true);
echo "\" form=\"productForm";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, true, 466), 466, $this->source), "html", null, true);
echo "\" style=\"height: 38px; font-weight: bold; line-height: 38px; font-size: 14px;\">
";
// line 467
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに追加"), "html", null, true);
echo "
</button>
</div>
";
} else {
// line 471
echo " <div class=\"ec-productRole__btn\">
<button type=\"button\" class=\"ec-blockBtn--cancel\" disabled=\"disabled\" style=\"height: 35px; font-weight: 500; line-height: normal; font-size: 14px;\">
";
// line 473
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("只今品切れ中です"), "html", null, true);
echo "
</button>
</div>
";
}
// line 477
echo " </div>
</div>
</a>
</li>
<hr class=\"product_hr\">
";
++$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 483
echo " </ul>
</div>
<div class=\"ec-modal\">
<div class=\"ec-modal-overlay\">
<div class=\"ec-modal-wrap\">
<span class=\"ec-modal-close\"><span class=\"ec-icon\"><img src=\"";
// line 488
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/icon/cross-dark.svg"), "html", null, true);
echo "\" alt=\"\"/></span></span>
<div id=\"ec-modal-header\" class=\"text-center\">";
// line 489
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに追加しました。"), "html", null, true);
echo "</div>
";
// line 491
echo " ";
// line 492
echo " ";
// line 493
echo " ";
// line 494
echo " ";
// line 495
echo " <div class=\"ec-modal-box\">
<div class=\"ec-role\">
<span class=\"ec-inlineBtn--cancel\">";
// line 497
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お買い物を続ける"), "html", null, true);
echo "</span>
<a href=\"";
// line 498
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("cart");
echo "\" class=\"ec-inlineBtn--action\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへ進む"), "html", null, true);
echo "</a>
</div>
</div>
</div>
</div>
</div>
<div class=\"ec-pagerRole\">
";
// line 505
$this->loadTemplate("pager.twig", "__string_template__7d553b6484c188d36805282a68be9e1d", 505)->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.', 505, $this->source); })()), "paginationData", [], "any", false, false, true, 505)]));
// line 506
echo " </div>
";
}
// line 508
echo " ";
}
// line 509
echo " ";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "__string_template__7d553b6484c188d36805282a68be9e1d";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 969 => 509, 966 => 508, 962 => 506, 960 => 505, 948 => 498, 944 => 497, 940 => 495, 938 => 494, 936 => 493, 934 => 492, 932 => 491, 928 => 489, 924 => 488, 917 => 483, 898 => 477, 891 => 473, 887 => 471, 880 => 467, 874 => 466, 868 => 463, 862 => 460, 858 => 459, 854 => 458, 844 => 456, 841 => 455, 838 => 454, 834 => 452, 828 => 450, 820 => 448, 818 => 447, 815 => 446, 807 => 443, 799 => 441, 797 => 440, 793 => 438, 787 => 436, 785 => 435, 781 => 434, 778 => 433, 776 => 432, 770 => 430, 767 => 429, 762 => 427, 758 => 424, 754 => 422, 751 => 421, 747 => 419, 745 => 418, 735 => 417, 729 => 414, 726 => 413, 709 => 412, 705 => 410, 703 => 409, 698 => 406, 692 => 404, 689 => 403, 681 => 399, 677 => 396, 675 => 395, 670 => 394, 668 => 393, 665 => 392, 661 => 390, 655 => 388, 652 => 387, 631 => 384, 624 => 383, 606 => 382, 604 => 381, 599 => 378, 593 => 375, 590 => 374, 582 => 371, 579 => 370, 577 => 369, 570 => 367, 567 => 366, 564 => 365, 553 => 355, 541 => 353, 537 => 352, 532 => 351, 528 => 350, 524 => 348, 518 => 345, 515 => 344, 512 => 343, 502 => 342, 447 => 296, 443 => 294, 395 => 248, 393 => 247, 382 => 239, 371 => 231, 360 => 223, 302 => 168, 273 => 141, 270 => 140, 268 => 139, 265 => 138, 263 => 137, 259 => 135, 245 => 134, 237 => 133, 220 => 132, 216 => 130, 206 => 129, 75 => 2, 65 => 1, 54 => 125, 52 => 127, 39 => 125,);
}
public function getSourceContext()
{
return new Source("{% block stylesheet %}
<style>
.ec-blockBtn--action {
background-color: #E65F6E;
border-radius: 5px;
}
.ec-blockBtn--cancel {
border-radius: 5px;
}
.freeze {
position: absolute;
top: 5px;
left: 5px;
width: 40px;
line-height: 1em;
padding: 5px 0;
background-color: #00B0EC;
color: white;
text-align: center;
font-size: 10px;
font-weight: 700;
border-radius: 5px;
margin-bottom: 5px;
}
.original {
position: absolute;
top: 5px;
left: 50px;
width: 60px;
line-height: 1em;
padding: 5px 0;
background-color: #fff100;
color: black;
text-align: center;
font-size: 10px;
font-weight: 700;
border-radius: 5px;
margin-bottom: 5px;
}
.ec-select {
margin-bottom: 5px;
}
.ec-select select {
font-size: 12px;
}
.ec-shelfRole img.product_image {
float: left;
width: 40%;
object-fit: cover;
height: 120px;
}
.product_info {
width: 60%; float: inline-end; padding-left: 5px;
}
.product_hr {
width: 100%; color: #DDDDDD;
}
.about_shikomel {
font-size: 14px; letter-spacing: normal; color: black; max-width: 120px; float: inline-end; display: none; font-weight: bold;
}
/* PC(画面幅768px以上)の場合 */
@media screen and (min-width: 768px) {
.ec-shelfGrid {
margin-left: 0px;
margin-right: 0px;
}
.ec-shelfRole img.product_image {
width: 100%;
height: auto;
}
.product_li {
width: 25%;
margin-bottom: 15px;
}
.product_li:nth-of-type(4n + 1) {
padding-left: 0px;
padding-right: 14px;
}
.product_li:nth-of-type(4n + 2) {
padding-left: 0px;
padding-right: 7px;
}
.product_li:nth-of-type(4n + 3) {
padding-left: 7px;
padding-right: 0px;
}
.product_li:nth-of-type(4n + 4) {
padding-left: 14px;
padding-right: 0px;
}
.product_info {
width: 100%;
padding-left: 0px;
margin-top: 10px;
}
.product_hr {
display: none;
}
.about_shikomel {
display: block;
}
}
</style>
{% endblock %}
{% 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 %}
};
{% set current_domain = app.request.getHost() %}
{% set is_prod = 'web-order.shikomel.com' in current_domain %}
{% set is_stg = 'web-order-stg.shikomel.com' in current_domain %}
\$(function() {
// 表示件数を変更
\$('.disp-number').change(function() {
var dispNumber = \$(this).val();
\$('#disp_number').val(dispNumber);
\$('#pageno').val(1);
\$(\"#form1\").submit();
});
// 並び順を変更
\$('.order-by').change(function() {
var orderBy = \$(this).val();
\$('#orderby').val(orderBy);
\$('#pageno').val(1);
\$(\"#form1\").submit();
});
\$('.add-cart').on('click', function(e) {
var \$form = \$(this).parents('li').find('form');
var cartid = \$(this).attr(\"data-cartid\");
// 個数フォームのチェック
var \$quantity = \$form.parent().find('.quantity');
if (\$quantity.val() < 1) {
\$quantity[0].setCustomValidity('{{ '1以上で入力してください。'|trans }}');
setTimeout(function() {
loadingOverlay('hide');
}, 100);
return true;
} else {
\$quantity[0].setCustomValidity('');
}
e.preventDefault();
\$.ajax({
url: \$form.attr('action'),
type: \$form.attr('method'),
data: \$form.serialize(),
dataType: 'json',
beforeSend: function(xhr, settings) {
// Buttonを無効にする
\$('.add-cart').prop('disabled', true);
}
}).done(function(data) {
// レスポンス内のメッセージをalertで表示
\$.each(data.messages, function() {
var \$cartBtn = \$('div.ec-modal-overlay').find('a.ec-inlineBtn--action');
\$cartBtn.removeAttr('disabled');
\$cartBtn.off('click');
// responseを判別
if(data.product_id !== undefined) {
var product_id = data.product_id;
var under_quantity = data.under_quantity;
// 最低購入数を下回る場合は、選択数量を最低購入数に変更
if(\$('#quantity' + product_id).length) {
\$('#quantity' + product_id).val(under_quantity);
} else {
\$('#quantity').val(under_quantity);
}
// カートに進むボタンを無効化
\$cartBtn.attr('disabled', 'disabled');
\$cartBtn.on('click', function() {
return false;
})
}
\$('#ec-modal-header').text(this);
});
\$('.ec-modal').show()
// カートブロックを更新する
\$.ajax({
url: '{{ url('block_cart') }}',
type: 'GET',
dataType: 'html'
}).done(function(html) {
\$('.ec-headerRole__cart').html(html);
});
\$.ajax({
url: '{{ url('modal_cart') }}',
type: 'GET',
dataType: 'html'
}).done(function(html) {
\$('.ec-Modalfooter__cart').html(html);
});
\$.ajax({
url: '{{ url('header_cart_icon') }}',
type: 'GET',
dataType: 'html'
}).done(function(html) {
console.log(html)
\$('.cart_icon_outer').html(html);
});
{% if is_prod %}
fbq('track', 'AddToCart', {
content_type: \"Product\",
content_ids: cartid,
contents:
[{
id: cartid,
quantity: 1
}],
content_name: \"\",
currency: \"JPY\",
value: 50,
});
fbq('trackCustom', 'ce_add_to_cart', {
content_type: \"Product\",
content_ids: cartid,
contents:
[{
id: cartid,
quantity: 1
}],
content_name: \"\",
currency: \"JPY\",
value: 50,
});
window.dataLayer.push({
event: 'ce_add_to_cart',
custom_event_name: 'ce_add_to_cart',
custom_product_id: cartid,
custom_product_name: '',
custom_quantity: 1,
custom_customer_id: '',
custom_user_agent: \$(\"#user_agent\").val(),
custom_is_ig: \$(\"#is_ig\").val(),
custom_is_line: \$(\"#is_line\").val(),
custom_referer: \$(\"#referer\").val(),
custom_real_ip: \$(\"#real_ip\").val(),
});
_lt('send', 'cv', {
type: 'add_to_cart'
},['d6fb195c-aa19-4109-8ea0-7b1d883fb349']);
{% endif %}
}).fail(function(data) {
alert('{{ 'カートへの追加に失敗しました。'|trans }}');
}).always(function(data) {
// Buttonを有効にする
\$('.add-cart').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()
});
// Lineバナークリックイベント
\$('#line_link_list').on('click', function(event) {
const currentPageUrl = window.location.href;
fbq('trackCustom', 'ce_click_line_btn', {
content_type: \"ClickLineBtn\",
content_name: currentPageUrl,
value: 50
});
window.dataLayer.push({
event: 'ce_click_line_btn',
custom_event_name: 'ce_click_line_btn',
custom_page_url: currentPageUrl,
custom_customer_id: '',
custom_user_agent: \$(\"#user_agent\").val(),
custom_is_ig: \$(\"#is_ig\").val(),
custom_is_line: \$(\"#is_line\").val(),
custom_referer: \$(\"#referer\").val(),
custom_real_ip: \$(\"#real_ip\").val(),
});
_lt('send', 'cv', {
type: 'ce_click_line_btn'
},['d6fb195c-aa19-4109-8ea0-7b1d883fb349']);
});
</script>
{% endblock %}
{% block main %}
{% 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\" style=\"\">
<ol class=\"ec-topicpath\" style=\"border-top: none; border-bottom: 1px solid #ccc;\">
<div class=\"about_shikomel\">
<a href=\"https://shikomel.com/\" style=\"color: #337AB7;\" target=\"_blank\">
シコメルとは
<i class=\"far fa-question-circle\" style=\"margin-left: 5px;\"></i>
</a>
</div>
{# パンくず #}
{% if Category is not null %}
<div class=\"\" style=\"font-size: 11px; letter-spacing: normal; color: black;\">
<div><a href=\"{{ url('homepage') }}\" style=\"color: #337ab7;\">ホーム</a> > {{ Category.name }}</div>
</div>
{% elseif search_form.vars.value and search_form.vars.value.name %}
<div class=\"\" style=\"font-size: 11px; letter-spacing: normal; color: black;\">
<div><a href=\"{{ url('homepage') }}\" style=\"color: #337ab7;\">ホーム</a> > {{ '「%name%」に一致する商品一覧'|trans({ '%name%': search_form.vars.value.name }) }}</div>
</div>
{% else %}
<div class=\"\" style=\"font-size: 11px; letter-spacing: normal; color: black; max-width: 900px;\">
<div><a href=\"{{ url('homepage') }}\" style=\"color: #337ab7;\">ホーム</a> > 全ての商品</div>
</div>
{% endif %}
</ol>
</div>
<div class=\"cu-ec-searchnavRole__infos\" style=\"margin-top: 10px; display: block;\">
{% if Category is not null %}
{% for Path in Category.path %}
<div class=\"ec-topicpath__item{% if loop.last %}--active{% endif %}\">
<a href=\"{{ url('product_list') }}?category_id={{ Path.id }}\" style=\"color: black; font-weight: bold; font-size: 14px;\">{{ Path.name }}</a>
</div>
{% endfor %}
{% elseif search_form.vars.value and search_form.vars.value.name %}
<div class=\"ec-topicpath__item\" style=\"color: black; font-weight: bold; font-size: 16px;\">{{ '「%name%」に一致する商品一覧'|trans({ '%name%': search_form.vars.value.name }) }}</div>
{% else %}
<div class=\"ec-topicpath__item\" style=\"color: black; font-weight: bold; font-size: 16px;\">全ての商品</div>
{% endif %}
<div class=\"ec-searchnavRole__counter\" style=\"margin-top: 10px; margin-bottom: 0px; width: 100%;\">
{% if pagination.totalItemCount > 0 %}
{{ '<span class=\"ec-font-bold\" style=\"font-size: 13px; font-weight: 500; float: left; line-height: 32px;\">%count%件</span>'|trans({ '%count%': pagination.totalItemCount })|raw }}
{% if pagination.totalItemCount > 0 %}
<div class=\"ec-searchnavRole__actions\" style=\"width: 100%;\">
<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 %}
{% else %}
<span>{{ 'お探しの商品は見つかりませんでした'|trans }}</span>
{% endif %}
</div>
</div>
</div>
{% if pagination.totalItemCount > 0 %}
<div class=\"ec-shelfRole\">
<ul class=\"ec-shelfGrid\">
{% for Product in pagination %}
<li class=\"product_li\">
<a href=\"{{ url('product_detail', {'id': Product.id}) }}\">
<div class=\"ec-shelfGrid__item-image\" style=\"margin-bottom: 5px; position: relative; text-align: left;\">
<div>
<img class=\"product_image\" src=\"{{ asset(Product.main_list_image|no_image_product, 'save_image') }}\" alt=\"{{ Product.name }}\" {% if loop.index > 5 %} loading=\"lazy\"{% endif %}>
{% if Product.is_original == '1' %}
<span class=\"original\">オリジナル</span>
{% endif %}
{% if Product.is_freeze == \"1\" %}
<span class=\"freeze\">冷凍</span>
{% endif %}
</div>
<div class=\"product_info\">
{# 商品名 #}
<p class=\"product_info__name\">{{ Product.name }}</p>
{# 商品説明_一覧 #}
{% if Product.description_list %}
<p class=\"product_info__description\">{{ Product.description_list|raw|nl2br }}</p>
{% endif %}
{# gあたり単価 #}
<div>
<span class=\"product_info__unitCost\">{{ Product.cost_per_unit }}</span>
{% if Product.cost_per_unit_gram %}
<span class=\"product_info__gramCost\">({{ Product.cost_per_unit_gram }})</span>
{% endif %}
</div>
{% if Product.getPrice01Max is not null %}
<span class=\"ec-productRole__priceRegularPrice\" style=\"font-size: 12px;\">通常価格:</span><span class=\"ec-productRole__priceRegularPrice\" style=\"font-size: 14px; text-decoration: line-through;\">{{ Product.getPrice01IncTaxMin|price }}(<span style=\"font-size: 14px;\">{{ Product.getStandardText }}</span>)</span>
<p style=\"font-size: 12px; margin: 2px 0px;\" class=\"price02-default\">
→{{ Product.getPrice02IncTaxMin|price }}(<span style=\"font-size: 14px;\">{{ Product.getStandardText }}</span>)
</p>
{% else %}
<p style=\"font-size: 12px; margin: 2px 0px;\" class=\"price02-default\">
{% if Product.getStandardText is not null %}
{{ Product.getPrice02IncTaxMin|price }}(<span style=\"font-size: 12px;\">{{ Product.getStandardText }}</span>)
{% else %}
{{ Product.getPrice02IncTaxMin|price }}
{% endif %}
</p>
{% endif %}
{% if Product.stock_find %}
{% set form = forms[Product.id] %}
<form name=\"form{{ Product.id }}\" id=\"productForm{{ Product.id }}\" action=\"{{ url('product_add_cart', {id:Product.id}) }}\" method=\"post\">
<div class=\"ec-productRole__actions\">
<div class=\"ec-numberInput\" style=\"display: none;\"><span>{{ '数量'|trans }}</span>
{{ form_widget(form.quantity, {'attr': {'class': 'quantity'}}) }}
{{ form_errors(form.quantity) }}
</div>
</div>
{{ form_rest(form) }}
</form>
<div class=\"ec-productRole__btn\">
<button type=\"submit\" class=\"ec-blockBtn--action add-cart\" data-cartid=\"{{ Product.id }}\" form=\"productForm{{ Product.id }}\" style=\"height: 38px; font-weight: bold; line-height: 38px; font-size: 14px;\">
{{ 'カートに追加'|trans }}
</button>
</div>
{% else %}
<div class=\"ec-productRole__btn\">
<button type=\"button\" class=\"ec-blockBtn--cancel\" disabled=\"disabled\" style=\"height: 35px; font-weight: 500; line-height: normal; font-size: 14px;\">
{{ '只今品切れ中です'|trans }}
</button>
</div>
{% endif %}
</div>
</div>
</a>
</li>
<hr class=\"product_hr\">
{% endfor %}
</ul>
</div>
<div class=\"ec-modal\">
<div class=\"ec-modal-overlay\">
<div class=\"ec-modal-wrap\">
<span class=\"ec-modal-close\"><span class=\"ec-icon\"><img src=\"{{ asset('assets/icon/cross-dark.svg') }}\" alt=\"\"/></span></span>
<div id=\"ec-modal-header\" class=\"text-center\">{{ 'カートに追加しました。'|trans }}</div>
{#<a href=\"https://liff.line.me/2006048095-AboZKM5Z/landing?follow=%40417jidxq&lp=sUu5Yu&liff_id=2006048095-AboZKM5Z\" id=\"line_link_list\">#}
{# <div style=\"margin: auto; text-align: center; margin-top: 20px;\">#}
{# <img src=\"{{ asset('assets/img/common/line_banner_float_3000.webp', 'user_data') }}\" alt=\"Line Banner\" style=\"margin: auto; width: 180px;\">#}
{# </div>#}
{#</a>#}
<div class=\"ec-modal-box\">
<div class=\"ec-role\">
<span class=\"ec-inlineBtn--cancel\">{{ 'お買い物を続ける'|trans }}</span>
<a href=\"{{ url('cart') }}\" class=\"ec-inlineBtn--action\">{{ 'カートへ進む'|trans }}</a>
</div>
</div>
</div>
</div>
</div>
<div class=\"ec-pagerRole\">
{% include \"pager.twig\" with {'pages': pagination.paginationData} %}
</div>
{% endif %}
{% endif %}
{% endblock %}", "__string_template__7d553b6484c188d36805282a68be9e1d", "");
}
public function checkSecurity()
{
static $tags = array("set" => 127, "for" => 132, "if" => 133, "include" => 505);
static $filters = array("escape" => 133, "raw" => 133, "trans" => 168, "length" => 343, "no_image_product" => 417, "nl2br" => 430, "price" => 441);
static $functions = array("class_categories_as_json" => 133, "url" => 223, "form_widget" => 399, "asset" => 417, "form_errors" => 460, "form_rest" => 463);
try {
$this->sandbox->checkSecurity(
['set', 'for', 'if', 'include'],
['escape', 'raw', 'trans', 'length', 'no_image_product', 'nl2br', 'price'],
['class_categories_as_json', 'url', 'form_widget', 'asset', 'form_errors', 'form_rest']
);
} catch (SecurityError $e) {
$e->setSourceContext($this->source);
if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
$e->setTemplateLine($tags[$e->getTagName()]);
} elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
$e->setTemplateLine($filters[$e->getFilterName()]);
} elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
$e->setTemplateLine($functions[$e->getFunctionName()]);
}
throw $e;
}
}
}