var/cache/dev/twig/87/8720d9292bf5e8f07f4dbbf084239e8b.php line 33

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/cart.twig */
  14. class __TwigTemplate_8c2d59d5a080c1a0a3a33df9b922f022 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_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  30.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Block/cart.twig"));
  31.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  32.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Block/cart.twig"));
  33.         // line 11
  34.         $context["Carts"] = $this->extensions['Eccube\Twig\Extension\CartServiceExtension']->get_all_carts();
  35.         // line 12
  36.         $context["totalPrice"] = $this->extensions['Eccube\Twig\Extension\CartServiceExtension']->get_carts_total_price();
  37.         // line 13
  38.         $context["totalQuantity"] = $this->extensions['Eccube\Twig\Extension\CartServiceExtension']->get_carts_total_quantity();
  39.         // line 14
  40.         echo "<div class=\"ec-cartNaviWrap\">
  41.     <div class=\"ec-cartNavi\">
  42.         <i class=\"ec-cartNavi__icon fas fa-shopping-cart\">
  43.             <span class=\"ec-cartNavi__badge\">";
  44.         // line 17
  45.         echo twig_escape_filter($this->envtwig_number_format_filter($this->env, (isset($context["totalQuantity"]) || array_key_exists("totalQuantity"$context) ? $context["totalQuantity"] : (function () { throw new RuntimeError('Variable "totalQuantity" does not exist.'17$this->source); })())), "html"nulltrue);
  46.         echo "</span>
  47.         </i>
  48.         <div class=\"ec-cartNavi__label\">
  49.             <div class=\"ec-cartNavi__price\">";
  50.         // line 20
  51.         echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter((isset($context["totalPrice"]) || array_key_exists("totalPrice"$context) ? $context["totalPrice"] : (function () { throw new RuntimeError('Variable "totalPrice" does not exist.'20$this->source); })())), "html"nulltrue);
  52.         echo "</div>
  53.         </div>
  54.     </div>
  55.     ";
  56.         // line 23
  57.         if (((isset($context["totalQuantity"]) || array_key_exists("totalQuantity"$context) ? $context["totalQuantity"] : (function () { throw new RuntimeError('Variable "totalQuantity" does not exist.'23$this->source); })()) > 0)) {
  58.             // line 24
  59.             echo "        <div class=\"ec-cartNaviIsset\">
  60.             ";
  61.             // line 25
  62.             $context['_parent'] = $context;
  63.             $context['_seq'] = twig_ensure_traversable((isset($context["Carts"]) || array_key_exists("Carts"$context) ? $context["Carts"] : (function () { throw new RuntimeError('Variable "Carts" does not exist.'25$this->source); })()));
  64.             foreach ($context['_seq'] as $context["_key"] => $context["Cart"]) {
  65.                 // line 26
  66.                 echo "                ";
  67.                 $context['_parent'] = $context;
  68.                 $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source$context["Cart"], "CartItems", [], "any"falsefalsefalse26));
  69.                 foreach ($context['_seq'] as $context["_key"] => $context["CartItem"]) {
  70.                     // line 27
  71.                     echo "                    ";
  72.                     $context["ProductClass"] = twig_get_attribute($this->env$this->source$context["CartItem"], "ProductClass", [], "any"falsefalsefalse27);
  73.                     // line 28
  74.                     echo "                    ";
  75.                     $context["Product"] = 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.'28$this->source); })()), "Product", [], "any"falsefalsefalse28);
  76.                     // line 29
  77.                     echo "                    <div class=\"ec-cartNaviIsset__cart\">
  78.                         <div class=\"ec-cartNaviIsset__cartImage\">
  79.                             <img src=\"";
  80.                     // line 31
  81.                     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, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'31$this->source); })()), "MainListImage", [], "any"falsefalsefalse31)), "save_image"), "html"nulltrue);
  82.                     echo "\" alt=\"";
  83.                     echo twig_escape_filter($this->envtwig_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.'31$this->source); })()), "name", [], "any"falsefalsefalse31), "html"nulltrue);
  84.                     echo "\">
  85.                         </div>
  86.                         <div class=\"ec-cartNaviIsset__cartContent\">
  87.                             <div class=\"ec-cartNaviIsset__cartContentTitle\">";
  88.                     // line 34
  89.                     echo twig_escape_filter($this->envtwig_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.'34$this->source); })()), "name", [], "any"falsefalsefalse34), "html"nulltrue);
  90.                     echo "
  91.                                 <div class=\"ec-font-size-1\">
  92.                                     ";
  93.                     // line 36
  94.                     if ((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.'36$this->source); })()), "ClassCategory1", [], "any"falsefalsefalse36) && twig_get_attribute($this->env$this->sourcetwig_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.'36$this->source); })()), "ClassCategory1", [], "any"falsefalsefalse36), "id", [], "any"falsefalsefalse36))) {
  95.                         // line 37
  96.                         echo "                                        ";
  97.                         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_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.'37$this->source); })()), "ClassCategory1", [], "any"falsefalsefalse37), "ClassName", [], "any"falsefalsefalse37), "name", [], "any"falsefalsefalse37), "html"nulltrue);
  98.                         echo ":";
  99.                         echo twig_escape_filter($this->envtwig_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.'37$this->source); })()), "ClassCategory1", [], "any"falsefalsefalse37), "html"nulltrue);
  100.                         echo "
  101.                                     ";
  102.                     }
  103.                     // line 39
  104.                     echo "                                    ";
  105.                     if ((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.'39$this->source); })()), "ClassCategory2", [], "any"falsefalsefalse39) && twig_get_attribute($this->env$this->sourcetwig_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.'39$this->source); })()), "ClassCategory2", [], "any"falsefalsefalse39), "id", [], "any"falsefalsefalse39))) {
  106.                         // line 40
  107.                         echo "                                        <br>";
  108.                         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_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.'40$this->source); })()), "ClassCategory2", [], "any"falsefalsefalse40), "ClassName", [], "any"falsefalsefalse40), "name", [], "any"falsefalsefalse40), "html"nulltrue);
  109.                         echo ":";
  110.                         echo twig_escape_filter($this->envtwig_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.'40$this->source); })()), "ClassCategory2", [], "any"falsefalsefalse40), "html"nulltrue);
  111.                         echo "
  112.                                     ";
  113.                     }
  114.                     // line 42
  115.                     echo "                                </div>
  116.                             </div>
  117.                             <div class=\"ec-cartNaviIsset__cartContentPrice\">
  118.                                 ";
  119.                     // line 45
  120.                     echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env$this->source$context["CartItem"], "price", [], "any"falsefalsefalse45)), "html"nulltrue);
  121.                     echo "
  122.                                 <div class=\"ec-cartNaviIsset__cartContentTax\">";
  123.                     // line 46
  124.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html"nulltrue);
  125.                     echo "</div>
  126.                             </div>
  127.                             <div class=\"ec-cartNaviIsset__cartContentNumber\">";
  128.                     // line 48
  129.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("数量"), "html"nulltrue);
  130.                     echo " ";
  131.                     echo twig_escape_filter($this->envtwig_number_format_filter($this->envtwig_get_attribute($this->env$this->source$context["CartItem"], "quantity", [], "any"falsefalsefalse48)), "html"nulltrue);
  132.                     echo "</div>
  133.                         </div>
  134.                     </div>
  135.                 ";
  136.                 }
  137.                 $_parent $context['_parent'];
  138.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['CartItem'], $context['_parent'], $context['loop']);
  139.                 $context array_intersect_key($context$_parent) + $_parent;
  140.                 // line 52
  141.                 echo "            ";
  142.             }
  143.             $_parent $context['_parent'];
  144.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Cart'], $context['_parent'], $context['loop']);
  145.             $context array_intersect_key($context$_parent) + $_parent;
  146.             // line 53
  147.             echo "            <div class=\"ec-cartNaviIsset__action\">
  148.                 <a class=\"ec-blockBtn--action\" href=\"";
  149.             // line 54
  150.             echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("cart");
  151.             echo "\">";
  152.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへ進む"), "html"nulltrue);
  153.             echo "</a>
  154.                 <a class=\"ec-blockBtn ec-cartNavi--cancel\">";
  155.             // line 55
  156.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("キャンセル"), "html"nulltrue);
  157.             echo "</a>
  158.             </div>
  159.         </div>
  160.     ";
  161.         } else {
  162.             // line 59
  163.             echo "        <div class=\"ec-cartNaviNull\">
  164.             <div class=\"ec-cartNaviNull__message\">
  165.                 <p>";
  166.             // line 61
  167.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("現在カート内に商品はございません。"), "html"nulltrue);
  168.             echo "</p>
  169.             </div>
  170.         </div>
  171.     ";
  172.         }
  173.         // line 65
  174.         echo "</div>
  175. ";
  176.         
  177.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  178.         
  179.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  180.     }
  181.     public function getTemplateName()
  182.     {
  183.         return "Block/cart.twig";
  184.     }
  185.     public function isTraitable()
  186.     {
  187.         return false;
  188.     }
  189.     public function getDebugInfo()
  190.     {
  191.         return array (  183 => 65,  176 => 61,  172 => 59,  165 => 55,  159 => 54,  156 => 53,  150 => 52,  138 => 48,  133 => 46,  129 => 45,  124 => 42,  116 => 40,  113 => 39,  105 => 37,  103 => 36,  98 => 34,  90 => 31,  86 => 29,  83 => 28,  80 => 27,  75 => 26,  71 => 25,  68 => 24,  66 => 23,  60 => 20,  54 => 17,  49 => 14,  47 => 13,  45 => 12,  43 => 11,);
  192.     }
  193.     public function getSourceContext()
  194.     {
  195.         return new Source("{#
  196. This file is part of EC-CUBE
  197. Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  198. http://www.ec-cube.co.jp/
  199. For the full copyright and license information, please view the LICENSE
  200. file that was distributed with this source code.
  201. #}
  202. {% set Carts = get_all_carts() %}
  203. {% set totalPrice = get_carts_total_price() %}
  204. {% set totalQuantity = get_carts_total_quantity() %}
  205. <div class=\"ec-cartNaviWrap\">
  206.     <div class=\"ec-cartNavi\">
  207.         <i class=\"ec-cartNavi__icon fas fa-shopping-cart\">
  208.             <span class=\"ec-cartNavi__badge\">{{ totalQuantity|number_format }}</span>
  209.         </i>
  210.         <div class=\"ec-cartNavi__label\">
  211.             <div class=\"ec-cartNavi__price\">{{ totalPrice|price }}</div>
  212.         </div>
  213.     </div>
  214.     {% if totalQuantity > 0 %}
  215.         <div class=\"ec-cartNaviIsset\">
  216.             {% for Cart in Carts %}
  217.                 {% for CartItem in Cart.CartItems %}
  218.                     {% set ProductClass = CartItem.ProductClass %}
  219.                     {% set Product = ProductClass.Product %}
  220.                     <div class=\"ec-cartNaviIsset__cart\">
  221.                         <div class=\"ec-cartNaviIsset__cartImage\">
  222.                             <img src=\"{{ asset(Product.MainListImage|no_image_product, 'save_image') }}\" alt=\"{{ Product.name }}\">
  223.                         </div>
  224.                         <div class=\"ec-cartNaviIsset__cartContent\">
  225.                             <div class=\"ec-cartNaviIsset__cartContentTitle\">{{ Product.name }}
  226.                                 <div class=\"ec-font-size-1\">
  227.                                     {% if ProductClass.ClassCategory1 and ProductClass.ClassCategory1.id %}
  228.                                         {{ ProductClass.ClassCategory1.ClassName.name }}:{{ ProductClass.ClassCategory1 }}
  229.                                     {% endif %}
  230.                                     {% if ProductClass.ClassCategory2 and ProductClass.ClassCategory2.id %}
  231.                                         <br>{{ ProductClass.ClassCategory2.ClassName.name }}:{{ ProductClass.ClassCategory2 }}
  232.                                     {% endif %}
  233.                                 </div>
  234.                             </div>
  235.                             <div class=\"ec-cartNaviIsset__cartContentPrice\">
  236.                                 {{ CartItem.price|price }}
  237.                                 <div class=\"ec-cartNaviIsset__cartContentTax\">{{ '税込'|trans }}</div>
  238.                             </div>
  239.                             <div class=\"ec-cartNaviIsset__cartContentNumber\">{{ '数量'|trans }} {{ CartItem.quantity|number_format }}</div>
  240.                         </div>
  241.                     </div>
  242.                 {% endfor %}
  243.             {% endfor %}
  244.             <div class=\"ec-cartNaviIsset__action\">
  245.                 <a class=\"ec-blockBtn--action\" href=\"{{ url('cart') }}\">{{ 'カートへ進む'|trans }}</a>
  246.                 <a class=\"ec-blockBtn ec-cartNavi--cancel\">{{ 'キャンセル'|trans }}</a>
  247.             </div>
  248.         </div>
  249.     {% else %}
  250.         <div class=\"ec-cartNaviNull\">
  251.             <div class=\"ec-cartNaviNull__message\">
  252.                 <p>{{ '現在カート内に商品はございません。'|trans }}</p>
  253.             </div>
  254.         </div>
  255.     {% endif %}
  256. </div>
  257. ""Block/cart.twig""/home/zen2022/tpscoco.com/public_html/src/Eccube/Resource/template/default/Block/cart.twig");
  258.     }
  259. }