<?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/product_lists.twig */
class __TwigTemplate_aa93a4471daba7a7302cbdf7e0c008b9ebe0cfa3293687d371d0d412a21ba25e 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 = [
];
}
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/product_lists.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Block/product_lists.twig"));
// line 1
echo "text
<div class=\"ec-role mt-1\">
<div class=\"d-flex flex-column flex-md-row justify-content-between\">
<h2 class=\"ec-secHeading mt-0\">
<span class=\"ec-secHeading__en\">PRODUCTS</span>
<span class=\"ec-secHeading__line\"></span>
<span class=\"ec-secHeading__ja\">製品一覧</span>
</h2>
<div class=\"d-none d-md-block ec-headerNaviRole__search\">
";
// line 11
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("block_search_product"));
echo "
</div>
</div>
";
// line 16
echo " ";
$context["tags"] = twig_get_attribute($this->env, $this->source, $this->env->getFunction('repository')->getCallable()("Eccube\\Entity\\Tag"), "findAll", [], "method", false, false, false, 16);
// line 17
echo " ";
if ((twig_length_filter($this->env, (isset($context["tags"]) || array_key_exists("tags", $context) ? $context["tags"] : (function () { throw new RuntimeError('Variable "tags" does not exist.', 17, $this->source); })())) > 0)) {
// line 18
echo " <div class=\"tag-list mt-2\">
<ul class=\"d-flex gap-1\" style=\"padding-left:0\">
";
// line 20
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["tags"]) || array_key_exists("tags", $context) ? $context["tags"] : (function () { throw new RuntimeError('Variable "tags" does not exist.', 20, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["tag"]) {
// line 21
echo " ";
$context["isActive"] = (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.', 21, $this->source); })()), "request", [], "any", false, false, false, 21), "get", [0 => "tag_id"], "method", false, false, false, 21) == twig_get_attribute($this->env, $this->source, $context["tag"], "id", [], "any", false, false, false, 21));
// line 22
echo " <li class=\"\">
<a class=\"btn btn-sm btn-outline-secondary";
// line 23
if ((isset($context["isActive"]) || array_key_exists("isActive", $context) ? $context["isActive"] : (function () { throw new RuntimeError('Variable "isActive" does not exist.', 23, $this->source); })())) {
echo " btn-primary";
}
echo "\" href=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list", ["tag_id" => twig_get_attribute($this->env, $this->source, $context["tag"], "id", [], "any", false, false, false, 23)]), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["tag"], "name", [], "any", false, false, false, 23), "html", null, true);
echo "</a>
</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['tag'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 26
echo " </ul>
</div>
";
}
// line 29
echo "
";
// line 31
echo " ";
// line 32
echo " ";
// line 33
echo " ";
// line 34
echo " ";
// line 35
echo " ";
// line 36
echo "
";
// line 38
if ( !(null === (isset($context["products"]) || array_key_exists("products", $context) ? $context["products"] : (function () { throw new RuntimeError('Variable "products" does not exist.', 38, $this->source); })()))) {
// line 39
echo " <div class=\"ec-newItemRole pt-2\">
<div class=\"ec-shelfGrid\">
";
// line 41
$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.', 41, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["product"]) {
// line 42
echo " <div class=\"ec-shelfGrid__item\">
<a href=\"";
// line 43
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_detail", ["id" => twig_get_attribute($this->env, $this->source, $context["product"], "id", [], "any", false, false, false, 43)]), "html", null, true);
echo "\">
<img src=\"";
// line 44
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->extensions['Eccube\Twig\Extension\EccubeExtension']->getNoImageProduct(twig_get_attribute($this->env, $this->source, $context["product"], "main_list_image", [], "any", false, false, false, 44)), "save_image"), "html", null, true);
echo "\">
<p class=\"ec-newItemRole__listItemTitle\">";
// line 45
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "name", [], "any", false, false, false, 45), "html", null, true);
echo "</p>
<p class=\"ec-newItemRole__listItemPrice\">
";
// line 47
if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_USER")) {
// line 48
echo " ";
if (twig_get_attribute($this->env, $this->source, $context["product"], "hasProductClass", [], "any", false, false, false, 48)) {
// line 49
echo " ";
if ((twig_get_attribute($this->env, $this->source, $context["product"], "getPrice02Min", [], "any", false, false, false, 49) == twig_get_attribute($this->env, $this->source, $context["product"], "getPrice02Max", [], "any", false, false, false, 49))) {
// line 50
echo " ";
$context["getPrice02NoTaxMin"] = ceil((twig_get_attribute($this->env, $this->source, $context["product"], "getPrice02IncTaxMin", [], "any", false, false, false, 50) / 1.100000000000000088817841970012523233890533447265625));
// line 51
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env, $this->source, $context["product"], "getPrice02IncTaxMin", [], "any", false, false, false, 51)), "html", null, true);
echo "(税込)/
";
// line 52
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter((isset($context["getPrice02NoTaxMin"]) || array_key_exists("getPrice02NoTaxMin", $context) ? $context["getPrice02NoTaxMin"] : (function () { throw new RuntimeError('Variable "getPrice02NoTaxMin" does not exist.', 52, $this->source); })())), "html", null, true);
echo "(税抜)
";
} else {
// line 54
echo " ";
$context["getPrice02NoTaxMin"] = ceil((twig_get_attribute($this->env, $this->source, $context["product"], "getPrice02IncTaxMin", [], "any", false, false, false, 54) / 1.100000000000000088817841970012523233890533447265625));
// line 55
echo " ";
$context["getPrice02NoTaxMax"] = ceil((twig_get_attribute($this->env, $this->source, $context["product"], "getPrice02IncTaxMax", [], "any", false, false, false, 55) / 1.100000000000000088817841970012523233890533447265625));
// line 56
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env, $this->source, $context["product"], "getPrice02IncTaxMin", [], "any", false, false, false, 56)), "html", null, true);
echo " ~ ";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env, $this->source, $context["product"], "getPrice02IncTaxMax", [], "any", false, false, false, 56)), "html", null, true);
echo "(税込)/<br>
";
// line 57
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter((isset($context["getPrice02NoTaxMin"]) || array_key_exists("getPrice02NoTaxMin", $context) ? $context["getPrice02NoTaxMin"] : (function () { throw new RuntimeError('Variable "getPrice02NoTaxMin" does not exist.', 57, $this->source); })())), "html", null, true);
echo " ~ ";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter((isset($context["getPrice02NoTaxMax"]) || array_key_exists("getPrice02NoTaxMax", $context) ? $context["getPrice02NoTaxMax"] : (function () { throw new RuntimeError('Variable "getPrice02NoTaxMax" does not exist.', 57, $this->source); })())), "html", null, true);
echo "(税抜)
";
}
// line 59
echo " ";
} else {
// line 60
echo " ";
$context["getPrice02NoTaxMin"] = ceil((twig_get_attribute($this->env, $this->source, $context["product"], "getPrice02IncTaxMin", [], "any", false, false, false, 60) / 1.100000000000000088817841970012523233890533447265625));
// line 61
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env, $this->source, $context["product"], "getPrice02IncTaxMin", [], "any", false, false, false, 61)), "html", null, true);
echo "(税込)/
";
// line 62
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter((isset($context["getPrice02NoTaxMin"]) || array_key_exists("getPrice02NoTaxMin", $context) ? $context["getPrice02NoTaxMin"] : (function () { throw new RuntimeError('Variable "getPrice02NoTaxMin" does not exist.', 62, $this->source); })())), "html", null, true);
echo "(税抜)
";
}
// line 64
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["product"], "ProductClasses", [], "any", false, false, false, 64));
foreach ($context['_seq'] as $context["_key"] => $context["productClass"]) {
// line 65
echo " <p class=\"ec-newItemRole__listItemPrice\">在庫数:";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["productClass"], "getSaleLimit", [], "method", false, false, false, 65), "html", null, true);
echo "</p>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['productClass'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 67
echo " ";
} else {
// line 68
echo " 価格・在庫数:お問い合わせください
";
}
// line 70
echo " </p>
</a>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['product'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 74
echo " </div>
</div>
";
}
// line 77
echo " ";
// line 78
echo " <div class=\"d-md-none ec-headerNaviRole__search\">
";
// line 79
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("block_search_product"));
echo "
</div>
<a class=\"ec-blockBtn--top btn-center mt-3\" href=\"";
// line 81
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
echo "\">販売商品をもっと見る</a>
</div>
";
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "Block/product_lists.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 247 => 81, 242 => 79, 239 => 78, 237 => 77, 232 => 74, 223 => 70, 219 => 68, 216 => 67, 207 => 65, 202 => 64, 197 => 62, 192 => 61, 189 => 60, 186 => 59, 179 => 57, 172 => 56, 169 => 55, 166 => 54, 161 => 52, 156 => 51, 153 => 50, 150 => 49, 147 => 48, 145 => 47, 140 => 45, 136 => 44, 132 => 43, 129 => 42, 125 => 41, 121 => 39, 119 => 38, 115 => 36, 113 => 35, 111 => 34, 109 => 33, 107 => 32, 105 => 31, 102 => 29, 97 => 26, 82 => 23, 79 => 22, 76 => 21, 72 => 20, 68 => 18, 65 => 17, 62 => 16, 55 => 11, 43 => 1,);
}
public function getSourceContext()
{
return new Source("text
<div class=\"ec-role mt-1\">
<div class=\"d-flex flex-column flex-md-row justify-content-between\">
<h2 class=\"ec-secHeading mt-0\">
<span class=\"ec-secHeading__en\">PRODUCTS</span>
<span class=\"ec-secHeading__line\"></span>
<span class=\"ec-secHeading__ja\">製品一覧</span>
</h2>
<div class=\"d-none d-md-block ec-headerNaviRole__search\">
{{ render(path('block_search_product')) }}
</div>
</div>
{# tag list #}
{% set tags = repository('Eccube\\\\Entity\\\\Tag').findAll() %}
{% if tags|length > 0 %}
<div class=\"tag-list mt-2\">
<ul class=\"d-flex gap-1\" style=\"padding-left:0\">
{% for tag in tags %}
{% set isActive = app.request.get('tag_id') == tag.id %}
<li class=\"\">
<a class=\"btn btn-sm btn-outline-secondary{% if isActive %} btn-primary{% endif %}\" href=\"{{ url('product_list', {'tag_id': tag.id}) }}\">{{ tag.name }}</a>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
{#{% set products = repository(\"Eccube\\\\Entity\\\\Product\")#}
{# .createQueryBuilder('product')#}
{# .setMaxResults(12)#}
{# .getQuery()#}
{# .getResult()#}
{#%}#}
{% if products is not null %}
<div class=\"ec-newItemRole pt-2\">
<div class=\"ec-shelfGrid\">
{% for product in products %}
<div class=\"ec-shelfGrid__item\">
<a href=\"{{ url('product_detail', {'id': product.id}) }}\">
<img src=\"{{ asset(product.main_list_image|no_image_product, 'save_image') }}\">
<p class=\"ec-newItemRole__listItemTitle\">{{ product.name }}</p>
<p class=\"ec-newItemRole__listItemPrice\">
{% if is_granted(\"ROLE_USER\") %}
{% if product.hasProductClass %}
{% if product.getPrice02Min == product.getPrice02Max %}
{% set getPrice02NoTaxMin = ceil(product.getPrice02IncTaxMin / 1.1) %}
{{ product.getPrice02IncTaxMin|price }}(税込)/
{{ getPrice02NoTaxMin|price }}(税抜)
{% else %}
{% set getPrice02NoTaxMin = ceil(product.getPrice02IncTaxMin / 1.1) %}
{% set getPrice02NoTaxMax = ceil(product.getPrice02IncTaxMax / 1.1) %}
{{ product.getPrice02IncTaxMin|price }} ~ {{ product.getPrice02IncTaxMax|price }}(税込)/<br>
{{ getPrice02NoTaxMin|price }} ~ {{ getPrice02NoTaxMax|price }}(税抜)
{% endif %}
{% else %}
{% set getPrice02NoTaxMin = ceil(product.getPrice02IncTaxMin / 1.1) %}
{{ product.getPrice02IncTaxMin|price }}(税込)/
{{ getPrice02NoTaxMin|price }}(税抜)
{% endif %}
{% for productClass in product.ProductClasses %}
<p class=\"ec-newItemRole__listItemPrice\">在庫数:{{ productClass.getSaleLimit() }}</p>
{% endfor %}
{% else %}
価格・在庫数:お問い合わせください
{% endif %}
</p>
</a>
</div>
{% endfor %}
</div>
</div>
{% endif %}
{# search box #}
<div class=\"d-md-none ec-headerNaviRole__search\">
{{ render(path('block_search_product')) }}
</div>
<a class=\"ec-blockBtn--top btn-center mt-3\" href=\"{{ url('product_list') }}\">販売商品をもっと見る</a>
</div>
", "Block/product_lists.twig", "/home/wai2cojp/sysdemo.pro/public_html/kinpara.sysdemo.pro/shop/app/template/default/Block/product_lists.twig");
}
}