<?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/recommend_product_block.twig */
class __TwigTemplate_d1275093f942047b6e7df41e6bf115a2 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_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Block/recommend_product_block.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Block/recommend_product_block.twig"));
// line 9
$context["recommend_products"] = twig_get_attribute($this->env, $this->source, $this->env->getFunction('repository')->getCallable()("Plugin\\Recommend42\\Entity\\RecommendProduct"), "getRecommendProduct", [], "any", false, false, false, 9);
// line 10
echo "
<!-- ▼item_list▼ -->
<div class=\"ec-shelfRole\">
お勧め商品情報!
<ul class=\"ec-shelfGrid\">
";
// line 16
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["recommend_products"]) || array_key_exists("recommend_products", $context) ? $context["recommend_products"] : (function () { throw new RuntimeError('Variable "recommend_products" does not exist.', 16, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["RecommendProduct"]) {
// line 17
echo " <li class=\"ec-shelfGrid__item\">
<a href=\"";
// line 18
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_detail", ["id" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["RecommendProduct"], "Product", [], "any", false, false, false, 18), "id", [], "any", false, false, false, 18)]), "html", null, true);
echo "\">
<img src=\"";
// line 19
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, twig_get_attribute($this->env, $this->source, $context["RecommendProduct"], "Product", [], "any", false, false, false, 19), "mainFileName", [], "any", false, false, false, 19)), "save_image"), "html", null, true);
echo "\">
<p>";
// line 20
echo twig_nl2br($this->env->getRuntime('Exercise\HTMLPurifierBundle\Twig\HTMLPurifierRuntime')->purify(twig_get_attribute($this->env, $this->source, $context["RecommendProduct"], "comment", [], "any", false, false, false, 20)));
echo "</p>
<dl>
<dt class=\"item_name\">";
// line 22
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["RecommendProduct"], "Product", [], "any", false, false, false, 22), "name", [], "any", false, false, false, 22), "html", null, true);
echo "</dt>
<dd class=\"item_price\">
";
// line 24
if (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["RecommendProduct"], "Product", [], "any", false, false, false, 24), "hasProductClass", [], "any", false, false, false, 24)) {
// line 25
echo " ";
if ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["RecommendProduct"], "Product", [], "any", false, false, false, 25), "getPrice02Min", [], "any", false, false, false, 25) == twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["RecommendProduct"], "Product", [], "any", false, false, false, 25), "getPrice02Max", [], "any", false, false, false, 25))) {
// line 26
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["RecommendProduct"], "Product", [], "any", false, false, false, 26), "getPrice02IncTaxMin", [], "any", false, false, false, 26)), "html", null, true);
echo "
";
} else {
// line 28
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["RecommendProduct"], "Product", [], "any", false, false, false, 28), "getPrice02IncTaxMin", [], "any", false, false, false, 28)), "html", null, true);
echo " ~ ";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["RecommendProduct"], "Product", [], "any", false, false, false, 28), "getPrice02IncTaxMax", [], "any", false, false, false, 28)), "html", null, true);
echo "
";
}
// line 30
echo " ";
} else {
// line 31
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["RecommendProduct"], "Product", [], "any", false, false, false, 31), "getPrice02IncTaxMin", [], "any", false, false, false, 31)), "html", null, true);
echo "
";
}
// line 33
echo " </dd>
</dl>
</a>
</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['RecommendProduct'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 38
echo " </ul>
</div>
<!-- ▲item_list▲ -->";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
public function getTemplateName()
{
return "Block/recommend_product_block.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 116 => 38, 106 => 33, 100 => 31, 97 => 30, 89 => 28, 83 => 26, 80 => 25, 78 => 24, 73 => 22, 68 => 20, 64 => 19, 60 => 18, 57 => 17, 53 => 16, 45 => 10, 43 => 9,);
}
public function getSourceContext()
{
return new Source("{#
* This file is part of the Recommend Product plugin
*
* Copyright (C) EC-CUBE CO.,LTD. All Rights Reserved.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
#}
{% set recommend_products = repository('Plugin\\\\Recommend42\\\\Entity\\\\RecommendProduct').getRecommendProduct %}
<!-- ▼item_list▼ -->
<div class=\"ec-shelfRole\">
お勧め商品情報!
<ul class=\"ec-shelfGrid\">
{% for RecommendProduct in recommend_products %}
<li class=\"ec-shelfGrid__item\">
<a href=\"{{ url('product_detail', {'id': RecommendProduct.Product.id}) }}\">
<img src=\"{{ asset(RecommendProduct.Product.mainFileName|no_image_product, \"save_image\") }}\">
<p>{{ RecommendProduct.comment|raw|purify|nl2br }}</p>
<dl>
<dt class=\"item_name\">{{ RecommendProduct.Product.name }}</dt>
<dd class=\"item_price\">
{% if RecommendProduct.Product.hasProductClass %}
{% if RecommendProduct.Product.getPrice02Min == RecommendProduct.Product.getPrice02Max %}
{{ RecommendProduct.Product.getPrice02IncTaxMin|price }}
{% else %}
{{ RecommendProduct.Product.getPrice02IncTaxMin|price }} ~ {{ RecommendProduct.Product.getPrice02IncTaxMax|price }}
{% endif %}
{% else %}
{{ RecommendProduct.Product.getPrice02IncTaxMin|price }}
{% endif %}
</dd>
</dl>
</a>
</li>
{% endfor %}
</ul>
</div>
<!-- ▲item_list▲ -->", "Block/recommend_product_block.twig", "/home/xs262729/sandrea.net/public_html/display.sandrea.net/app/template/default/Block/recommend_product_block.twig");
}
}