var/cache/dev/twig/c3/c33f374afa6ff0e832b891a8f6349b8b9523cf6be107185bcba4886caa3dccb5.php line 55

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* Block/product_lists.twig */
  14. class __TwigTemplate_aa93a4471daba7a7302cbdf7e0c008b9ebe0cfa3293687d371d0d412a21ba25e extends \Eccube\Twig\Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->parent false;
  23.         $this->blocks = [
  24.         ];
  25.     }
  26.     protected function doDisplay(array $context, array $blocks = [])
  27.     {
  28.         $macros $this->macros;
  29.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  30.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Block/product_lists.twig"));
  31.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  32.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Block/product_lists.twig"));
  33.         // line 1
  34.         echo "text
  35. <div class=\"ec-role mt-1\">
  36.     <div class=\"d-flex flex-column flex-md-row justify-content-between\">
  37.         <h2 class=\"ec-secHeading mt-0\">
  38.             <span class=\"ec-secHeading__en\">PRODUCTS</span>
  39.             <span class=\"ec-secHeading__line\"></span>
  40.             <span class=\"ec-secHeading__ja\">製品一覧</span>
  41.         </h2>
  42.         <div class=\"d-none d-md-block ec-headerNaviRole__search\">
  43.             ";
  44.         // line 11
  45.         echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("block_search_product"));
  46.         echo "
  47.         </div>
  48.     </div>
  49.     ";
  50.         // line 16
  51.         echo "    ";
  52.         $context["tags"] = twig_get_attribute($this->env$this->source$this->env->getFunction('repository')->getCallable()("Eccube\\Entity\\Tag"), "findAll", [], "method"falsefalsefalse16);
  53.         // line 17
  54.         echo "    ";
  55.         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)) {
  56.             // line 18
  57.             echo "      <div class=\"tag-list mt-2\">
  58.         <ul class=\"d-flex gap-1\" style=\"padding-left:0\">
  59.           ";
  60.             // line 20
  61.             $context['_parent'] = $context;
  62.             $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); })()));
  63.             foreach ($context['_seq'] as $context["_key"] => $context["tag"]) {
  64.                 // line 21
  65.                 echo "            ";
  66.                 $context["isActive"] = (twig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse21), "get", [=> "tag_id"], "method"falsefalsefalse21) == twig_get_attribute($this->env$this->source$context["tag"], "id", [], "any"falsefalsefalse21));
  67.                 // line 22
  68.                 echo "            <li class=\"\">
  69.               <a class=\"btn btn-sm btn-outline-secondary";
  70.                 // line 23
  71.                 if ((isset($context["isActive"]) || array_key_exists("isActive"$context) ? $context["isActive"] : (function () { throw new RuntimeError('Variable "isActive" does not exist.'23$this->source); })())) {
  72.                     echo " btn-primary";
  73.                 }
  74.                 echo "\" href=\"";
  75.                 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"falsefalsefalse23)]), "html"nulltrue);
  76.                 echo "\">";
  77.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["tag"], "name", [], "any"falsefalsefalse23), "html"nulltrue);
  78.                 echo "</a>
  79.             </li>
  80.           ";
  81.             }
  82.             $_parent $context['_parent'];
  83.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['tag'], $context['_parent'], $context['loop']);
  84.             $context array_intersect_key($context$_parent) + $_parent;
  85.             // line 26
  86.             echo "        </ul>
  87.       </div>
  88.     ";
  89.         }
  90.         // line 29
  91.         echo "
  92.     ";
  93.         // line 31
  94.         echo "    ";
  95.         // line 32
  96.         echo "    ";
  97.         // line 33
  98.         echo "    ";
  99.         // line 34
  100.         echo "    ";
  101.         // line 35
  102.         echo "    ";
  103.         // line 36
  104.         echo "
  105.     ";
  106.         // line 38
  107.         if ( !(null === (isset($context["products"]) || array_key_exists("products"$context) ? $context["products"] : (function () { throw new RuntimeError('Variable "products" does not exist.'38$this->source); })()))) {
  108.             // line 39
  109.             echo "    <div class=\"ec-newItemRole pt-2\">
  110.             <div class=\"ec-shelfGrid\">
  111.                 ";
  112.             // line 41
  113.             $context['_parent'] = $context;
  114.             $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); })()));
  115.             foreach ($context['_seq'] as $context["_key"] => $context["product"]) {
  116.                 // line 42
  117.                 echo "                    <div class=\"ec-shelfGrid__item\">
  118.                         <a href=\"";
  119.                 // line 43
  120.                 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"falsefalsefalse43)]), "html"nulltrue);
  121.                 echo "\">
  122.                             <img src=\"";
  123.                 // line 44
  124.                 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"falsefalsefalse44)), "save_image"), "html"nulltrue);
  125.                 echo "\">
  126.                             <p class=\"ec-newItemRole__listItemTitle\">";
  127.                 // line 45
  128.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["product"], "name", [], "any"falsefalsefalse45), "html"nulltrue);
  129.                 echo "</p>
  130.                             <p class=\"ec-newItemRole__listItemPrice\">
  131.                                 ";
  132.                 // line 47
  133.                 if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_USER")) {
  134.                     // line 48
  135.                     echo "                                    ";
  136.                     if (twig_get_attribute($this->env$this->source$context["product"], "hasProductClass", [], "any"falsefalsefalse48)) {
  137.                         // line 49
  138.                         echo "                                        ";
  139.                         if ((twig_get_attribute($this->env$this->source$context["product"], "getPrice02Min", [], "any"falsefalsefalse49) == twig_get_attribute($this->env$this->source$context["product"], "getPrice02Max", [], "any"falsefalsefalse49))) {
  140.                             // line 50
  141.                             echo "                                            ";
  142.                             $context["getPrice02NoTaxMin"] = ceil((twig_get_attribute($this->env$this->source$context["product"], "getPrice02IncTaxMin", [], "any"falsefalsefalse50) / 1.100000000000000088817841970012523233890533447265625));
  143.                             // line 51
  144.                             echo "                                            ";
  145.                             echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env$this->source$context["product"], "getPrice02IncTaxMin", [], "any"falsefalsefalse51)), "html"nulltrue);
  146.                             echo "(税込)/
  147.                                             ";
  148.                             // line 52
  149.                             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"nulltrue);
  150.                             echo "(税抜)
  151.                                         ";
  152.                         } else {
  153.                             // line 54
  154.                             echo "                                            ";
  155.                             $context["getPrice02NoTaxMin"] = ceil((twig_get_attribute($this->env$this->source$context["product"], "getPrice02IncTaxMin", [], "any"falsefalsefalse54) / 1.100000000000000088817841970012523233890533447265625));
  156.                             // line 55
  157.                             echo "                                            ";
  158.                             $context["getPrice02NoTaxMax"] = ceil((twig_get_attribute($this->env$this->source$context["product"], "getPrice02IncTaxMax", [], "any"falsefalsefalse55) / 1.100000000000000088817841970012523233890533447265625));
  159.                             // line 56
  160.                             echo "                                            ";
  161.                             echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env$this->source$context["product"], "getPrice02IncTaxMin", [], "any"falsefalsefalse56)), "html"nulltrue);
  162.                             echo " ~ ";
  163.                             echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env$this->source$context["product"], "getPrice02IncTaxMax", [], "any"falsefalsefalse56)), "html"nulltrue);
  164.                             echo "(税込)/<br>
  165.                                             ";
  166.                             // line 57
  167.                             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"nulltrue);
  168.                             echo " ~ ";
  169.                             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"nulltrue);
  170.                             echo "(税抜)
  171.                                         ";
  172.                         }
  173.                         // line 59
  174.                         echo "                                    ";
  175.                     } else {
  176.                         // line 60
  177.                         echo "                                        ";
  178.                         $context["getPrice02NoTaxMin"] = ceil((twig_get_attribute($this->env$this->source$context["product"], "getPrice02IncTaxMin", [], "any"falsefalsefalse60) / 1.100000000000000088817841970012523233890533447265625));
  179.                         // line 61
  180.                         echo "                                        ";
  181.                         echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env$this->source$context["product"], "getPrice02IncTaxMin", [], "any"falsefalsefalse61)), "html"nulltrue);
  182.                         echo "(税込)/
  183.                                         ";
  184.                         // line 62
  185.                         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"nulltrue);
  186.                         echo "(税抜)
  187.                                     ";
  188.                     }
  189.                     // line 64
  190.                     echo "                                    ";
  191.                     $context['_parent'] = $context;
  192.                     $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source$context["product"], "ProductClasses", [], "any"falsefalsefalse64));
  193.                     foreach ($context['_seq'] as $context["_key"] => $context["productClass"]) {
  194.                         // line 65
  195.                         echo "                                        <p class=\"ec-newItemRole__listItemPrice\">在庫数:";
  196.                         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["productClass"], "getSaleLimit", [], "method"falsefalsefalse65), "html"nulltrue);
  197.                         echo "</p>
  198.                                     ";
  199.                     }
  200.                     $_parent $context['_parent'];
  201.                     unset($context['_seq'], $context['_iterated'], $context['_key'], $context['productClass'], $context['_parent'], $context['loop']);
  202.                     $context array_intersect_key($context$_parent) + $_parent;
  203.                     // line 67
  204.                     echo "                                ";
  205.                 } else {
  206.                     // line 68
  207.                     echo "                                    価格・在庫数:お問い合わせください
  208.                                 ";
  209.                 }
  210.                 // line 70
  211.                 echo "                            </p>
  212.                         </a>
  213.                     </div>
  214.                 ";
  215.             }
  216.             $_parent $context['_parent'];
  217.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['product'], $context['_parent'], $context['loop']);
  218.             $context array_intersect_key($context$_parent) + $_parent;
  219.             // line 74
  220.             echo "            </div>
  221.         </div>
  222.     ";
  223.         }
  224.         // line 77
  225.         echo "    ";
  226.         // line 78
  227.         echo "    <div class=\"d-md-none ec-headerNaviRole__search\">
  228.         ";
  229.         // line 79
  230.         echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("block_search_product"));
  231.         echo "
  232.     </div>
  233.     <a class=\"ec-blockBtn--top btn-center mt-3\"  href=\"";
  234.         // line 81
  235.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
  236.         echo "\">販売商品をもっと見る</a>
  237. </div>
  238. ";
  239.         
  240.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  241.         
  242.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  243.     }
  244.     public function getTemplateName()
  245.     {
  246.         return "Block/product_lists.twig";
  247.     }
  248.     public function isTraitable()
  249.     {
  250.         return false;
  251.     }
  252.     public function getDebugInfo()
  253.     {
  254.         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,);
  255.     }
  256.     public function getSourceContext()
  257.     {
  258.         return new Source("text
  259. <div class=\"ec-role mt-1\">
  260.     <div class=\"d-flex flex-column flex-md-row justify-content-between\">
  261.         <h2 class=\"ec-secHeading mt-0\">
  262.             <span class=\"ec-secHeading__en\">PRODUCTS</span>
  263.             <span class=\"ec-secHeading__line\"></span>
  264.             <span class=\"ec-secHeading__ja\">製品一覧</span>
  265.         </h2>
  266.         <div class=\"d-none d-md-block ec-headerNaviRole__search\">
  267.             {{ render(path('block_search_product')) }}
  268.         </div>
  269.     </div>
  270.     {# tag list #}
  271.     {% set tags = repository('Eccube\\\\Entity\\\\Tag').findAll() %}
  272.     {% if tags|length > 0 %}
  273.       <div class=\"tag-list mt-2\">
  274.         <ul class=\"d-flex gap-1\" style=\"padding-left:0\">
  275.           {% for tag in tags %}
  276.             {% set isActive = app.request.get('tag_id') == tag.id %}
  277.             <li class=\"\">
  278.               <a class=\"btn btn-sm btn-outline-secondary{% if isActive %} btn-primary{% endif %}\" href=\"{{ url('product_list', {'tag_id': tag.id}) }}\">{{ tag.name }}</a>
  279.             </li>
  280.           {% endfor %}
  281.         </ul>
  282.       </div>
  283.     {% endif %}
  284.     {#{% set products = repository(\"Eccube\\\\Entity\\\\Product\")#}
  285.     {#    .createQueryBuilder('product')#}
  286.     {#    .setMaxResults(12)#}
  287.     {#    .getQuery()#}
  288.     {#    .getResult()#}
  289.     {#%}#}
  290.     {% if products is not null %}
  291.     <div class=\"ec-newItemRole pt-2\">
  292.             <div class=\"ec-shelfGrid\">
  293.                 {% for product in products %}
  294.                     <div class=\"ec-shelfGrid__item\">
  295.                         <a href=\"{{ url('product_detail', {'id': product.id}) }}\">
  296.                             <img src=\"{{ asset(product.main_list_image|no_image_product, 'save_image') }}\">
  297.                             <p class=\"ec-newItemRole__listItemTitle\">{{ product.name }}</p>
  298.                             <p class=\"ec-newItemRole__listItemPrice\">
  299.                                 {% if is_granted(\"ROLE_USER\") %}
  300.                                     {% if product.hasProductClass %}
  301.                                         {% if product.getPrice02Min == product.getPrice02Max %}
  302.                                             {% set getPrice02NoTaxMin = ceil(product.getPrice02IncTaxMin / 1.1) %}
  303.                                             {{ product.getPrice02IncTaxMin|price }}(税込)/
  304.                                             {{ getPrice02NoTaxMin|price }}(税抜)
  305.                                         {% else %}
  306.                                             {% set getPrice02NoTaxMin = ceil(product.getPrice02IncTaxMin / 1.1) %}
  307.                                             {% set getPrice02NoTaxMax = ceil(product.getPrice02IncTaxMax / 1.1) %}
  308.                                             {{ product.getPrice02IncTaxMin|price }} ~ {{ product.getPrice02IncTaxMax|price }}(税込)/<br>
  309.                                             {{ getPrice02NoTaxMin|price }} ~ {{ getPrice02NoTaxMax|price }}(税抜)
  310.                                         {% endif %}
  311.                                     {% else %}
  312.                                         {% set getPrice02NoTaxMin = ceil(product.getPrice02IncTaxMin / 1.1) %}
  313.                                         {{ product.getPrice02IncTaxMin|price }}(税込)/
  314.                                         {{ getPrice02NoTaxMin|price }}(税抜)
  315.                                     {% endif %}
  316.                                     {% for productClass in product.ProductClasses %}
  317.                                         <p class=\"ec-newItemRole__listItemPrice\">在庫数:{{ productClass.getSaleLimit() }}</p>
  318.                                     {% endfor %}
  319.                                 {% else %}
  320.                                     価格・在庫数:お問い合わせください
  321.                                 {% endif %}
  322.                             </p>
  323.                         </a>
  324.                     </div>
  325.                 {% endfor %}
  326.             </div>
  327.         </div>
  328.     {% endif %}
  329.     {# search box #}
  330.     <div class=\"d-md-none ec-headerNaviRole__search\">
  331.         {{ render(path('block_search_product')) }}
  332.     </div>
  333.     <a class=\"ec-blockBtn--top btn-center mt-3\"  href=\"{{ url('product_list') }}\">販売商品をもっと見る</a>
  334. </div>
  335. ""Block/product_lists.twig""/home/wai2cojp/sysdemo.pro/public_html/kinpara.sysdemo.pro/shop/app/template/default/Block/product_lists.twig");
  336.     }
  337. }