var/cache/dev/twig/7d/7d80ad891da20bf046962b46b115aa2a1eb7c38f04a00335658237c3357f6251.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/recommend_product_block.twig */
  14. class __TwigTemplate_e8ceb37c98a92531508dcdb6dfbcc3b2417e71d813def938c769ff2369ef1bf0 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/recommend_product_block.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/recommend_product_block.twig"));
  33.         // line 9
  34.         echo "<div class=\"topBlocks\">
  35.     <div class=\"titleBlock\">
  36.         <div class=\"titleBlock__name\">
  37.             <img class=\"titleBlock__name__icon\" src=\"";
  38.         // line 12
  39.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/top/recommend.svg"), "html"nulltrue);
  40.         echo "\" alt=\"注目商品\" width=\"32\" height=\"27\" loading=\"lazy\">
  41.             <h2 class=\"titleBlock__name__title\">注目商品</h2>
  42.         </div>
  43.         <a href=\"";
  44.         // line 15
  45.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_recommend");
  46.         echo "?orderby=4\" class=\"titleBlock__link\">もっとみる</a>
  47.     </div>
  48.     <div class=\"topBlocks__scroll\">
  49.         ";
  50.         // line 18
  51.         $context['_parent'] = $context;
  52.         $context['_seq'] = twig_ensure_traversable((isset($context["Products"]) || array_key_exists("Products"$context) ? $context["Products"] : (function () { throw new RuntimeError('Variable "Products" does not exist.'18$this->source); })()));
  53.         foreach ($context['_seq'] as $context["_key"] => $context["RecommendProduct"]) {
  54.             // line 19
  55.             echo "            ";
  56.             $context["Product"] = twig_get_attribute($this->env$this->source$context["RecommendProduct"], "Product", [], "any"falsefalsefalse19);
  57.             // line 20
  58.             echo "            ";
  59.             $context["form"] = twig_get_attribute($this->env$this->source, (isset($context["forms"]) || array_key_exists("forms"$context) ? $context["forms"] : (function () { throw new RuntimeError('Variable "forms" does not exist.'20$this->source); })()), 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"falsefalsefalse20), [], "array"falsefalsefalse20);
  60.             // line 21
  61.             echo "            <div class=\"topBlocks__item popular-item\">
  62.                 ";
  63.             // line 22
  64.             $context["default"] = 0;
  65.             // line 23
  66.             echo "                ";
  67.             if (twig_get_attribute($this->env$this->source, ($context["recommendItemInCart"] ?? null), 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); })()), "id", [], "any"falsefalsefalse23), [], "array"truetruefalse23)) {
  68.                 // line 24
  69.                 echo "                    ";
  70.                 $context["default"] = twig_get_attribute($this->env$this->source, (isset($context["recommendItemInCart"]) || array_key_exists("recommendItemInCart"$context) ? $context["recommendItemInCart"] : (function () { throw new RuntimeError('Variable "recommendItemInCart" does not exist.'24$this->source); })()), 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.'24$this->source); })()), "id", [], "any"falsefalsefalse24), [], "array"falsefalsefalse24);
  71.                 // line 25
  72.                 echo "                ";
  73.             }
  74.             // line 26
  75.             echo "                ";
  76.             $context["disabled"] = false;
  77.             // line 27
  78.             echo "                ";
  79.             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.'27$this->source); })()), "isStockDiscontinued", [], "any"falsefalsefalse27)) {
  80.                 // line 28
  81.                 echo "                    <input type=\"hidden\" name=\"stock\" class=\"stock\" value=\"999999999999\">
  82.                 ";
  83.             } else {
  84.                 // line 30
  85.                 echo "                    ";
  86.                 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.'30$this->source); })()), "getStockMin", [], "any"falsefalsefalse30) <= (isset($context["default"]) || array_key_exists("default"$context) ? $context["default"] : (function () { throw new RuntimeError('Variable "default" does not exist.'30$this->source); })()))) {
  87.                     // line 31
  88.                     echo "                        ";
  89.                     $context["disabled"] = true;
  90.                     // line 32
  91.                     echo "                    ";
  92.                 }
  93.                 // line 33
  94.                 echo "                    <input type=\"hidden\" name=\"stock\" class=\"stock\" value=\"";
  95.                 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.'33$this->source); })()), "getStockMin", [], "any"falsefalsefalse33), "html"nulltrue);
  96.                 echo "\">
  97.                 ";
  98.             }
  99.             // line 35
  100.             echo "                <div class=\"topBlocks__form\">
  101.                     <a href=\"";
  102.             // line 36
  103.             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.'36$this->source); })()), "id", [], "any"falsefalsefalse36)]), "html"nulltrue);
  104.             echo "\"  role=\"group\" >
  105.                         <div class=\"topBlocks__item__image\">
  106.                             <img src=\"";
  107.             // line 38
  108.             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.'38$this->source); })()), "main_list_image", [], "any"falsefalsefalse38)), "save_image"), "html"nulltrue);
  109.             echo "\" alt=\" ";
  110.             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.'38$this->source); })()), "name", [], "any"falsefalsefalse38), "html"nulltrue);
  111.             echo "\">
  112.                             ";
  113.             // line 39
  114.             if ((twig_length_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.'39$this->source); })()), "Tags", [], "any"falsefalsefalse39)) > 0)) {
  115.                 // line 40
  116.                 echo "                                <ul class=\"topBlocks__item__image__tags\">
  117.                                     ";
  118.                 // line 41
  119.                 $context['_parent'] = $context;
  120.                 $context['_seq'] = twig_ensure_traversable(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.'41$this->source); })()), "Tags", [], "any"falsefalsefalse41));
  121.                 foreach ($context['_seq'] as $context["_key"] => $context["Tag"]) {
  122.                     // line 42
  123.                     echo "                                        <li class=\"topBlocks__item__image__tags__tag tag_";
  124.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Tag"], "id", [], "any"falsefalsefalse42), "html"nulltrue);
  125.                     echo "\">";
  126.                     echo twig_escape_filter($this->env$context["Tag"], "html"nulltrue);
  127.                     echo "</li>
  128.                                     ";
  129.                 }
  130.                 $_parent $context['_parent'];
  131.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Tag'], $context['_parent'], $context['loop']);
  132.                 $context array_intersect_key($context$_parent) + $_parent;
  133.                 // line 44
  134.                 echo "                                </ul>
  135.                             ";
  136.             }
  137.             // line 46
  138.             echo "                        </div>
  139.                         <p class=\"topBlocks__item__name\">
  140.                             ";
  141.             // line 48
  142.             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.'48$this->source); })()), "name", [], "any"falsefalsefalse48), "html"nulltrue);
  143.             echo "
  144.                         </p>
  145.                         ";
  146.             // line 50
  147.             if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_USER")) {
  148.                 // line 51
  149.                 echo "                        <div class=\"topBlocks__item__flex\">
  150.                             <div class=\"topBlocks__item__price\">
  151.                                 ";
  152.                 // line 53
  153.                 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.'53$this->source); })()), "isInSale", [], "any"falsefalsefalse53)) {
  154.                     // line 54
  155.                     echo "                                    <p class=\"topBlocks__item__price__sale\">セール商品</p>
  156.                                 ";
  157.                 }
  158.                 // line 56
  159.                 echo "                                ";
  160.                 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.'56$this->source); })()), "hasProductClass", [], "any"falsefalsefalse56)) {
  161.                     // line 57
  162.                     echo "                                    ";
  163.                     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.'57$this->source); })()), "getPrice02Min", [], "any"falsefalsefalse57) == 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.'57$this->source); })()), "getPrice02Max", [], "any"falsefalsefalse57))) {
  164.                         // line 58
  165.                         echo "                                        ";
  166.                         echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(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.'58$this->source); })()), "getPrice02IncTaxMin", [], "any"falsefalsefalse58)), "html"nulltrue);
  167.                         echo "(税込)
  168.                                     ";
  169.                     } else {
  170.                         // line 60
  171.                         echo "                                        ";
  172.                         echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(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.'60$this->source); })()), "getPrice02IncTaxMin", [], "any"falsefalsefalse60)), "html"nulltrue);
  173.                         echo " ~ <span>";
  174.                         echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(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.'60$this->source); })()), "getPrice02IncTaxMax", [], "any"falsefalsefalse60)), "html"nulltrue);
  175.                         echo "(税込)</span>
  176.                                     ";
  177.                     }
  178.                     // line 62
  179.                     echo "                                ";
  180.                 } else {
  181.                     // line 63
  182.                     echo "                                    ";
  183.                     echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(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.'63$this->source); })()), "getPrice02IncTaxMin", [], "any"falsefalsefalse63)), "html"nulltrue);
  184.                     echo "(税込)
  185.                                 ";
  186.                 }
  187.                 // line 65
  188.                 echo "                            </div>
  189.                             <div class=\"ec-shelfGrid__item-flex__favorite\">
  190.                                 <form class=\"ec-favoriteForm\" action=\"?\" method=\"?\">
  191.                                     <div class=\"ec-productRole__btn\">
  192.                                         <button data-method=\"POST\" data-action=\"";
  193.                 // line 69
  194.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_add_favorite", ["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.'69$this->source); })()), "id", [], "any"falsefalsefalse69)]), "html"nulltrue);
  195.                 echo "\" id=\"favorite\" class=\"";
  196.                 if ((twig_get_attribute($this->env$this->source, ($context["isRecommendFavorite"] ?? null), 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.'69$this->source); })()), "id", [], "any"falsefalsefalse69), [], "array"truetruefalse69) && (twig_get_attribute($this->env$this->source, (isset($context["isRecommendFavorite"]) || array_key_exists("isRecommendFavorite"$context) ? $context["isRecommendFavorite"] : (function () { throw new RuntimeError('Variable "isRecommendFavorite" does not exist.'69$this->source); })()), 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.'69$this->source); })()), "id", [], "any"falsefalsefalse69), [], "array"falsefalsefalse69) == true))) {
  197.                     echo " d-none ";
  198.                 }
  199.                 echo " topBlocks__item__favorite ec-blockFavoriteBtn ec-blockBtn--cancel ec-shelfGrid__item-flex__favorite__btn\">
  200.                                             <img src=\"";
  201.                 // line 70
  202.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/favorite/before.svg"), "html"nulltrue);
  203.                 echo "\" alt=\"お気に入り\" width=\"24\" height=\"24\" loading=\"lazy\">
  204.                                         </button>
  205.                                         <button data-method=\"DELETE\" data-action=\"";
  206.                 // line 72
  207.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_favorite_delete", ["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.'72$this->source); })()), "id", [], "any"falsefalsefalse72)]), "html"nulltrue);
  208.                 echo "\" id=\"favorite\" class=\"";
  209.                 if ((twig_get_attribute($this->env$this->source, ($context["isRecommendFavorite"] ?? null), 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.'72$this->source); })()), "id", [], "any"falsefalsefalse72), [], "array"truetruefalse72) && (twig_get_attribute($this->env$this->source, (isset($context["isRecommendFavorite"]) || array_key_exists("isRecommendFavorite"$context) ? $context["isRecommendFavorite"] : (function () { throw new RuntimeError('Variable "isRecommendFavorite" does not exist.'72$this->source); })()), 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.'72$this->source); })()), "id", [], "any"falsefalsefalse72), [], "array"falsefalsefalse72) == false))) {
  210.                     echo " d-none ";
  211.                 }
  212.                 echo " topBlocks__item__favorite ec-blockFavoriteBtnDisable ec-blockBtn--cancel ec-shelfGrid__item-flex__favorite__btn\">
  213.                                             <img src=\"";
  214.                 // line 73
  215.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/favorite/after.svg"), "html"nulltrue);
  216.                 echo "\" alt=\"お気に入り\" width=\"24\" height=\"24\" loading=\"lazy\">
  217.                                         </button>
  218.                                     </div>
  219.                                 </form>
  220.                             </div>
  221.                         </div>
  222.                         ";
  223.             }
  224.             // line 80
  225.             echo "                    </a>
  226.                     ";
  227.             // line 81
  228.             if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_USER")) {
  229.                 // line 82
  230.                 echo "                        <form class=\"topBlocks__form\" name=\"form";
  231.                 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.'82$this->source); })()), "id", [], "any"falsefalsefalse82), "html"nulltrue);
  232.                 echo "\" id=\"recommendProductForm";
  233.                 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.'82$this->source); })()), "id", [], "any"falsefalsefalse82), "html"nulltrue);
  234.                 echo "\" action=\"";
  235.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_add_cart", ["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.'82$this->source); })()), "id", [], "any"falsefalsefalse82)]), "html"nulltrue);
  236.                 echo "\" method=\"post\">
  237.                         ";
  238.                 // line 83
  239.                 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.'83$this->source); })()), "getStockUnlimitedMin", [], "any"falsefalsefalse83) && (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.'83$this->source); })()), "getStockMin", [], "any"falsefalsefalse83) <= 0)) && 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.'83$this->source); })()), "isStockDiscontinued", [], "any"falsefalsefalse83))) {
  240.                     // line 84
  241.                     echo "                            <div class=\"ec-productRole__btn\">
  242.                                 <button type=\"button\" class=\"ec-disabled__btn\" disabled=\"disabled\">
  243.                                     ";
  244.                     // line 86
  245.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("在庫なし"), "html"nulltrue);
  246.                     echo "
  247.                                 </button>
  248.                             </div>
  249.                         ";
  250.                 } else {
  251.                     // line 90
  252.                     echo "                            <div class=\"ec-numberInput d-none\"><span>";
  253.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("数量"), "html"nulltrue);
  254.                     echo "</span>
  255.                                 ";
  256.                     // line 91
  257.                     echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'91$this->source); })()), "quantity", [], "any"falsefalsefalse91), 'widget', ["attr" => ["class" => "quantity"]]);
  258.                     echo "
  259.                                 ";
  260.                     // line 92
  261.                     echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'92$this->source); })()), "quantity", [], "any"falsefalsefalse92), 'errors');
  262.                     echo "
  263.                             </div>
  264.                             <div class=\"d-none\">
  265.                                 ";
  266.                     // line 95
  267.                     echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock((isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'95$this->source); })()), 'rest');
  268.                     echo "
  269.                             </div>
  270.                             <div class=\"ec-productRole__btn--group ec-productRole__btn ";
  271.                     // line 97
  272.                     if (twig_get_attribute($this->env$this->source, ($context["recommendItemInCart"] ?? null), 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.'97$this->source); })()), "id", [], "any"falsefalsefalse97), [], "array"truetruefalse97)) {
  273.                         echo " d-block ";
  274.                     } else {
  275.                         echo " d-none ";
  276.                     }
  277.                     echo "\">
  278.                                 <div class=\"d-flex align-items-center ec-productRole__btn-wrapper\">
  279.                                     <button class=\"minus__btn\" data-cartid=\"";
  280.                     // line 99
  281.                     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.'99$this->source); })()), "id", [], "any"falsefalsefalse99), "html"nulltrue);
  282.                     echo "\" form=\"productForm";
  283.                     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.'99$this->source); })()), "id", [], "any"falsefalsefalse99), "html"nulltrue);
  284.                     echo "\">
  285.                                         <span>−</span>
  286.                                     </button>
  287.                                     <span class=\"quantity_label quantity_label_";
  288.                     // line 102
  289.                     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.'102$this->source); })()), "id", [], "any"falsefalsefalse102), "html"nulltrue);
  290.                     echo "\">";
  291.                     echo twig_escape_filter($this->env, (isset($context["default"]) || array_key_exists("default"$context) ? $context["default"] : (function () { throw new RuntimeError('Variable "default" does not exist.'102$this->source); })()), "html"nulltrue);
  292.                     echo "</span>
  293.                                     <button class=\"plus__btn\" data-cartid=\"";
  294.                     // line 103
  295.                     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.'103$this->source); })()), "id", [], "any"falsefalsefalse103), "html"nulltrue);
  296.                     echo "\" form=\"productForm";
  297.                     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.'103$this->source); })()), "id", [], "any"falsefalsefalse103), "html"nulltrue);
  298.                     echo "\" ";
  299.                     if ((isset($context["disabled"]) || array_key_exists("disabled"$context) ? $context["disabled"] : (function () { throw new RuntimeError('Variable "disabled" does not exist.'103$this->source); })())) {
  300.                         echo "disabled";
  301.                     }
  302.                     echo ">
  303.                                         <span>+</span>
  304.                                     </button>
  305.                                 </div>
  306.                             </div>
  307.                             <div class=\"ec-productRole__btn--only ec-productRole__btn ";
  308.                     // line 108
  309.                     if (twig_get_attribute($this->env$this->source, ($context["recommendItemInCart"] ?? null), 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.'108$this->source); })()), "id", [], "any"falsefalsefalse108), [], "array"truetruefalse108)) {
  310.                         echo " d-none ";
  311.                     } else {
  312.                         echo " d-block ";
  313.                     }
  314.                     echo "\">
  315.                                 <button type=\"submit\" class=\"ec-regular__btn add-recommend-cart\" data-cartid=\"";
  316.                     // line 109
  317.                     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.'109$this->source); })()), "id", [], "any"falsefalsefalse109), "html"nulltrue);
  318.                     echo "\" form=\"productForm";
  319.                     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.'109$this->source); })()), "id", [], "any"falsefalsefalse109), "html"nulltrue);
  320.                     echo "\">
  321.                                     ";
  322.                     // line 110
  323.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに入れる"), "html"nulltrue);
  324.                     echo "
  325.                                 </button>
  326.                             </div>
  327.                         ";
  328.                 }
  329.                 // line 114
  330.                 echo "                        </form>
  331.                     ";
  332.             }
  333.             // line 116
  334.             echo "                </div>
  335.             </div>
  336.         ";
  337.         }
  338.         $_parent $context['_parent'];
  339.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['RecommendProduct'], $context['_parent'], $context['loop']);
  340.         $context array_intersect_key($context$_parent) + $_parent;
  341.         // line 119
  342.         echo "        <div class=\"ec-modal ec-recommend-modal\">
  343.             <div class=\"ec-modal-overlay\">
  344.                 <div class=\"ec-modal-wrap\">
  345.                     <div class=\"ec-modal-box\">
  346.                         <div class=\"ec-role\">
  347.                             <div class=\"ec-modal-icon\">
  348.                                 <img src=\"";
  349.         // line 125
  350.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/icon/icon_cart.png""user_data"), "html"nulltrue);
  351.         echo "\" alt=\"\">
  352.                             </div>
  353.                         </div>
  354.                     </div>
  355.                     <div id=\"ec-modal-header\" class=\"text-center\">";
  356.         // line 129
  357.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに追加しました。"), "html"nulltrue);
  358.         echo "</div>
  359.                 </div>
  360.             </div>
  361.         </div>
  362.     </div>
  363. </div>
  364. <script>
  365.     \$('.ec-modal-wrap').on('click', function(e) {
  366.         // モーダル内の処理は外側にバブリングさせない
  367.         e.stopPropagation();
  368.     });
  369.     \$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
  370.         \$('.ec-modal').hide()
  371.     });
  372.     var modalTimer;
  373.     \$('.add-recommend-cart').on('click', function(e) {
  374.         var self = \$(this);
  375.         onAddCart(e, \$(this), 1, function() {
  376.             checkRenderButton();
  377.             window.clearTimeout(modalTimer);
  378.             \$('.ec-modal.ec-recommend-modal').show()
  379.             modalTimer = window.setTimeout(function() {
  380.                 \$('.ec-modal').hide();
  381.             }, 1500)
  382.         });
  383.     });
  384.     \$(document).on('click', '.minus__btn', function(e) {
  385.         e.preventDefault();
  386.         e.stopPropagation();
  387.         onAddCart(e, \$(this), -1);
  388.     })
  389.     \$('.plus__btn').on('click', function(e) {
  390.         e.preventDefault();
  391.         e.stopPropagation();
  392.         onAddCart(e, \$(this), 1);
  393.     });
  394. </script>
  395. ";
  396.         
  397.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  398.         
  399.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  400.     }
  401.     public function getTemplateName()
  402.     {
  403.         return "Block/recommend_product_block.twig";
  404.     }
  405.     public function isTraitable()
  406.     {
  407.         return false;
  408.     }
  409.     public function getDebugInfo()
  410.     {
  411.         return array (  366 => 129,  359 => 125,  351 => 119,  343 => 116,  339 => 114,  332 => 110,  326 => 109,  318 => 108,  304 => 103,  298 => 102,  290 => 99,  281 => 97,  276 => 95,  270 => 92,  266 => 91,  261 => 90,  254 => 86,  250 => 84,  248 => 83,  239 => 82,  237 => 81,  234 => 80,  224 => 73,  216 => 72,  211 => 70,  203 => 69,  197 => 65,  191 => 63,  188 => 62,  180 => 60,  174 => 58,  171 => 57,  168 => 56,  164 => 54,  162 => 53,  158 => 51,  156 => 50,  151 => 48,  147 => 46,  143 => 44,  132 => 42,  128 => 41,  125 => 40,  123 => 39,  117 => 38,  112 => 36,  109 => 35,  103 => 33,  100 => 32,  97 => 31,  94 => 30,  90 => 28,  87 => 27,  84 => 26,  81 => 25,  78 => 24,  75 => 23,  73 => 22,  70 => 21,  67 => 20,  64 => 19,  60 => 18,  54 => 15,  48 => 12,  43 => 9,);
  412.     }
  413.     public function getSourceContext()
  414.     {
  415.         return new Source("{#
  416.  * This file is part of the Recommend Product plugin
  417.  *
  418.  * Copyright (C) EC-CUBE CO.,LTD. All Rights Reserved.
  419.  *
  420.  * For the full copyright and license information, please view the LICENSE
  421.  * file that was distributed with this source code.
  422. #}
  423. <div class=\"topBlocks\">
  424.     <div class=\"titleBlock\">
  425.         <div class=\"titleBlock__name\">
  426.             <img class=\"titleBlock__name__icon\" src=\"{{ asset('assets/img/top/recommend.svg') }}\" alt=\"注目商品\" width=\"32\" height=\"27\" loading=\"lazy\">
  427.             <h2 class=\"titleBlock__name__title\">注目商品</h2>
  428.         </div>
  429.         <a href=\"{{ url('product_recommend') }}?orderby=4\" class=\"titleBlock__link\">もっとみる</a>
  430.     </div>
  431.     <div class=\"topBlocks__scroll\">
  432.         {% for RecommendProduct in Products %}
  433.             {% set Product = RecommendProduct.Product %}
  434.             {% set form = forms[Product.id] %}
  435.             <div class=\"topBlocks__item popular-item\">
  436.                 {% set default = 0 %}
  437.                 {% if recommendItemInCart[Product.id] is defined %}
  438.                     {% set default = recommendItemInCart[Product.id] %}
  439.                 {% endif %}
  440.                 {% set disabled = false %}
  441.                 {% if not Product.isStockDiscontinued %}
  442.                     <input type=\"hidden\" name=\"stock\" class=\"stock\" value=\"999999999999\">
  443.                 {% else %}
  444.                     {% if Product.getStockMin <= default %}
  445.                         {% set disabled = true %}
  446.                     {% endif %}
  447.                     <input type=\"hidden\" name=\"stock\" class=\"stock\" value=\"{{Product.getStockMin}}\">
  448.                 {% endif %}
  449.                 <div class=\"topBlocks__form\">
  450.                     <a href=\"{{ url('product_detail', {'id': Product.id}) }}\"  role=\"group\" >
  451.                         <div class=\"topBlocks__item__image\">
  452.                             <img src=\"{{ asset(Product.main_list_image|no_image_product, 'save_image') }}\" alt=\" {{Product.name}}\">
  453.                             {% if Product.Tags|length > 0  %}
  454.                                 <ul class=\"topBlocks__item__image__tags\">
  455.                                     {% for Tag in Product.Tags %}
  456.                                         <li class=\"topBlocks__item__image__tags__tag tag_{{ Tag.id }}\">{{ Tag }}</li>
  457.                                     {% endfor %}
  458.                                 </ul>
  459.                             {% endif %}
  460.                         </div>
  461.                         <p class=\"topBlocks__item__name\">
  462.                             {{Product.name}}
  463.                         </p>
  464.                         {% if is_granted('ROLE_USER') %}
  465.                         <div class=\"topBlocks__item__flex\">
  466.                             <div class=\"topBlocks__item__price\">
  467.                                 {% if Product.isInSale %}
  468.                                     <p class=\"topBlocks__item__price__sale\">セール商品</p>
  469.                                 {% endif %}
  470.                                 {% if Product.hasProductClass %}
  471.                                     {% if Product.getPrice02Min == Product.getPrice02Max %}
  472.                                         {{ Product.getPrice02IncTaxMin|price }}(税込)
  473.                                     {% else %}
  474.                                         {{ Product.getPrice02IncTaxMin|price }} ~ <span>{{ Product.getPrice02IncTaxMax|price }}(税込)</span>
  475.                                     {% endif %}
  476.                                 {% else %}
  477.                                     {{ Product.getPrice02IncTaxMin|price }}(税込)
  478.                                 {% endif %}
  479.                             </div>
  480.                             <div class=\"ec-shelfGrid__item-flex__favorite\">
  481.                                 <form class=\"ec-favoriteForm\" action=\"?\" method=\"?\">
  482.                                     <div class=\"ec-productRole__btn\">
  483.                                         <button data-method=\"POST\" data-action=\"{{ url('product_add_favorite', {id:Product.id}) }}\" id=\"favorite\" class=\"{% if isRecommendFavorite[Product.id] is defined and isRecommendFavorite[Product.id] == true %} d-none {% endif %} topBlocks__item__favorite ec-blockFavoriteBtn ec-blockBtn--cancel ec-shelfGrid__item-flex__favorite__btn\">
  484.                                             <img src=\"{{ asset('assets/img/favorite/before.svg') }}\" alt=\"お気に入り\" width=\"24\" height=\"24\" loading=\"lazy\">
  485.                                         </button>
  486.                                         <button data-method=\"DELETE\" data-action=\"{{ url('product_favorite_delete', {id:Product.id}) }}\" id=\"favorite\" class=\"{% if isRecommendFavorite[Product.id] is defined and isRecommendFavorite[Product.id] == false %} d-none {% endif %} topBlocks__item__favorite ec-blockFavoriteBtnDisable ec-blockBtn--cancel ec-shelfGrid__item-flex__favorite__btn\">
  487.                                             <img src=\"{{ asset('assets/img/favorite/after.svg') }}\" alt=\"お気に入り\" width=\"24\" height=\"24\" loading=\"lazy\">
  488.                                         </button>
  489.                                     </div>
  490.                                 </form>
  491.                             </div>
  492.                         </div>
  493.                         {% endif %}
  494.                     </a>
  495.                     {% if is_granted('ROLE_USER') %}
  496.                         <form class=\"topBlocks__form\" name=\"form{{ Product.id }}\" id=\"recommendProductForm{{ Product.id }}\" action=\"{{ url('product_add_cart', {id:Product.id}) }}\" method=\"post\">
  497.                         {% if not Product.getStockUnlimitedMin and Product.getStockMin <= 0 and Product.isStockDiscontinued %}
  498.                             <div class=\"ec-productRole__btn\">
  499.                                 <button type=\"button\" class=\"ec-disabled__btn\" disabled=\"disabled\">
  500.                                     {{ '在庫なし'|trans }}
  501.                                 </button>
  502.                             </div>
  503.                         {% else %}
  504.                             <div class=\"ec-numberInput d-none\"><span>{{ '数量'|trans }}</span>
  505.                                 {{ form_widget(form.quantity, {'attr': {'class': 'quantity'}} ) }}
  506.                                 {{ form_errors(form.quantity) }}
  507.                             </div>
  508.                             <div class=\"d-none\">
  509.                                 {{ form_rest(form) }}
  510.                             </div>
  511.                             <div class=\"ec-productRole__btn--group ec-productRole__btn {% if recommendItemInCart[Product.id] is defined %} d-block {% else %} d-none {% endif %}\">
  512.                                 <div class=\"d-flex align-items-center ec-productRole__btn-wrapper\">
  513.                                     <button class=\"minus__btn\" data-cartid=\"{{ Product.id }}\" form=\"productForm{{ Product.id }}\">
  514.                                         <span>−</span>
  515.                                     </button>
  516.                                     <span class=\"quantity_label quantity_label_{{ Product.id }}\">{{ default }}</span>
  517.                                     <button class=\"plus__btn\" data-cartid=\"{{ Product.id }}\" form=\"productForm{{ Product.id }}\" {% if disabled %}disabled{% endif %}>
  518.                                         <span>+</span>
  519.                                     </button>
  520.                                 </div>
  521.                             </div>
  522.                             <div class=\"ec-productRole__btn--only ec-productRole__btn {% if recommendItemInCart[Product.id] is defined %} d-none {% else %} d-block {% endif %}\">
  523.                                 <button type=\"submit\" class=\"ec-regular__btn add-recommend-cart\" data-cartid=\"{{ Product.id }}\" form=\"productForm{{ Product.id }}\">
  524.                                     {{ 'カートに入れる'|trans }}
  525.                                 </button>
  526.                             </div>
  527.                         {% endif %}
  528.                         </form>
  529.                     {% endif %}
  530.                 </div>
  531.             </div>
  532.         {% endfor %}
  533.         <div class=\"ec-modal ec-recommend-modal\">
  534.             <div class=\"ec-modal-overlay\">
  535.                 <div class=\"ec-modal-wrap\">
  536.                     <div class=\"ec-modal-box\">
  537.                         <div class=\"ec-role\">
  538.                             <div class=\"ec-modal-icon\">
  539.                                 <img src=\"{{ asset('assets/img/icon/icon_cart.png', 'user_data') }}\" alt=\"\">
  540.                             </div>
  541.                         </div>
  542.                     </div>
  543.                     <div id=\"ec-modal-header\" class=\"text-center\">{{ 'カートに追加しました。'|trans }}</div>
  544.                 </div>
  545.             </div>
  546.         </div>
  547.     </div>
  548. </div>
  549. <script>
  550.     \$('.ec-modal-wrap').on('click', function(e) {
  551.         // モーダル内の処理は外側にバブリングさせない
  552.         e.stopPropagation();
  553.     });
  554.     \$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
  555.         \$('.ec-modal').hide()
  556.     });
  557.     var modalTimer;
  558.     \$('.add-recommend-cart').on('click', function(e) {
  559.         var self = \$(this);
  560.         onAddCart(e, \$(this), 1, function() {
  561.             checkRenderButton();
  562.             window.clearTimeout(modalTimer);
  563.             \$('.ec-modal.ec-recommend-modal').show()
  564.             modalTimer = window.setTimeout(function() {
  565.                 \$('.ec-modal').hide();
  566.             }, 1500)
  567.         });
  568.     });
  569.     \$(document).on('click', '.minus__btn', function(e) {
  570.         e.preventDefault();
  571.         e.stopPropagation();
  572.         onAddCart(e, \$(this), -1);
  573.     })
  574.     \$('.plus__btn').on('click', function(e) {
  575.         e.preventDefault();
  576.         e.stopPropagation();
  577.         onAddCart(e, \$(this), 1);
  578.     });
  579. </script>
  580. ""Block/recommend_product_block.twig""/home/bravers/bravers.xbiz.jp/public_html/app/template/bravers/Block/recommend_product_block.twig");
  581.     }
  582. }