<?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;
/* Block/refine_check_item.twig */
class __TwigTemplate_dfd56c677a650e14f4187eaf4d86e69329a9beace8428fd65233c1b8f5b3588a extends \Eccube\Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
$this->sandbox = $this->env->getExtension('\Twig\Extension\SandboxExtension');
$this->checkSecurity();
}
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", "Block/refine_check_item.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Block/refine_check_item.twig"));
// line 11
if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_USER")) {
// line 12
if ((isset($context["Products"]) || array_key_exists("Products", $context) ? $context["Products"] : (function () { throw new RuntimeError('Variable "Products" does not exist.', 12, $this->source); })())) {
// line 13
echo " <div class=\"ec-shelfRole\">
<h2 class=\"ec-headingTitle\">";
// line 14
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("refine_check_item.check_item"), "html", null, true);
echo "</h2>
<ul class=\"ec-shelfGrid\">
";
// line 16
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["Products"]) || array_key_exists("Products", $context) ? $context["Products"] : (function () { throw new RuntimeError('Variable "Products" does not exist.', 16, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["ProductArray"]) {
// line 17
echo " ";
$context["Product"] = twig_get_attribute($this->env, $this->source, $context["ProductArray"], "Product", [], "any", false, false, true, 17);
// line 18
echo " ";
$context["hasStock"] = twig_get_attribute($this->env, $this->source, $context["ProductArray"], "hasStock", [], "any", false, false, true, 18);
// line 19
echo " <li class=\"ec-shelfGrid__item\">
<a href=\"";
// line 20
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_detail", ["id" => twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 20, $this->source); })()), "id", [], "any", false, false, true, 20)]), "html", null, true);
echo "\">
<div><img src=\"";
// line 21
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->extensions['Customize\Twig\Extension\EccubeExtension']->getNoImageProduct($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 21, $this->source); })()), "main_list_image", [], "any", false, false, true, 21), 21, $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, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 21, $this->source); })()), "name", [], "any", false, false, true, 21), 21, $this->source), "html", null, true);
echo "\"></div>
<dl>
<dt class=\"item_name\">";
// line 23
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 23, $this->source); })()), "name", [], "any", false, false, true, 23), 23, $this->source), "html", null, true);
echo "</dt>
<dd class=\"item_price\">
";
// line 25
if (twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 25, $this->source); })()), "hasProductClass", [], "any", false, false, true, 25)) {
// line 26
echo " ";
if ((twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 26, $this->source); })()), "getPrice02Min", [], "any", false, false, true, 26) == twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 26, $this->source); })()), "getPrice02Max", [], "any", false, false, true, 26))) {
// line 27
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Customize\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 27, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, true, 27), 27, $this->source)), "html", null, true);
echo "
";
} else {
// line 29
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Customize\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 29, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, true, 29), 29, $this->source)), "html", null, true);
echo " ~ ";
echo twig_escape_filter($this->env, $this->extensions['Customize\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 29, $this->source); })()), "getPrice02IncTaxMax", [], "any", false, false, true, 29), 29, $this->source)), "html", null, true);
echo "
";
}
// line 31
echo " ";
} else {
// line 32
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Customize\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 32, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, true, 32), 32, $this->source)), "html", null, true);
echo "
";
}
// line 34
echo " </dd>
<dd>
";
// line 36
if ((isset($context["hasStock"]) || array_key_exists("hasStock", $context) ? $context["hasStock"] : (function () { throw new RuntimeError('Variable "hasStock" does not exist.', 36, $this->source); })())) {
// line 37
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("refine_check_item.has_stock"), "html", null, true);
echo "
";
} else {
// line 39
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("refine_check_item.no_stock"), "html", null, true);
echo "
";
}
// line 41
echo " </dd>
</dl>
</a>
</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ProductArray'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 46
echo " </ul>
</div>
";
}
}
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "Block/refine_check_item.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 142 => 46, 132 => 41, 126 => 39, 120 => 37, 118 => 36, 114 => 34, 108 => 32, 105 => 31, 97 => 29, 91 => 27, 88 => 26, 86 => 25, 81 => 23, 74 => 21, 70 => 20, 67 => 19, 64 => 18, 61 => 17, 57 => 16, 52 => 14, 49 => 13, 47 => 12, 45 => 11,);
}
public function getSourceContext()
{
return new Source("{#
This file is part of Refine
Copyright(c) 2021 Refine Co.,Ltd. All Rights Reserved.
https://www.re-fine.jp/
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
{% if is_granted('ROLE_USER') %}
{% if Products %}
<div class=\"ec-shelfRole\">
<h2 class=\"ec-headingTitle\">{{ 'refine_check_item.check_item'|trans }}</h2>
<ul class=\"ec-shelfGrid\">
{% for ProductArray in Products %}
{% set Product = ProductArray.Product %}
{% set hasStock = ProductArray.hasStock %}
<li class=\"ec-shelfGrid__item\">
<a href=\"{{ url('product_detail', {'id': Product.id}) }}\">
<div><img src=\"{{ asset(Product.main_list_image|no_image_product, \"save_image\") }}\" alt=\"{{ Product.name }}\"></div>
<dl>
<dt class=\"item_name\">{{ Product.name }}</dt>
<dd class=\"item_price\">
{% if Product.hasProductClass %}
{% if Product.getPrice02Min == Product.getPrice02Max %}
{{ Product.getPrice02IncTaxMin|price }}
{% else %}
{{ Product.getPrice02IncTaxMin|price }} ~ {{ Product.getPrice02IncTaxMax|price }}
{% endif %}
{% else %}
{{ Product.getPrice02IncTaxMin|price }}
{% endif %}
</dd>
<dd>
{% if hasStock %}
{{ 'refine_check_item.has_stock'|trans }}
{% else %}
{{ 'refine_check_item.no_stock'|trans }}
{% endif %}
</dd>
</dl>
</a>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% endif %}", "Block/refine_check_item.twig", "/home/nmtokyolad01/tokyoladies-onlinestore.com/public_html/app/template/unishop/Block/refine_check_item.twig");
}
public function checkSecurity()
{
static $tags = array("if" => 11, "for" => 16, "set" => 17);
static $filters = array("escape" => 14, "trans" => 14, "no_image_product" => 21, "price" => 27);
static $functions = array("is_granted" => 11, "url" => 20, "asset" => 21);
try {
$this->sandbox->checkSecurity(
['if', 'for', 'set'],
['escape', 'trans', 'no_image_product', 'price'],
['is_granted', 'url', 'asset']
);
} 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;
}
}
}