<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* Product/list.twig */
class __TwigTemplate_d4ffc4a7b4630146e185c4c62eeaebf654a4c87937ec2b641602d15cdb88fa2a 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/list.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Product/list.twig"));
// line 13
$context["body_class"] = "product_page";
// line 11
$this->parent = $this->loadTemplate("default_frame.twig", "Product/list.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();
});
\$('.add-cart').on('click', function(e) {
var \$form = \$(this).parents('li').find('form');
// 個数フォームのチェック
var \$quantity = \$form.parent().find('.quantity');
if (\$quantity.val() < 1) {
\$quantity[0].setCustomValidity('";
// line 47
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("1以上で入力してください。"), "html", null, true);
echo "');
setTimeout(function() {
loadingOverlay('hide');
}, 100);
return true;
} else {
\$quantity[0].setCustomValidity('');
}
e.preventDefault();
\$.ajax({
url: \$form.attr('action'),
type: \$form.attr('method'),
data: \$form.serialize(),
dataType: 'json',
beforeSend: function(xhr, settings) {
// Buttonを無効にする
\$('.add-cart').prop('disabled', true);
}
}).done(function(data) {
// レスポンス内のメッセージをalertで表示
\$.each(data.messages, function() {
\$('#ec-modal-header').html(this);
});
\$('.ec-modal').show()
// カートブロックを更新する
\$.ajax({
url: '";
// line 75
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 82
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()
});
\$(function(){
\$('.mod_movie-btn-favorite').on('click', function(){
let loginStatus = ";
// line 102
echo (($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_USER")) ? ("true") : ("false"));
echo ";
if(loginStatus){
let pid = \$(this).data('pid');
let tmpbtn = \$(this);
// tmpbtn.children(\"input\").prop('disabled', true);
tmpbtn.children(\"input\").attr('disabled', true);
if(tmpbtn.hasClass('favorite__del')){
\$.ajax({
url: \"";
// line 112
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("homepage");
echo "refine_delete_favorite\",
type: 'GET',
dataType: 'text',
data: {id: pid}
})
.then(
function (data) {
tmpbtn.removeClass('favorite__del');
tmpbtn.addClass('favorite__add');
},
function () {
alert(\"処理に失敗しました。お手数ですが再度実行してください\");
});
} else {
\$.ajax({
url: \"";
// line 129
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("homepage");
echo "products/add_favorite/\"+pid,
type: 'POST',
})
.then(
function (data) {
tmpbtn.removeClass('favorite__add');
tmpbtn.addClass('favorite__del');
},
function () {
alert(\"処理に失敗しました。お手数ですが再度実行してください\");
});
}
// tmpbtn.children(\"input\").prop('disabled', false);
tmpbtn.children(\"input\").attr('disabled', false);
} else {
location.href= \"";
// line 146
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("mypage_delivery");
echo "\";
}
});
});
</script>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 155
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 156
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.', 156, $this->source); })()), "category_id", [], "any", false, false, false, 156), "vars", [], "any", false, false, false, 156), "errors", [], "any", false, false, false, 156)) > 0)) {
// line 157
echo " <div class=\"ec-searchnavRole content__inner\">
<p class=\"errormsg text-danger\">";
// line 158
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ご指定のカテゴリは存在しません"), "html", null, true);
echo "</p>
</div>
";
} else {
// line 161
echo " <div class=\"ec-searchnavRole content__inner\">
<form name=\"form1\" id=\"form1\" method=\"get\" action=\"?\">
";
// line 163
$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.', 163, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
// line 164
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, 164), "id", [], "any", false, false, false, 164), "html", null, true);
echo "\"
name=\"";
// line 165
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, 165), "full_name", [], "any", false, false, false, 165), "html", null, true);
echo "\"
";
// line 166
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, 166), "value", [], "any", false, false, false, 166))) {
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, 166), "value", [], "any", false, false, false, 166), "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 168
echo " </form>
<div class=\"ec-searchnavRole__topicpath\">
<ol class=\"ec-topicpath\">
<li class=\"ec-topicpath__item\"><a href=\"";
// line 171
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
echo "\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("全て"), "html", null, true);
echo "</a>
</li>
";
// line 173
if ( !(null === (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 173, $this->source); })()))) {
// line 174
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.', 174, $this->source); })()), "path", [], "any", false, false, false, 174));
$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 175
echo " <li class=\"ec-topicpath__divider\">|</li>
<li class=\"ec-topicpath__item";
// line 176
if (twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, false, 176)) {
echo "--active";
}
echo "\"><a
href=\"";
// line 177
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
echo "?category_id=";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Path"], "id", [], "any", false, false, false, 177), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Path"], "name", [], "any", false, false, false, 177), "html", null, true);
echo "</a>
</li>
";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Path'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 180
echo " ";
}
// line 181
echo " ";
if ((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.', 181, $this->source); })()), "vars", [], "any", false, false, false, 181), "value", [], "any", false, false, false, 181) && 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.', 181, $this->source); })()), "vars", [], "any", false, false, false, 181), "value", [], "any", false, false, false, 181), "name", [], "any", false, false, false, 181))) {
// line 182
echo " <li class=\"ec-topicpath__divider\">|</li>
<li class=\"ec-topicpath__item\">";
// line 183
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.', 183, $this->source); })()), "vars", [], "any", false, false, false, 183), "value", [], "any", false, false, false, 183), "name", [], "any", false, false, false, 183)]), "html", null, true);
echo "</li>
";
}
// line 185
echo " </ol>
</div>
<div class=\"ec-searchnavRole__infos\">
<div class=\"ec-searchnavRole__counter\">
";
// line 189
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.', 189, $this->source); })()), "totalItemCount", [], "any", false, false, false, 189) > 0)) {
// line 190
echo " ";
echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("<span class=\"ec-font-bold\">%count%件</span><span>の動画が見つかりました</span>", ["%count%" => twig_get_attribute($this->env, $this->source, (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)]);
echo "
";
} else {
// line 192
echo " <span>";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お探しの動画は見つかりませんでした"), "html", null, true);
echo "</span>
";
}
// line 194
echo " </div>
";
// line 195
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.', 195, $this->source); })()), "totalItemCount", [], "any", false, false, false, 195) > 0)) {
// line 196
echo " <div class=\"ec-searchnavRole__actions\">
<div class=\"ec-select\">
";
// line 198
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock((isset($context["disp_number_form"]) || array_key_exists("disp_number_form", $context) ? $context["disp_number_form"] : (function () { throw new RuntimeError('Variable "disp_number_form" does not exist.', 198, $this->source); })()), 'widget', ["id" => "", "attr" => ["class" => "disp-number"]]);
echo "
";
// line 199
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock((isset($context["order_by_form"]) || array_key_exists("order_by_form", $context) ? $context["order_by_form"] : (function () { throw new RuntimeError('Variable "order_by_form" does not exist.', 199, $this->source); })()), 'widget', ["id" => "", "attr" => ["class" => "order-by"]]);
echo "
</div>
</div>
";
}
// line 203
echo " </div>
</div>
";
// line 205
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.', 205, $this->source); })()), "totalItemCount", [], "any", false, false, false, 205) > 0)) {
// line 206
echo " <div class=\"page__content\">
<div class=\"page__inner\">
<ul class=\"mod_movie-list\">
";
// line 210
$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.', 210, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["Product"]) {
// line 211
echo " ";
$context["isFavorite"] = ( !twig_test_empty(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.', 211, $this->source); })()), "user", [], "any", false, false, false, 211)) && twig_get_attribute($this->env, $this->source, call_user_func_array($this->env->getFunction('repository')->getCallable(), ["Eccube\\Entity\\CustomerFavoriteProduct"]), "isFavorite", [0 => 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.', 211, $this->source); })()), "user", [], "any", false, false, false, 211), 1 => $context["Product"]], "method", false, false, false, 211));
// line 212
echo " ";
// line 213
echo " ";
$context["productClass"] = twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["Product"], "ProductClasses", [], "any", false, false, false, 213), "get", [0 => 0], "method", false, false, false, 213);
// line 214
echo " ";
$context["videoContent"] = twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["productClass"]) || array_key_exists("productClass", $context) ? $context["productClass"] : (function () { throw new RuntimeError('Variable "productClass" does not exist.', 214, $this->source); })()), "ProductClassContent", [], "any", false, false, false, 214), "get", [0 => 0], "method", false, false, false, 214);
// line 215
echo " ";
if ( !twig_test_empty((isset($context["videoContent"]) || array_key_exists("videoContent", $context) ? $context["videoContent"] : (function () { throw new RuntimeError('Variable "videoContent" does not exist.', 215, $this->source); })()))) {
// line 216
echo " ";
$context["anker"] = $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("video/{product_id}/content/{content_id}", ["product_id" => twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, false, 216), "content_id" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["videoContent"]) || array_key_exists("videoContent", $context) ? $context["videoContent"] : (function () { throw new RuntimeError('Variable "videoContent" does not exist.', 216, $this->source); })()), "Content", [], "any", false, false, false, 216), "id", [], "any", false, false, false, 216)]);
// line 217
echo " ";
} else {
// line 218
echo " ";
$context["anker"] = $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, 218)]);
// line 219
echo " ";
}
// line 220
echo "
<li class=\"mod_movie-item\">
<div class=\"mod_movie-item-inner\">
<div class=\"mod_movie-img-wrapper\">
<a href=\"";
// line 224
echo twig_escape_filter($this->env, (isset($context["anker"]) || array_key_exists("anker", $context) ? $context["anker"] : (function () { throw new RuntimeError('Variable "anker" does not exist.', 224, $this->source); })()), "html", null, true);
echo "\">
";
// line 225
if ((twig_get_attribute($this->env, $this->source, $context["Product"], "ProductImage", [], "any", true, true, false, 225) && !twig_test_empty(twig_get_attribute($this->env, $this->source, $context["Product"], "ProductImage", [], "any", false, false, false, 225)))) {
// line 226
echo " <img src=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["Product"], "ProductImage", [], "any", false, false, false, 226), "get", [0 => 0], "method", false, false, false, 226), "save_image"), "html", null, true);
echo "\" alt=\"Product.name\" />
";
} else {
// line 228
echo " <img src=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->extensions['Eccube\Twig\Extension\EccubeExtension']->getNoImageProduct(""), "save_image"), "html", null, true);
echo "\" alt=\"\" />
";
}
// line 230
echo " </a>
</div>
<div class=\"mod_movie-text-wrapper\">
<a href=\"";
// line 233
echo twig_escape_filter($this->env, (isset($context["anker"]) || array_key_exists("anker", $context) ? $context["anker"] : (function () { throw new RuntimeError('Variable "anker" does not exist.', 233, $this->source); })()), "html", null, true);
echo "\" class=\"mod_movie-title\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(twig_get_attribute($this->env, $this->source, $context["Product"], "name", [], "any", false, false, false, 233)), "html", null, true);
echo "</a>
";
// line 234
$context["searchWords"] = twig_split_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Product"], "search_word", [], "any", false, false, false, 234), ",");
// line 235
echo " <ul class=\"mod_movie-keyword-list\">
";
// line 236
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["searchWords"]) || array_key_exists("searchWords", $context) ? $context["searchWords"] : (function () { throw new RuntimeError('Variable "searchWords" does not exist.', 236, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["word"]) {
// line 237
echo " ";
if ( !twig_test_empty($context["word"])) {
// line 238
echo " <li class=\"mod_movie-keyword-item\">
<span>";
// line 239
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans($context["word"]), "html", null, true);
echo "</span>
</li>
";
}
// line 242
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['word'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 243
echo " </ul>
<div class=\"mod_movie-btn-wrapper\">
<div class=\"mod_movie-btn-favorite ";
// line 245
echo ((((isset($context["isFavorite"]) || array_key_exists("isFavorite", $context) ? $context["isFavorite"] : (function () { throw new RuntimeError('Variable "isFavorite" does not exist.', 245, $this->source); })()) == 1)) ? ("favorite__del") : ("favorite__add"));
echo "\" data-pid=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, false, 245), "html", null, true);
echo "\">
<input type=\"button\" class=\"favorite-btn\" value=\"";
// line 246
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("見たい授業"), "html", null, true);
echo "\" />
</div>
<a href=\"";
// line 248
echo twig_escape_filter($this->env, (isset($context["anker"]) || array_key_exists("anker", $context) ? $context["anker"] : (function () { throw new RuntimeError('Variable "anker" does not exist.', 248, $this->source); })()), "html", null, true);
echo "\" class=\"mod_movie-btn-watch\">
<span>";
// line 249
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("見る"), "html", null, true);
echo "</span>
</a>
</div>
</div>
</div>
</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Product'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 257
echo "
</ul>
</div>
</div>
";
// line 265
echo " ";
// line 289
echo "
";
// line 325
echo "
";
// line 344
echo "
<div class=\"ec-pagerRole\">
";
// line 347
$this->loadTemplate("pager.twig", "Product/list.twig", 347)->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.', 347, $this->source); })()), "paginationData", [], "any", false, false, false, 347)]));
// line 348
echo " </div>
";
}
// line 350
echo " ";
}
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "Product/list.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 610 => 350, 606 => 348, 604 => 347, 599 => 344, 596 => 325, 593 => 289, 591 => 265, 582 => 257, 568 => 249, 564 => 248, 559 => 246, 553 => 245, 549 => 243, 543 => 242, 537 => 239, 534 => 238, 531 => 237, 527 => 236, 524 => 235, 522 => 234, 516 => 233, 511 => 230, 505 => 228, 499 => 226, 497 => 225, 493 => 224, 487 => 220, 484 => 219, 481 => 218, 478 => 217, 475 => 216, 472 => 215, 469 => 214, 466 => 213, 464 => 212, 461 => 211, 457 => 210, 451 => 206, 449 => 205, 445 => 203, 438 => 199, 434 => 198, 430 => 196, 428 => 195, 425 => 194, 419 => 192, 413 => 190, 411 => 189, 405 => 185, 400 => 183, 397 => 182, 394 => 181, 391 => 180, 370 => 177, 364 => 176, 361 => 175, 343 => 174, 341 => 173, 334 => 171, 329 => 168, 317 => 166, 313 => 165, 308 => 164, 304 => 163, 300 => 161, 294 => 158, 291 => 157, 288 => 156, 278 => 155, 260 => 146, 240 => 129, 220 => 112, 207 => 102, 184 => 82, 174 => 75, 143 => 47, 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();
});
\$('.add-cart').on('click', function(e) {
var \$form = \$(this).parents('li').find('form');
// 個数フォームのチェック
var \$quantity = \$form.parent().find('.quantity');
if (\$quantity.val() < 1) {
\$quantity[0].setCustomValidity('{{ '1以上で入力してください。'|trans }}');
setTimeout(function() {
loadingOverlay('hide');
}, 100);
return true;
} else {
\$quantity[0].setCustomValidity('');
}
e.preventDefault();
\$.ajax({
url: \$form.attr('action'),
type: \$form.attr('method'),
data: \$form.serialize(),
dataType: 'json',
beforeSend: function(xhr, settings) {
// Buttonを無効にする
\$('.add-cart').prop('disabled', true);
}
}).done(function(data) {
// レスポンス内のメッセージをalertで表示
\$.each(data.messages, function() {
\$('#ec-modal-header').html(this);
});
\$('.ec-modal').show()
// カートブロックを更新する
\$.ajax({
url: '{{ url('block_cart') }}',
type: 'GET',
dataType: 'html'
}).done(function(html) {
\$('.ec-headerRole__cart').html(html);
});
}).fail(function(data) {
alert('{{ 'カートへの追加に失敗しました。'|trans }}');
}).always(function(data) {
// Buttonを有効にする
\$('.add-cart').prop('disabled', false);
});
});
});
\$('.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()
});
\$(function(){
\$('.mod_movie-btn-favorite').on('click', function(){
let loginStatus = {{ is_granted('ROLE_USER') ? 'true' : 'false' }};
if(loginStatus){
let pid = \$(this).data('pid');
let tmpbtn = \$(this);
// tmpbtn.children(\"input\").prop('disabled', true);
tmpbtn.children(\"input\").attr('disabled', true);
if(tmpbtn.hasClass('favorite__del')){
\$.ajax({
url: \"{{ url('homepage') }}refine_delete_favorite\",
type: 'GET',
dataType: 'text',
data: {id: pid}
})
.then(
function (data) {
tmpbtn.removeClass('favorite__del');
tmpbtn.addClass('favorite__add');
},
function () {
alert(\"処理に失敗しました。お手数ですが再度実行してください\");
});
} else {
\$.ajax({
url: \"{{ url('homepage') }}products/add_favorite/\"+pid,
type: 'POST',
})
.then(
function (data) {
tmpbtn.removeClass('favorite__add');
tmpbtn.addClass('favorite__del');
},
function () {
alert(\"処理に失敗しました。お手数ですが再度実行してください\");
});
}
// tmpbtn.children(\"input\").prop('disabled', false);
tmpbtn.children(\"input\").attr('disabled', false);
} else {
location.href= \"{{ url('mypage_delivery') }}\";
}
});
});
</script>
{% endblock %}
{% block main %}
{% if search_form.category_id.vars.errors|length > 0 %}
<div class=\"ec-searchnavRole content__inner\">
<p class=\"errormsg text-danger\">{{ 'ご指定のカテゴリは存在しません'|trans }}</p>
</div>
{% else %}
<div class=\"ec-searchnavRole content__inner\">
<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 %}
{{ '<span class=\"ec-font-bold\">%count%件</span><span>の動画が見つかりました</span>'|trans({ '%count%': pagination.totalItemCount })|raw }}
{% else %}
<span>{{ 'お探しの動画は見つかりませんでした'|trans }}</span>
{% endif %}
</div>
{% if pagination.totalItemCount > 0 %}
<div class=\"ec-searchnavRole__actions\">
<div class=\"ec-select\">
{{ form_widget(disp_number_form, {'id': '', 'attr': {'class': 'disp-number'}}) }}
{{ form_widget(order_by_form, {'id': '', 'attr': {'class': 'order-by'}}) }}
</div>
</div>
{% endif %}
</div>
</div>
{% if pagination.totalItemCount > 0 %}
<div class=\"page__content\">
<div class=\"page__inner\">
<ul class=\"mod_movie-list\">
{% for Product in pagination %}
{% set isFavorite = app.user is not empty and repository('Eccube\\\\Entity\\\\CustomerFavoriteProduct').isFavorite(app.user, Product) %}
{# 配信コンテンツ #}
{% set productClass = Product.ProductClasses.get(0) %}
{% set videoContent = productClass.ProductClassContent.get(0) %}
{% if videoContent is not empty %}
{% set anker = url('video/{product_id}/content/{content_id}', {'product_id': Product.id, 'content_id': videoContent.Content.id}) %}
{% else %}
{% set anker = url('product_detail', {'id': Product.id}) %}
{% endif %}
<li class=\"mod_movie-item\">
<div class=\"mod_movie-item-inner\">
<div class=\"mod_movie-img-wrapper\">
<a href=\"{{ anker }}\">
{% if Product.ProductImage is defined and Product.ProductImage is not empty %}
<img src=\"{{ asset(Product.ProductImage.get(0), 'save_image') }}\" alt=\"Product.name\" />
{% else %}
<img src=\"{{ asset(''|no_image_product, 'save_image') }}\" alt=\"\" />
{% endif %}
</a>
</div>
<div class=\"mod_movie-text-wrapper\">
<a href=\"{{ anker }}\" class=\"mod_movie-title\">{{ Product.name|trans }}</a>
{% set searchWords = Product.search_word|split(',') %}
<ul class=\"mod_movie-keyword-list\">
{% for word in searchWords %}
{% if word is not empty %}
<li class=\"mod_movie-keyword-item\">
<span>{{ word|trans }}</span>
</li>
{% endif %}
{% endfor %}
</ul>
<div class=\"mod_movie-btn-wrapper\">
<div class=\"mod_movie-btn-favorite {{ (isFavorite == 1) ? 'favorite__del': 'favorite__add' }}\" data-pid=\"{{ Product.id }}\">
<input type=\"button\" class=\"favorite-btn\" value=\"{{ '見たい授業'|trans }}\" />
</div>
<a href=\"{{ anker }}\" class=\"mod_movie-btn-watch\">
<span>{{ '見る'|trans }}</span>
</a>
</div>
</div>
</div>
</li>
{% endfor %}
</ul>
</div>
</div>
{# 元々のソース #}
{# <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}) }}\">
<p class=\"ec-shelfGrid__item-image\">
<img src=\"{{ asset(Product.main_list_image|no_image_product, 'save_image') }}\" alt=\"{{ Product.name }}\" loading=\"lazy\">
</p>
<p>{{ Product.name }}</p>
{% if Product.description_list %}
<p>{{ Product.description_list|raw|nl2br }}</p>
{% endif %}
<p class=\"price02-default\">
{% 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>
</a> #}
{# {% if Product.stock_find %}
{% set form = forms[Product.id] %}
<form name=\"form{{ Product.id }}\" id=\"productForm{{ Product.id }}\" action=\"{{ url('product_add_cart', {id:Product.id}) }}\" method=\"post\">
<div class=\"ec-productRole__actions\">
{% if form.classcategory_id1 is defined %}
<div class=\"ec-select\">
{{ form_widget(form.classcategory_id1) }}
{{ form_errors(form.classcategory_id1) }}
</div>
{% if form.classcategory_id2 is defined %}
<div class=\"ec-select\">
{{ form_widget(form.classcategory_id2) }}
{{ form_errors(form.classcategory_id2) }}
</div>
{% endif %}
{% endif %}
<div class=\"ec-numberInput\"><span>{{ '数量'|trans }}</span>
{{ form_widget(form.quantity, {'attr': {'class': 'quantity'}}) }}
{{ form_errors(form.quantity) }}
</div>
</div>
{{ form_rest(form) }}
</form>
<div class=\"ec-productRole__btn\">
<button type=\"submit\" class=\"ec-blockBtn--action add-cart\" data-cartid=\"{{ Product.id }}\" form=\"productForm{{ Product.id }}\">
{{ 'カートに入れる'|trans }}
</button>
</div>
{% else %}
<div class=\"ec-productRole__btn\">
<button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
{{ 'ただいま品切れ中です。'|trans }}
</button>
</div>
{% endif %} #}
{# </li>
{% endfor %}
</ul>
</div>
<div class=\"ec-modal\">
<div class=\"ec-modal-overlay\">
<div class=\"ec-modal-wrap\">
<span class=\"ec-modal-close\"><span class=\"ec-icon\"><img src=\"{{ asset('assets/icon/cross-dark.svg') }}\" alt=\"\"/></span></span>
<div id=\"ec-modal-header\" class=\"text-center\">{{ 'カートに追加しました。'|trans }}</div>
<div class=\"ec-modal-box\">
<div class=\"ec-role\">
<span class=\"ec-inlineBtn--cancel\">{{ 'お買い物を続ける'|trans }}</span>
<a href=\"{{ url('cart') }}\" class=\"ec-inlineBtn--action\">{{ 'カートへ進む'|trans }}</a>
</div>
</div>
</div>
</div>
</div> #}
<div class=\"ec-pagerRole\">
{% include \"pager.twig\" with {'pages': pagination.paginationData} %}
</div>
{% endif %}
{% endif %}
{% endblock %}", "Product/list.twig", "/home/mahjontv1326/kmj-tv.jp/public_html/dev.kmj-tv.jp/app/template/default/Product/list.twig");
}
}