var/cache/dev/twig/d1/d166c1755a0e79f9cd096af82ce3f697.php line 63

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. /* Product/detail.twig */
  14. class __TwigTemplate_7713beff1d5bafbae09d3e21542661c7 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->blocks = [
  23.             'main' => [$this'block_main'],
  24.         ];
  25.         $this->sandbox $this->env->getExtension('\Twig\Extension\SandboxExtension');
  26.         $this->checkSecurity();
  27.     }
  28.     protected function doGetParent(array $context)
  29.     {
  30.         // line 11
  31.         return "default_frame.twig";
  32.     }
  33.     protected function doDisplay(array $context, array $blocks = [])
  34.     {
  35.         $macros $this->macros;
  36.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  37.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Product/detail.twig"));
  38.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  39.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Product/detail.twig"));
  40.         // line 13
  41.         $context["body_class"] = "product_page";
  42.         // line 11
  43.         $this->parent $this->loadTemplate("default_frame.twig""Product/detail.twig"11);
  44.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  45.         
  46.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  47.         
  48.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  49.     }
  50.     // line 15
  51.     public function block_main($context, array $blocks = [])
  52.     {
  53.         $macros $this->macros;
  54.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  55.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  56.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  57.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  58.         // line 16
  59.         echo "<link rel=\"stylesheet\" href=\"";
  60.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("aneros/css/products.css?v=20240201"), "html"nulltrue);
  61.         echo "\">
  62. ";
  63.         // line 19
  64.         echo "
  65. ";
  66.         // line 20
  67.         $context["review_list"] = twig_get_attribute($this->env$this->source$this->env->getFunction('repository')->getCallable()("Plugin\\CustomerReview42\\Entity\\CustomerReviewTotal"), "getRecommend", [=> 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"falsefalsetrue20)], "method"falsefalsetrue20);
  68.         // line 21
  69.         $context["reviewer_total"] = 0;
  70.         // line 22
  71.         $context["review_total_point"] = 0;
  72.         // line 23
  73.         $context["count"] = 5;
  74.         // line 24
  75.         $context['_parent'] = $context;
  76.         $context['_seq'] = twig_ensure_traversable((isset($context["review_list"]) || array_key_exists("review_list"$context) ? $context["review_list"] : (function () { throw new RuntimeError('Variable "review_list" does not exist.'24$this->source); })()));
  77.         foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
  78.             // line 25
  79.             echo "    ";
  80.             $context["reviewer_total"] = ((isset($context["reviewer_total"]) || array_key_exists("reviewer_total"$context) ? $context["reviewer_total"] : (function () { throw new RuntimeError('Variable "reviewer_total" does not exist.'25$this->source); })()) + $context["i"]);
  81.             // line 26
  82.             echo "    ";
  83.             $context["review_total_point"] = ((isset($context["review_total_point"]) || array_key_exists("review_total_point"$context) ? $context["review_total_point"] : (function () { throw new RuntimeError('Variable "review_total_point" does not exist.'26$this->source); })()) + ($context["i"] * (isset($context["count"]) || array_key_exists("count"$context) ? $context["count"] : (function () { throw new RuntimeError('Variable "count" does not exist.'26$this->source); })())));
  84.             // line 27
  85.             echo "    ";
  86.             $context["count"] = ((isset($context["count"]) || array_key_exists("count"$context) ? $context["count"] : (function () { throw new RuntimeError('Variable "count" does not exist.'27$this->source); })()) - 1);
  87.         }
  88.         $_parent $context['_parent'];
  89.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
  90.         $context array_intersect_key($context$_parent) + $_parent;
  91.         // line 29
  92.         $context["review_point"] = ((((isset($context["reviewer_total"]) || array_key_exists("reviewer_total"$context) ? $context["reviewer_total"] : (function () { throw new RuntimeError('Variable "reviewer_total" does not exist.'29$this->source); })()) == 0)) ? (0) : (((isset($context["review_total_point"]) || array_key_exists("review_total_point"$context) ? $context["review_total_point"] : (function () { throw new RuntimeError('Variable "review_total_point" does not exist.'29$this->source); })()) / (isset($context["reviewer_total"]) || array_key_exists("reviewer_total"$context) ? $context["reviewer_total"] : (function () { throw new RuntimeError('Variable "reviewer_total" does not exist.'29$this->source); })()))));
  93.         // line 30
  94.         echo "
  95. ";
  96.         // line 31
  97.         $context["Reviews_avg"] = (isset($context["review_point"]) || array_key_exists("review_point"$context) ? $context["review_point"] : (function () { throw new RuntimeError('Variable "review_point" does not exist.'31$this->source); })());
  98.         // line 32
  99.         $context["ProductReviewCount"] = (isset($context["reviewer_total"]) || array_key_exists("reviewer_total"$context) ? $context["reviewer_total"] : (function () { throw new RuntimeError('Variable "reviewer_total" does not exist.'32$this->source); })());
  100.         // line 42
  101.         echo "
  102. ";
  103.         // line 43
  104.         $context["tag"] = "";
  105.         // line 44
  106.         $context["arrivemail"] = true;
  107.         // line 45
  108.         $context['_parent'] = $context;
  109.         $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.'45$this->source); })()), "ProductTag", [], "any"falsefalsetrue45));
  110.         foreach ($context['_seq'] as $context["_key"] => $context["ProductTag"]) {
  111.             // line 46
  112.             if ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["ProductTag"], "Tag", [], "any"falsefalsetrue46), "id", [], "any"falsefalsetrue46) == 99)) {
  113.                 // line 47
  114.                 $context["arrivemail"] = false;
  115.             }
  116.             // line 49
  117.             echo "
  118. ";
  119.             // line 50
  120.             if (((isset($context["tag"]) || array_key_exists("tag"$context) ? $context["tag"] : (function () { throw new RuntimeError('Variable "tag" does not exist.'50$this->source); })()) != "")) {
  121.                 // line 51
  122.                 $context["tag"] = ($this->sandbox->ensureToStringAllowed((isset($context["tag"]) || array_key_exists("tag"$context) ? $context["tag"] : (function () { throw new RuntimeError('Variable "tag" does not exist.'51$this->source); })()), 51$this->source) . ",");
  123.             }
  124.             // line 53
  125.             $context["tag"] = ($this->sandbox->ensureToStringAllowed((isset($context["tag"]) || array_key_exists("tag"$context) ? $context["tag"] : (function () { throw new RuntimeError('Variable "tag" does not exist.'53$this->source); })()), 53$this->source) . $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["ProductTag"], "Tag", [], "any"falsefalsetrue53), "id", [], "any"falsefalsetrue53), 53$this->source));
  126.             // line 54
  127.             echo "
  128. ";
  129.             // line 55
  130.             if ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["ProductTag"], "Tag", [], "any"falsefalsetrue55), "id", [], "any"falsefalsetrue55) == 100)) {
  131.                 // line 56
  132.                 echo "<script>
  133. \$(function() {
  134. \t\$('#product-detail-page .product-main-image > img').wrap('<div class=\"campaign_warp campaignProduct\">')
  135. \t
  136. \t\$('#default-product-page .product-image-gallery').addClass('campaignProduct');
  137. });
  138. </script>
  139. ";
  140.             } elseif ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source,             // line 63
  141. $context["ProductTag"], "Tag", [], "any"falsefalsetrue63), "id", [], "any"falsefalsetrue63) == 1)) {
  142.                 // line 64
  143.                 echo "<script>
  144. \$(function() {
  145. \t\$('#product-detail-page .product-main-image > img').wrap('<div class=\"campaign_warp newProduct\">')
  146. \t
  147. \t\$('#default-product-page .product-image-gallery').addClass('newProduct');
  148. });
  149. </script>
  150. ";
  151.             } elseif ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source,             // line 71
  152. $context["ProductTag"], "Tag", [], "any"falsefalsetrue71), "id", [], "any"falsefalsetrue71) == 3)) {
  153.                 // line 72
  154.                 echo "<script>
  155. \$(function() {
  156. \t\$('#product-detail-page .product-main-image > img').wrap('<div class=\"campaign_warp limitedProduct\">')
  157. \t
  158. \t\$('#default-product-page .product-image-gallery').addClass('limitedProduct');
  159. });
  160. </script>
  161. ";
  162.             }
  163.             // line 80
  164.             echo "
  165. ";
  166.         }
  167.         $_parent $context['_parent'];
  168.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ProductTag'], $context['_parent'], $context['loop']);
  169.         $context array_intersect_key($context$_parent) + $_parent;
  170.         // line 82
  171.         echo "<div id=\"taglist\" data-tagid=\"";
  172.         echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed((isset($context["tag"]) || array_key_exists("tag"$context) ? $context["tag"] : (function () { throw new RuntimeError('Variable "tag" does not exist.'82$this->source); })()), 82$this->source), "html"nulltrue);
  173.         echo "\" style=\"display: none;\"></div>
  174. ";
  175.         // line 84
  176.         if ( !twig_test_empty(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.'84$this->source); })()), "code_min", [], "any"falsefalsetrue84))) {
  177.             // line 85
  178.             if ($this->extensions['Customize\Twig\Extension\AnerosExtension']->existsTemplate((("Product/" 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.'85$this->source); })()), "code_min", [], "any"falsefalsetrue85)) . ".twig"))) {
  179.                 // line 86
  180.                 echo $this->extensions['Eccube\Twig\Extension\IgnoreTwigSandboxErrorExtension']->twig_include($this->env$context, (("Product/" $this->sandbox->ensureToStringAllowed(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.'86$this->source); })()), "code_min", [], "any"falsefalsetrue86), 86$this->source)) . ".twig"));
  181.                 echo "
  182. ";
  183.             } else {
  184.                 // line 88
  185.                 echo $this->extensions['Eccube\Twig\Extension\IgnoreTwigSandboxErrorExtension']->twig_include($this->env$context"Product/detail_default.twig");
  186.                 echo "
  187. ";
  188.             }
  189.         } else {
  190.             // line 91
  191.             echo $this->extensions['Eccube\Twig\Extension\IgnoreTwigSandboxErrorExtension']->twig_include($this->env$context"Product/detail_default.twig");
  192.             echo "
  193. ";
  194.         }
  195.         // line 93
  196.         echo "
  197. ";
  198.         // line 95
  199.         echo "<div id=\"in_to_cart\" style=\"display: none;\"><img src=\"";
  200.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("aneros/img/common/loading.gif"), "html"nulltrue);
  201.         echo "\" alt=\"ロード中\" />
  202. \t<p>カートに入れています</p>
  203. </div>
  204. <div id=\"in_to_cart_end\" style=\"display: none;\">
  205. \t<a href=\"javascript: void(0)\" onclick=\"\$('#in_to_cart_end #in_to_cart_reload').click();\" class=\"btn-remove\">Close</a>
  206. \t<div id=\"in_to_cart_msg\">
  207. \t\t商品がカートに入りました
  208. \t</div>
  209. \t<div id=\"in_to_cart_image\">
  210. \t\t<img src=\"";
  211.         // line 104
  212.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->extensions['Eccube\Twig\Extension\EccubeExtension']->getNoImageProduct($this->sandbox->ensureToStringAllowed(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.'104$this->source); })()), "MainListImage", [], "any"falsefalsetrue104), 104$this->source)), "save_image"), "html"nulltrue);
  213.         echo "\" alt=\"";
  214.         echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(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.'104$this->source); })()), "name", [], "any"falsefalsetrue104), 104$this->source), "html"nulltrue);
  215.         echo "\">
  216. \t</div>
  217. \t<div id=\"in_to_cart_name\">
  218. \t\t";
  219.         // line 107
  220.         echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(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.'107$this->source); })()), "name", [], "any"falsefalsetrue107), 107$this->source), "html"nulltrue);
  221.         echo "
  222. \t</div>
  223. \t<button id=\"in_to_cart_reload\" class=\"button\" onclick=\"location.reload();\">お買い物を続ける</button>
  224. \t<a href=\"";
  225.         // line 110
  226.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("cart");
  227.         echo "\" id=\"in_to_cart_cart\" class=\"button\">購入手続き</a>
  228. </div>
  229. ";
  230.         // line 114
  231.         echo "<div id=\"arrivemail-area\" style=\"display: none;\">
  232. \t<div id=\"arrive-area\">
  233. \t\t<div id=\"arrive-title\">
  234. \t\t\t入荷お知らせ(入力ページ)
  235. \t\t\t<a class=\"arrivemail-close\" href=\"javascript:void(0)\">X</a>
  236. \t\t</div>
  237. \t\t<div class=\"arrive-inbox\">
  238. \t\t\t<div id=\"arrive-sub1\">
  239. \t\t\t\t下記の製品が入荷いたしましたらメールでお知らせいたします。
  240. \t\t\t</div>
  241. \t\t</div>
  242. \t\t<div class=\"arrive-inbox\">
  243. \t\t\t<div class=\"arrive-itemname\">商品名:</div>
  244. \t\t\t<div class=\"arrive-item\" id=\"product-name\"></div>
  245. \t\t</div>
  246. \t\t<div class=\"arrive-inbox\" style=\"margin-bottom:10px;\">
  247. \t\t\t<div class=\"arrive-itemname-comment\">メールアドレス</div>
  248. \t\t\t<div class=\"arrive-item\">
  249. \t\t\t\t<span class=\"inputholder inputholder1\" style=\"width:262px;background-position:0 -29px;\">
  250. \t\t\t\t\t<input type=\"email\" name=\"arrivemail-mail\" value=\"\" maxlength=\"50\" class=\"box350\" />
  251. \t\t\t\t</span>
  252. \t\t\t\t<span class=\"attention\">※ 正しいメールアドレスを入力してください。</span>
  253. \t\t\t</div>
  254. \t\t</div>
  255. \t\t<div class=\"arrive-inbox\">
  256. \t\t\t<div style=\"margin-bottom:10px;margin-right:15px;\">
  257. \t\t\t\t<font color=\"#FF0000\"><small><b>*</b></small></font>商品の入荷をお知らせするメールサービスです。ご予約を行うものではありません。
  258. \t\t\t</div>
  259. \t\t</div>
  260. \t\t<div class=\"arrive-inbox\">
  261. \t\t\t<div style=\"margin-bottom:10px;margin-right:15px;\">
  262. \t\t\t\t<font color=\"#FF0000\"><small><b>*</b></small></font>携帯メールの場合はドメイン解除の設定をお願いいたします。
  263. \t\t\t</div>
  264. \t\t</div>
  265. \t\t<div class=\"arrive-inbox\">
  266. \t\t\t<div style=\"margin-bottom:10px;margin-right:15px;\">
  267. \t\t\t\t<font color=\"#FF0000\"><small><b>*</b></small></font>お客様の迷惑メールの設定によってメールがお届けできない場合がございます。
  268. \t\t\t</div>
  269. \t\t</div>
  270. \t\t<div class=\"arrive-line\"></div>
  271. \t\t<div class=\"arrive-submitbtn\"><a href=\"javascript:void(0)\" class=\"button blue-btn\" name=\"conf\"
  272. \t\t\t\tid=\"arrivemail-submit\">登録します</a></div>
  273. \t</div>
  274. </div>
  275. <div id=\"arrivemail-area-end\" style=\"display: none;\">
  276. \t<div id=\"arrive-area\">
  277. \t\t<div id=\"arrive-title\">入荷お知らせ(完了ページ)
  278. \t\t\t<a class=\"arrivemail-close\" href=\"javascript:void(0)\">X</a>
  279. \t\t</div>
  280. \t\t<div class=\"arrive-inbox\">
  281. \t\t\t<div id=\"arrive-sub1\">メールアドレスを受付けました。</div>
  282. \t\t</div>
  283. \t\t<div class=\"arrive-inbox\">
  284. \t\t\t<div class=\"arrive-itemname\">商品名:</div>
  285. \t\t\t<div class=\"arrive-item\" id=\"product-name\"></div>
  286. \t\t</div>
  287. \t\t<div class=\"arrive-inbox\">
  288. \t\t\t<div class=\"arrive-itemname-comment\">メールアドレス:</div>
  289. \t\t\t<div class=\"arrive-item\" id=\"send-arrivemail-mail\"></div>
  290. \t\t</div>
  291. \t\t<div class=\"arrive-inbox\">
  292. \t\t\t<div style=\"margin-bottom:10px;margin-right:15px;\">商品が入荷いたしましたらメールでお知らせいたします。</div>
  293. \t\t</div>
  294. \t\t<div class=\"arrive-line\"></div>
  295. \t\t<div class=\"arrive-submitbtn\">
  296. \t\t\t<a href=\"javascript:void(0)\" class=\"button grey-btn grey-btn-mail\" name=\"conf\" id=\"arrivemail-submit-end\">閉じます</a>
  297. \t\t</div>
  298. \t</div>
  299. </div>
  300. <script src=\"";
  301.         // line 185
  302.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("aneros/js/products.js"), "html"nulltrue);
  303.         echo "\"></script>
  304. ";
  305.         
  306.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  307.         
  308.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  309.     }
  310.     public function getTemplateName()
  311.     {
  312.         return "Product/detail.twig";
  313.     }
  314.     public function isTraitable()
  315.     {
  316.         return false;
  317.     }
  318.     public function getDebugInfo()
  319.     {
  320.         return array (  321 => 185,  248 => 114,  242 => 110,  236 => 107,  228 => 104,  215 => 95,  212 => 93,  207 => 91,  201 => 88,  196 => 86,  194 => 85,  192 => 84,  186 => 82,  179 => 80,  169 => 72,  167 => 71,  158 => 64,  156 => 63,  147 => 56,  145 => 55,  142 => 54,  140 => 53,  137 => 51,  135 => 50,  132 => 49,  129 => 47,  127 => 46,  123 => 45,  121 => 44,  119 => 43,  116 => 42,  114 => 32,  112 => 31,  109 => 30,  107 => 29,  100 => 27,  97 => 26,  94 => 25,  90 => 24,  88 => 23,  86 => 22,  84 => 21,  82 => 20,  79 => 19,  73 => 16,  63 => 15,  52 => 11,  50 => 13,  37 => 11,);
  321.     }
  322.     public function getSourceContext()
  323.     {
  324.         return new Source("{#
  325. This file is part of EC-CUBE
  326. Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  327. http://www.ec-cube.co.jp/
  328. For the full copyright and license information, please view the LICENSE
  329. file that was distributed with this source code.
  330. #}
  331. {% extends 'default_frame.twig' %}
  332. {% set body_class = 'product_page' %}
  333. {% block main %}
  334. <link rel=\"stylesheet\" href=\"{{ asset('aneros/css/products.css?v=20240201') }}\">
  335. {# レビュー平均値を小数点以下まで取得(aggregateRatingで使用) #}
  336. {% set review_list = repository('Plugin\\\\CustomerReview42\\\\Entity\\\\CustomerReviewTotal').getRecommend(Product.id) %}
  337. {% set reviewer_total = 0 %}
  338. {% set review_total_point = 0 %}
  339. {% set count = 5 %}
  340. {% for i in review_list %}
  341.     {% set reviewer_total = reviewer_total + i %}
  342.     {% set review_total_point = review_total_point + i * count %}
  343.     {% set count = count - 1 %}
  344. {% endfor %}
  345. {% set review_point = reviewer_total == 0 ? 0  : (review_total_point / reviewer_total) %}
  346. {% set Reviews_avg = review_point %}
  347. {% set ProductReviewCount = reviewer_total %}
  348. {#
  349. {% for Review in ProductReviews %}
  350. \t{% set Reviews_avg = Reviews_avg + Review.recommend_level %}
  351. \t{% set ProductReviewCount = ProductReviewCount + 1 %}
  352. {% endfor %}
  353. {% if 0 < Reviews_avg %}
  354. \t{% set Reviews_avg = Reviews_avg / ProductReviewCount %}
  355. {% endif %}
  356. #}
  357. {% set tag = \"\" %}
  358. {% set arrivemail = true %}
  359. {% for ProductTag in Product.ProductTag %}
  360. {% if ProductTag.Tag.id == 99 %}
  361. {% set arrivemail = false %}
  362. {% endif %}
  363. {% if tag != \"\" %}
  364. {% set tag = tag~\",\" %}
  365. {% endif %}
  366. {% set tag = tag~ProductTag.Tag.id %}
  367. {% if ProductTag.Tag.id == 100 %}
  368. <script>
  369. \$(function() {
  370. \t\$('#product-detail-page .product-main-image > img').wrap('<div class=\"campaign_warp campaignProduct\">')
  371. \t
  372. \t\$('#default-product-page .product-image-gallery').addClass('campaignProduct');
  373. });
  374. </script>
  375. {% elseif ProductTag.Tag.id == 1 %}
  376. <script>
  377. \$(function() {
  378. \t\$('#product-detail-page .product-main-image > img').wrap('<div class=\"campaign_warp newProduct\">')
  379. \t
  380. \t\$('#default-product-page .product-image-gallery').addClass('newProduct');
  381. });
  382. </script>
  383. {% elseif ProductTag.Tag.id == 3 %}
  384. <script>
  385. \$(function() {
  386. \t\$('#product-detail-page .product-main-image > img').wrap('<div class=\"campaign_warp limitedProduct\">')
  387. \t
  388. \t\$('#default-product-page .product-image-gallery').addClass('limitedProduct');
  389. });
  390. </script>
  391. {% endif %}
  392. {% endfor %}
  393. <div id=\"taglist\" data-tagid=\"{{ tag }}\" style=\"display: none;\"></div>
  394. {% if Product.code_min is not empty %}
  395. {% if exists_template('Product/'~Product.code_min~'.twig') %}
  396. {{ include('Product/'~Product.code_min~'.twig') }}
  397. {% else %}
  398. {{ include('Product/detail_default.twig') }}
  399. {% endif %}
  400. {% else %}
  401. {{ include('Product/detail_default.twig') }}
  402. {% endif %}
  403. {# カートに入れる #}
  404. <div id=\"in_to_cart\" style=\"display: none;\"><img src=\"{{ asset('aneros/img/common/loading.gif') }}\" alt=\"ロード中\" />
  405. \t<p>カートに入れています</p>
  406. </div>
  407. <div id=\"in_to_cart_end\" style=\"display: none;\">
  408. \t<a href=\"javascript: void(0)\" onclick=\"\$('#in_to_cart_end #in_to_cart_reload').click();\" class=\"btn-remove\">Close</a>
  409. \t<div id=\"in_to_cart_msg\">
  410. \t\t商品がカートに入りました
  411. \t</div>
  412. \t<div id=\"in_to_cart_image\">
  413. \t\t<img src=\"{{ asset(Product.MainListImage|no_image_product, 'save_image') }}\" alt=\"{{ Product.name }}\">
  414. \t</div>
  415. \t<div id=\"in_to_cart_name\">
  416. \t\t{{ Product.name }}
  417. \t</div>
  418. \t<button id=\"in_to_cart_reload\" class=\"button\" onclick=\"location.reload();\">お買い物を続ける</button>
  419. \t<a href=\"{{ url('cart') }}\" id=\"in_to_cart_cart\" class=\"button\">購入手続き</a>
  420. </div>
  421. {# 入荷お知らせ登録 #}
  422. <div id=\"arrivemail-area\" style=\"display: none;\">
  423. \t<div id=\"arrive-area\">
  424. \t\t<div id=\"arrive-title\">
  425. \t\t\t入荷お知らせ(入力ページ)
  426. \t\t\t<a class=\"arrivemail-close\" href=\"javascript:void(0)\">X</a>
  427. \t\t</div>
  428. \t\t<div class=\"arrive-inbox\">
  429. \t\t\t<div id=\"arrive-sub1\">
  430. \t\t\t\t下記の製品が入荷いたしましたらメールでお知らせいたします。
  431. \t\t\t</div>
  432. \t\t</div>
  433. \t\t<div class=\"arrive-inbox\">
  434. \t\t\t<div class=\"arrive-itemname\">商品名:</div>
  435. \t\t\t<div class=\"arrive-item\" id=\"product-name\"></div>
  436. \t\t</div>
  437. \t\t<div class=\"arrive-inbox\" style=\"margin-bottom:10px;\">
  438. \t\t\t<div class=\"arrive-itemname-comment\">メールアドレス</div>
  439. \t\t\t<div class=\"arrive-item\">
  440. \t\t\t\t<span class=\"inputholder inputholder1\" style=\"width:262px;background-position:0 -29px;\">
  441. \t\t\t\t\t<input type=\"email\" name=\"arrivemail-mail\" value=\"\" maxlength=\"50\" class=\"box350\" />
  442. \t\t\t\t</span>
  443. \t\t\t\t<span class=\"attention\">※ 正しいメールアドレスを入力してください。</span>
  444. \t\t\t</div>
  445. \t\t</div>
  446. \t\t<div class=\"arrive-inbox\">
  447. \t\t\t<div style=\"margin-bottom:10px;margin-right:15px;\">
  448. \t\t\t\t<font color=\"#FF0000\"><small><b>*</b></small></font>商品の入荷をお知らせするメールサービスです。ご予約を行うものではありません。
  449. \t\t\t</div>
  450. \t\t</div>
  451. \t\t<div class=\"arrive-inbox\">
  452. \t\t\t<div style=\"margin-bottom:10px;margin-right:15px;\">
  453. \t\t\t\t<font color=\"#FF0000\"><small><b>*</b></small></font>携帯メールの場合はドメイン解除の設定をお願いいたします。
  454. \t\t\t</div>
  455. \t\t</div>
  456. \t\t<div class=\"arrive-inbox\">
  457. \t\t\t<div style=\"margin-bottom:10px;margin-right:15px;\">
  458. \t\t\t\t<font color=\"#FF0000\"><small><b>*</b></small></font>お客様の迷惑メールの設定によってメールがお届けできない場合がございます。
  459. \t\t\t</div>
  460. \t\t</div>
  461. \t\t<div class=\"arrive-line\"></div>
  462. \t\t<div class=\"arrive-submitbtn\"><a href=\"javascript:void(0)\" class=\"button blue-btn\" name=\"conf\"
  463. \t\t\t\tid=\"arrivemail-submit\">登録します</a></div>
  464. \t</div>
  465. </div>
  466. <div id=\"arrivemail-area-end\" style=\"display: none;\">
  467. \t<div id=\"arrive-area\">
  468. \t\t<div id=\"arrive-title\">入荷お知らせ(完了ページ)
  469. \t\t\t<a class=\"arrivemail-close\" href=\"javascript:void(0)\">X</a>
  470. \t\t</div>
  471. \t\t<div class=\"arrive-inbox\">
  472. \t\t\t<div id=\"arrive-sub1\">メールアドレスを受付けました。</div>
  473. \t\t</div>
  474. \t\t<div class=\"arrive-inbox\">
  475. \t\t\t<div class=\"arrive-itemname\">商品名:</div>
  476. \t\t\t<div class=\"arrive-item\" id=\"product-name\"></div>
  477. \t\t</div>
  478. \t\t<div class=\"arrive-inbox\">
  479. \t\t\t<div class=\"arrive-itemname-comment\">メールアドレス:</div>
  480. \t\t\t<div class=\"arrive-item\" id=\"send-arrivemail-mail\"></div>
  481. \t\t</div>
  482. \t\t<div class=\"arrive-inbox\">
  483. \t\t\t<div style=\"margin-bottom:10px;margin-right:15px;\">商品が入荷いたしましたらメールでお知らせいたします。</div>
  484. \t\t</div>
  485. \t\t<div class=\"arrive-line\"></div>
  486. \t\t<div class=\"arrive-submitbtn\">
  487. \t\t\t<a href=\"javascript:void(0)\" class=\"button grey-btn grey-btn-mail\" name=\"conf\" id=\"arrivemail-submit-end\">閉じます</a>
  488. \t\t</div>
  489. \t</div>
  490. </div>
  491. <script src=\"{{ asset('aneros/js/products.js') }}\"></script>
  492. {% endblock %}""Product/detail.twig""/home/kir018258/public_html/test.aneros.co.jp/aneros_2023_b/app/template/aneros2023/Product/detail.twig");
  493.     }
  494.     
  495.     public function checkSecurity()
  496.     {
  497.         static $tags = array("set" => 13"for" => 24"if" => 46);
  498.         static $filters = array("escape" => 16"no_image_product" => 104);
  499.         static $functions = array("asset" => 16"repository" => 20"exists_template" => 85"include" => 86"url" => 110);
  500.         try {
  501.             $this->sandbox->checkSecurity(
  502.                 ['set''for''if'],
  503.                 ['escape''no_image_product'],
  504.                 ['asset''repository''exists_template''include''url']
  505.             );
  506.         } catch (SecurityError $e) {
  507.             $e->setSourceContext($this->source);
  508.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  509.                 $e->setTemplateLine($tags[$e->getTagName()]);
  510.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  511.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  512.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  513.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  514.             }
  515.             throw $e;
  516.         }
  517.     }
  518. }