var/cache/dev/twig/23/239406b9dbc2e67cca5de5b703cab056.php line 141

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/lm_item_cart_area.twig */
  14. class __TwigTemplate_94d7c8123a1af60c8e42f964994b4b36 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.         $this->sandbox $this->env->getExtension('\Twig\Extension\SandboxExtension');
  26.         $this->checkSecurity();
  27.     }
  28.     protected function doDisplay(array $context, array $blocks = [])
  29.     {
  30.         $macros $this->macros;
  31.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  32.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Block/lm_item_cart_area.twig"));
  33.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  34.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Block/lm_item_cart_area.twig"));
  35.         // line 1
  36.         echo "
  37. ";
  38.         // line 2
  39.         if (((((twig_get_attribute($this->env$this->source, (isset($context["data"]) || array_key_exists("data"$context) ? $context["data"] : (function () { throw new RuntimeError('Variable "data" does not exist.'2$this->source); })()), "goods_status", [], "any"falsefalsetrue2) == 1) || (twig_get_attribute($this->env$this->source, (isset($context["data"]) || array_key_exists("data"$context) ? $context["data"] : (function () { throw new RuntimeError('Variable "data" does not exist.'2$this->source); })()), "goods_status", [], "any"falsefalsetrue2) == 11)) || (isset($context["is_preview_mode"]) || array_key_exists("is_preview_mode"$context) ? $context["is_preview_mode"] : (function () { throw new RuntimeError('Variable "is_preview_mode" does not exist.'2$this->source); })())) || (isset($context["is_secret"]) || array_key_exists("is_secret"$context) ? $context["is_secret"] : (function () { throw new RuntimeError('Variable "is_secret" does not exist.'2$this->source); })()))) {
  40.             // line 3
  41.             echo "    <!-- カート -->
  42.     <div class=\"cart_title\" style=\"position:relative;\">
  43.         <div id=\"cart_title\" style=\"position:absolute;top:-65px;\"></div>
  44.     </div>
  45.     ";
  46.             // line 7
  47.             $context["viewConst"] = "hoge";
  48.             // line 8
  49.             echo "    ";
  50.             if (twig_constant_is_defined(("_VIEW_ITEM_DETAIL_FLAG_" twig_get_attribute($this->env$this->source, (isset($context["data"]) || array_key_exists("data"$context) ? $context["data"] : (function () { throw new RuntimeError('Variable "data" does not exist.'8$this->source); })()), "goods_id", [], "any"falsefalsetrue8)))) {
  51.                 // line 9
  52.                 echo "        ";
  53.                 $context["viewConst"] = twig_constant(("_VIEW_ITEM_DETAIL_FLAG_" $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["data"]) || array_key_exists("data"$context) ? $context["data"] : (function () { throw new RuntimeError('Variable "data" does not exist.'9$this->source); })()), "goods_id", [], "any"falsefalsetrue9), 9$this->source)));
  54.                 // line 10
  55.                 echo "    ";
  56.             }
  57.             // line 11
  58.             echo "
  59.     <script type=\"text/javascript\">
  60.         (function() {
  61.             // // var DISPLAY_LINES = 6;
  62.             var DISPLAY_LINES = ";
  63.             // line 15
  64.             echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed((isset($context["DISPLAY_LINES"]) || array_key_exists("DISPLAY_LINES"$context) ? $context["DISPLAY_LINES"] : (function () { throw new RuntimeError('Variable "DISPLAY_LINES" does not exist.'15$this->source); })()), 15$this->source), "html"nulltrue);
  65.             echo ";
  66.             \$(function() {
  67.                 \$('.categories').each(function(index, element) {
  68.                     var ps = \$(this).find('p.category').each(function(index, element) {
  69.                         if (index >= DISPLAY_LINES) {
  70.                             \$(this).hide();
  71.                         }
  72.                     });
  73.                     // 「もっと見る」機能を抑制
  74.                     // // if (ps.length > DISPLAY_LINES) {
  75.                     // // \t\$('<p style=\"background-color: #FAFAFA; margin: 10px 0 0 -10px; border: 1px solid #E0E0E0; width: 80px; padding: 5px; border-radius: 5px; text-align: center;\"/>').append(
  76.                     // // \t\t\$('<div class=\"fadeout\"></div><a href=\"#\" style=\"text-decoration: none; color: #212121;\">もっと見る...</a>')
  77.                     // // \t\t  .on('mouseleave', function() {
  78.                     // // \t\t\t\$(this).css({'text-decoration':'none','color':'#212121'});
  79.                     // // \t\t}).on('mouseenter', function() {
  80.                     // // \t\t\t\$(this).css({'text-decoration':'none','color':'#36C'});
  81.                     // // \t\t}).on('click', function(event) {
  82.                     // // \t\t\t\$(this).closest('p').hide();
  83.                     // // \t\t\t\$(this).closest(\".fadeout\").hide();
  84.                     // // \t\t\t\$(ps).slideDown();
  85.                     // // \t\t\treturn false;
  86.                     // // \t\t})
  87.                     // // \t).appendTo(\$(ps).closest('div'));
  88.                     // // }
  89.                 });
  90.             });
  91.         }())
  92.     </script>
  93.     ";
  94.             // line 44
  95.             if ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["eccube_config"]) || array_key_exists("eccube_config"$context) ? $context["eccube_config"] : (function () { throw new RuntimeError('Variable "eccube_config" does not exist.'44$this->source); })()), "GoodsSetPurchase", [], "any"falsefalsetrue44), "NewUI", [], "any"falsefalsetrue44), "Enabled", [], "any"falsefalsetrue44) && twig_get_attribute($this->env$this->source, (isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'44$this->source); })()), "isGoodsSetPurchase", [], "any"falsefalsetrue44))) {
  96.                 // line 45
  97.                 echo "
  98.         ";
  99.                 // line 47
  100.                 echo "
  101.     ";
  102.             } else {
  103.                 // line 49
  104.                 echo "    <div class=\"cart_area\">
  105.         ";
  106.                 // line 51
  107.                 if ((isset($context["isYoyakuAvailable"]) || array_key_exists("isYoyakuAvailable"$context) ? $context["isYoyakuAvailable"] : (function () { throw new RuntimeError('Variable "isYoyakuAvailable" does not exist.'51$this->source); })())) {
  108.                     // line 52
  109.                     echo "        <div class=\"vim_flag\" style=\"";
  110.                     if (((isset($context["viewConst"]) || array_key_exists("viewConst"$context) ? $context["viewConst"] : (function () { throw new RuntimeError('Variable "viewConst" does not exist.'52$this->source); })()) != "on")) {
  111.                         echo " display: none;";
  112.                     }
  113.                     echo "\">
  114.             <img src=\"/images/itempage/yoyaku/yoyaku.jpg\" alt=\"在庫が無くても、予約注文なら今すぐご注文いただけます!\" />
  115.         </div>
  116.         ";
  117.                 }
  118.                 // line 56
  119.                 echo "
  120.         <div class=\"supplement\">
  121.             ";
  122.                 // line 58
  123.                 echo $this->sandbox->ensureToStringAllowed((isset($context["lm_displayHosokuSetsumei2"]) || array_key_exists("lm_displayHosokuSetsumei2"$context) ? $context["lm_displayHosokuSetsumei2"] : (function () { throw new RuntimeError('Variable "lm_displayHosokuSetsumei2" does not exist.'58$this->source); })()), 58$this->source);
  124.                 echo "
  125.         </div>
  126.         <div id=\"shopping-cart-wrapper\">
  127.             ";
  128.                 // line 62
  129.                 echo $this->extensions['Customize\Twig\Extension\ServiceExtension']->showInventoryMatrix($this->sandbox->ensureToStringAllowed((isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'62$this->source); })()), 62$this->source));
  130.                 echo "
  131.         </div>
  132.         <script>
  133.             function linkinfo";
  134.                 // line 66
  135.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'66$this->source); })()), "goodsId", [], "any"falsefalsetrue66), 66$this->source), "html"nulltrue);
  136.                 echo "(msg, id) {
  137.                 if(!document.all && !document.getElementById) { return; }
  138.                 id = (!id)  ? \"linkinfolay";
  139.                 // line 68
  140.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'68$this->source); })()), "goodsId", [], "any"falsefalsetrue68), 68$this->source), "html"nulltrue);
  141.                 echo "\" : id;
  142.                 msg= (!msg) ? \"\" : msg;
  143.                 var el = (document.getElementById) ? document.getElementById(id) : document.all(id);
  144.                 el.innerHTML = msg;
  145.             }
  146.             function checkOrderLot";
  147.                 // line 73
  148.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'73$this->source); })()), "goodsId", [], "any"falsefalsetrue73), 73$this->source), "html"nulltrue);
  149.                 echo "() {
  150.                 const now = new Date();
  151.                 const from = new Date(now.getFullYear(), now.getMonth(), now.getDate());
  152.                 const to = new Date(from.getFullYear(), from.getMonth(), from.getDate() + 90);
  153.                 var buyAmount = 0;
  154.                 if ( document.cart_fm";
  155.                 // line 78
  156.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'78$this->source); })()), "goodsId", [], "any"falsefalsetrue78), 78$this->source), "html"nulltrue);
  157.                 echo ".sample.value != \"on\" && document.cart_fm";
  158.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'78$this->source); })()), "goodsId", [], "any"falsefalsetrue78), 78$this->source), "html"nulltrue);
  159.                 echo ".sample.value != \"off\" ) {
  160.                     return false;
  161.                 }
  162.                 for ( i=1; i<=document.cart_fm";
  163.                 // line 81
  164.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'81$this->source); })()), "goodsId", [], "any"falsefalsetrue81), 81$this->source), "html"nulltrue);
  165.                 echo ".elements.length; i++ ) {
  166.                     if ( document.cart_fm";
  167.                 // line 82
  168.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'82$this->source); })()), "goodsId", [], "any"falsefalsetrue82), 82$this->source), "html"nulltrue);
  169.                 echo ".elements[i-1].name.substring( 0, 4 ) == \"cart\" && document.cart_fm";
  170.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'82$this->source); })()), "goodsId", [], "any"falsefalsetrue82), 82$this->source), "html"nulltrue);
  171.                 echo ".elements[i-1].type == \"text\" ) {
  172.                         if ( document.cart_fm";
  173.                 // line 83
  174.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'83$this->source); })()), "goodsId", [], "any"falsefalsetrue83), 83$this->source), "html"nulltrue);
  175.                 echo ".elements[i-1].value != \"\" && document.cart_fm";
  176.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'83$this->source); })()), "goodsId", [], "any"falsefalsetrue83), 83$this->source), "html"nulltrue);
  177.                 echo ".elements[i-1].value.match(/[0-9]+/g) == document.cart_fm";
  178.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'83$this->source); })()), "goodsId", [], "any"falsefalsetrue83), 83$this->source), "html"nulltrue);
  179.                 echo ".elements[i-1].value ) {
  180.                             buyAmount += Number( document.cart_fm";
  181.                 // line 84
  182.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'84$this->source); })()), "goodsId", [], "any"falsefalsetrue84), 84$this->source), "html"nulltrue);
  183.                 echo ".elements[i-1].value );
  184.                         } else {
  185.                             document.cart_fm";
  186.                 // line 86
  187.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'86$this->source); })()), "goodsId", [], "any"falsefalsetrue86), 86$this->source), "html"nulltrue);
  188.                 echo ".elements[i-1].value = \"\";
  189.                         }
  190.                         const \$input = \$(document.cart_fm";
  191.                 // line 88
  192.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'88$this->source); })()), "goodsId", [], "any"falsefalsetrue88), 88$this->source), "html"nulltrue);
  193.                 echo ".elements[i-1]);
  194.                         if (\$input.val().trim() !== '') {
  195.                             const nyuukaYoteibi = \$input.data('nyuuka_yoteibi');
  196.                             if (nyuukaYoteibi) {
  197.                                 const tempDate = new Date(nyuukaYoteibi);
  198.                                 const date = new Date(tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate());
  199.                                 const daysDiff = getDiff(date, to);
  200.                                 if (daysDiff < 0) {
  201.                                     alert( \"予約注文できるのは入荷予定日が90日以内のものだけです。\" );
  202.                                     document.cart_fm";
  203.                 // line 97
  204.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'97$this->source); })()), "goodsId", [], "any"falsefalsetrue97), 97$this->source), "html"nulltrue);
  205.                 echo ".sample.value = \"\";
  206.                                     document.cart_fm";
  207.                 // line 98
  208.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'98$this->source); })()), "goodsId", [], "any"falsefalsetrue98), 98$this->source), "html"nulltrue);
  209.                 echo ".elements[i-1].focus();
  210.                                     return false;
  211.                                 }
  212.                             }
  213.                         }
  214.                     }
  215.                 }
  216.                 if ( buyAmount == 0 ) {
  217.                     alert( \"半角数字で数量を入力してください。\" );
  218.                     document.cart_fm";
  219.                 // line 107
  220.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'107$this->source); })()), "goodsId", [], "any"falsefalsetrue107), 107$this->source), "html"nulltrue);
  221.                 echo ".sample.value = \"\";
  222.                     document.cart_fm";
  223.                 // line 108
  224.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'108$this->source); })()), "goodsId", [], "any"falsefalsetrue108), 108$this->source), "html"nulltrue);
  225.                 echo ".cart_1_1.focus();
  226.                     return false;
  227.                 }
  228.                 if ( document.cart_fm";
  229.                 // line 111
  230.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'111$this->source); })()), "goodsId", [], "any"falsefalsetrue111), 111$this->source), "html"nulltrue);
  231.                 echo ".sample.value == \"on\" ) {
  232.                     err = false;
  233.                     err2 = 0;
  234.                     for ( i=1; i<=document.cart_fm";
  235.                 // line 114
  236.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'114$this->source); })()), "goodsId", [], "any"falsefalsetrue114), 114$this->source), "html"nulltrue);
  237.                 echo ".elements.length; i++ ) {
  238.                         if ( document.cart_fm";
  239.                 // line 115
  240.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'115$this->source); })()), "goodsId", [], "any"falsefalsetrue115), 115$this->source), "html"nulltrue);
  241.                 echo ".elements[i-1].name.substring( 0, 4 ) == \"cart\" && document.cart_fm";
  242.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'115$this->source); })()), "goodsId", [], "any"falsefalsetrue115), 115$this->source), "html"nulltrue);
  243.                 echo ".elements[i-1].type == \"text\" ) {
  244.                             if ( document.cart_fm";
  245.                 // line 116
  246.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'116$this->source); })()), "goodsId", [], "any"falsefalsetrue116), 116$this->source), "html"nulltrue);
  247.                 echo ".elements[i-1].value != \"\" && document.cart_fm";
  248.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'116$this->source); })()), "goodsId", [], "any"falsefalsetrue116), 116$this->source), "html"nulltrue);
  249.                 echo ".elements[i-1].value.match(/[0-9]+/g) == document.cart_fm";
  250.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'116$this->source); })()), "goodsId", [], "any"falsefalsetrue116), 116$this->source), "html"nulltrue);
  251.                 echo ".elements[i-1].value ) {
  252.                                 if ( Number( document.cart_fm";
  253.                 // line 117
  254.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'117$this->source); })()), "goodsId", [], "any"falsefalsetrue117), 117$this->source), "html"nulltrue);
  255.                 echo ".elements[i-1].value ) > 1 ) {
  256.                                     err = true;
  257.                                     //err2++;
  258.                                 } else if ( Number( document.cart_fm";
  259.                 // line 120
  260.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'120$this->source); })()), "goodsId", [], "any"falsefalsetrue120), 120$this->source), "html"nulltrue);
  261.                 echo ".elements[i-1].value ) == 1 ) {
  262.                                     //err2++;
  263.                                 }
  264.                                 err2+=Number( document.cart_fm";
  265.                 // line 123
  266.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'123$this->source); })()), "goodsId", [], "any"falsefalsetrue123), 123$this->source), "html"nulltrue);
  267.                 echo ".elements[i-1].value );
  268.                             }
  269.                         }
  270.                     }
  271.                     if ( err ) {
  272.                         for ( i=1; i<=document.cart_fm";
  273.                 // line 128
  274.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'128$this->source); })()), "goodsId", [], "any"falsefalsetrue128), 128$this->source), "html"nulltrue);
  275.                 echo ".elements.length; i++ ) {
  276.                             if ( document.cart_fm";
  277.                 // line 129
  278.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'129$this->source); })()), "goodsId", [], "any"falsefalsetrue129), 129$this->source), "html"nulltrue);
  279.                 echo ".elements[i-1].name.substring( 0, 4 ) == \"cart\" && document.cart_fm";
  280.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'129$this->source); })()), "goodsId", [], "any"falsefalsetrue129), 129$this->source), "html"nulltrue);
  281.                 echo ".elements[i-1].type == \"text\" ) {
  282.                                 if ( document.cart_fm";
  283.                 // line 130
  284.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'130$this->source); })()), "goodsId", [], "any"falsefalsetrue130), 130$this->source), "html"nulltrue);
  285.                 echo ".elements[i-1].value != \"\" && document.cart_fm";
  286.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'130$this->source); })()), "goodsId", [], "any"falsefalsetrue130), 130$this->source), "html"nulltrue);
  287.                 echo ".elements[i-1].value.match(/[0-9]+/g) == document.cart_fm";
  288.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'130$this->source); })()), "goodsId", [], "any"falsefalsetrue130), 130$this->source), "html"nulltrue);
  289.                 echo ".elements[i-1].value ) {
  290.                                     if ( Number( document.cart_fm";
  291.                 // line 131
  292.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'131$this->source); })()), "goodsId", [], "any"falsefalsetrue131), 131$this->source), "html"nulltrue);
  293.                 echo ".elements[i-1].value ) > 1 ) {
  294.                                         alert( '貸出サンプルは同色、同サイズ、1点でお願いします。');
  295.                                         document.cart_fm";
  296.                 // line 133
  297.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'133$this->source); })()), "goodsId", [], "any"falsefalsetrue133), 133$this->source), "html"nulltrue);
  298.                 echo ".elements[i-1].value = \"1\";
  299.                                         document.cart_fm";
  300.                 // line 134
  301.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'134$this->source); })()), "goodsId", [], "any"falsefalsetrue134), 134$this->source), "html"nulltrue);
  302.                 echo ".elements[i-1].focus();
  303.                                         return false;
  304.                                     }
  305.                                 }
  306.                             }
  307.                         }
  308.                     }
  309.                     if ( err2 > 10 ) {
  310.                         alert( '貸出サンプルは、色々な商品を合計して、10点以内でお願いします。');
  311.                         document.cart_fm";
  312.                 // line 143
  313.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'143$this->source); })()), "goodsId", [], "any"falsefalsetrue143), 143$this->source), "html"nulltrue);
  314.                 echo ".sample.value = \"\";
  315.                         document.cart_fm";
  316.                 // line 144
  317.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'144$this->source); })()), "goodsId", [], "any"falsefalsetrue144), 144$this->source), "html"nulltrue);
  318.                 echo ".cart_1_1.focus();
  319.                         return false;
  320.                     }
  321.                 }
  322.                 return true;
  323.             }
  324.             function send";
  325.                 // line 150
  326.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'150$this->source); })()), "goodsId", [], "any"falsefalsetrue150), 150$this->source), "html"nulltrue);
  327.                 echo "(){
  328.                 var win = window.open('','win";
  329.                 // line 151
  330.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'151$this->source); })()), "goodsId", [], "any"falsefalsetrue151), 151$this->source), "html"nulltrue);
  331.                 echo "','width=400,height=400,scrollbars=1');
  332.                 document.cart_fm";
  333.                 // line 152
  334.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'152$this->source); })()), "goodsId", [], "any"falsefalsetrue152), 152$this->source), "html"nulltrue);
  335.                 echo ".target = \"win";
  336.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'152$this->source); })()), "goodsId", [], "any"falsefalsetrue152), 152$this->source), "html"nulltrue);
  337.                 echo "\";
  338.                 document.cart_fm";
  339.                 // line 153
  340.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'153$this->source); })()), "goodsId", [], "any"falsefalsetrue153), 153$this->source), "html"nulltrue);
  341.                 echo ".submit();
  342.                 document.cart_fm";
  343.                 // line 154
  344.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["goods"]) || array_key_exists("goods"$context) ? $context["goods"] : (function () { throw new RuntimeError('Variable "goods" does not exist.'154$this->source); })()), "goodsId", [], "any"falsefalsetrue154), 154$this->source), "html"nulltrue);
  345.                 echo ".reset();
  346.             }
  347.         </script>
  348.     </div>
  349.     ";
  350.             }
  351.         } else {
  352.             // line 160
  353.             echo "    <div class=\"end-sale-msg\">
  354.         <img alt=\"お問い合わせイラスト\" src=\"images/detail/bow.png\" width=\"150\" /><br />
  355.         <br />
  356.         この商品は販売終了しました。<br />
  357.         商品に関するお問い合わせは<span>0120-115-116</span>までお電話ください。
  358.     </div>
  359. ";
  360.         }
  361.         
  362.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  363.         
  364.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  365.     }
  366.     public function getTemplateName()
  367.     {
  368.         return "Block/lm_item_cart_area.twig";
  369.     }
  370.     public function isTraitable()
  371.     {
  372.         return false;
  373.     }
  374.     public function getDebugInfo()
  375.     {
  376.         return array (  366 => 160,  357 => 154,  353 => 153,  347 => 152,  343 => 151,  339 => 150,  330 => 144,  326 => 143,  314 => 134,  310 => 133,  305 => 131,  297 => 130,  291 => 129,  287 => 128,  279 => 123,  273 => 120,  267 => 117,  259 => 116,  253 => 115,  249 => 114,  243 => 111,  237 => 108,  233 => 107,  221 => 98,  217 => 97,  205 => 88,  200 => 86,  195 => 84,  187 => 83,  181 => 82,  177 => 81,  169 => 78,  161 => 73,  153 => 68,  148 => 66,  141 => 62,  134 => 58,  130 => 56,  120 => 52,  118 => 51,  114 => 49,  110 => 47,  107 => 45,  105 => 44,  73 => 15,  67 => 11,  64 => 10,  61 => 9,  58 => 8,  56 => 7,  50 => 3,  48 => 2,  45 => 1,);
  377.     }
  378.     public function getSourceContext()
  379.     {
  380.         return new Source("
  381. {% if data.goods_status == 1 or data.goods_status == 11 or is_preview_mode or is_secret %}
  382.     <!-- カート -->
  383.     <div class=\"cart_title\" style=\"position:relative;\">
  384.         <div id=\"cart_title\" style=\"position:absolute;top:-65px;\"></div>
  385.     </div>
  386.     {% set viewConst = 'hoge' %}
  387.     {% if constant(\"_VIEW_ITEM_DETAIL_FLAG_#{data.goods_id}\") is defined %}
  388.         {% set viewConst = constant(\"_VIEW_ITEM_DETAIL_FLAG_#{data.goods_id}\") %}
  389.     {% endif %}
  390.     <script type=\"text/javascript\">
  391.         (function() {
  392.             // // var DISPLAY_LINES = 6;
  393.             var DISPLAY_LINES = {{ DISPLAY_LINES }};
  394.             \$(function() {
  395.                 \$('.categories').each(function(index, element) {
  396.                     var ps = \$(this).find('p.category').each(function(index, element) {
  397.                         if (index >= DISPLAY_LINES) {
  398.                             \$(this).hide();
  399.                         }
  400.                     });
  401.                     // 「もっと見る」機能を抑制
  402.                     // // if (ps.length > DISPLAY_LINES) {
  403.                     // // \t\$('<p style=\"background-color: #FAFAFA; margin: 10px 0 0 -10px; border: 1px solid #E0E0E0; width: 80px; padding: 5px; border-radius: 5px; text-align: center;\"/>').append(
  404.                     // // \t\t\$('<div class=\"fadeout\"></div><a href=\"#\" style=\"text-decoration: none; color: #212121;\">もっと見る...</a>')
  405.                     // // \t\t  .on('mouseleave', function() {
  406.                     // // \t\t\t\$(this).css({'text-decoration':'none','color':'#212121'});
  407.                     // // \t\t}).on('mouseenter', function() {
  408.                     // // \t\t\t\$(this).css({'text-decoration':'none','color':'#36C'});
  409.                     // // \t\t}).on('click', function(event) {
  410.                     // // \t\t\t\$(this).closest('p').hide();
  411.                     // // \t\t\t\$(this).closest(\".fadeout\").hide();
  412.                     // // \t\t\t\$(ps).slideDown();
  413.                     // // \t\t\treturn false;
  414.                     // // \t\t})
  415.                     // // \t).appendTo(\$(ps).closest('div'));
  416.                     // // }
  417.                 });
  418.             });
  419.         }())
  420.     </script>
  421.     {% if eccube_config.GoodsSetPurchase.NewUI.Enabled and goods.isGoodsSetPurchase %}
  422.         {# include 'Item/GoodsSetPurchase/new_cart_area.twig' with { item: item } only #}
  423.     {% else %}
  424.     <div class=\"cart_area\">
  425.         {% if isYoyakuAvailable %}
  426.         <div class=\"vim_flag\" style=\"{% if viewConst != \"on\" %} display: none;{% endif %}\">
  427.             <img src=\"/images/itempage/yoyaku/yoyaku.jpg\" alt=\"在庫が無くても、予約注文なら今すぐご注文いただけます!\" />
  428.         </div>
  429.         {% endif %}
  430.         <div class=\"supplement\">
  431.             {{ lm_displayHosokuSetsumei2 | raw }}
  432.         </div>
  433.         <div id=\"shopping-cart-wrapper\">
  434.             {{ goods | InventoryMatrix | raw }}
  435.         </div>
  436.         <script>
  437.             function linkinfo{{ goods.goodsId }}(msg, id) {
  438.                 if(!document.all && !document.getElementById) { return; }
  439.                 id = (!id)  ? \"linkinfolay{{ goods.goodsId }}\" : id;
  440.                 msg= (!msg) ? \"\" : msg;
  441.                 var el = (document.getElementById) ? document.getElementById(id) : document.all(id);
  442.                 el.innerHTML = msg;
  443.             }
  444.             function checkOrderLot{{ goods.goodsId }}() {
  445.                 const now = new Date();
  446.                 const from = new Date(now.getFullYear(), now.getMonth(), now.getDate());
  447.                 const to = new Date(from.getFullYear(), from.getMonth(), from.getDate() + 90);
  448.                 var buyAmount = 0;
  449.                 if ( document.cart_fm{{ goods.goodsId }}.sample.value != \"on\" && document.cart_fm{{ goods.goodsId }}.sample.value != \"off\" ) {
  450.                     return false;
  451.                 }
  452.                 for ( i=1; i<=document.cart_fm{{ goods.goodsId }}.elements.length; i++ ) {
  453.                     if ( document.cart_fm{{ goods.goodsId }}.elements[i-1].name.substring( 0, 4 ) == \"cart\" && document.cart_fm{{ goods.goodsId }}.elements[i-1].type == \"text\" ) {
  454.                         if ( document.cart_fm{{ goods.goodsId }}.elements[i-1].value != \"\" && document.cart_fm{{ goods.goodsId }}.elements[i-1].value.match(/[0-9]+/g) == document.cart_fm{{ goods.goodsId }}.elements[i-1].value ) {
  455.                             buyAmount += Number( document.cart_fm{{ goods.goodsId }}.elements[i-1].value );
  456.                         } else {
  457.                             document.cart_fm{{ goods.goodsId }}.elements[i-1].value = \"\";
  458.                         }
  459.                         const \$input = \$(document.cart_fm{{ goods.goodsId }}.elements[i-1]);
  460.                         if (\$input.val().trim() !== '') {
  461.                             const nyuukaYoteibi = \$input.data('nyuuka_yoteibi');
  462.                             if (nyuukaYoteibi) {
  463.                                 const tempDate = new Date(nyuukaYoteibi);
  464.                                 const date = new Date(tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate());
  465.                                 const daysDiff = getDiff(date, to);
  466.                                 if (daysDiff < 0) {
  467.                                     alert( \"予約注文できるのは入荷予定日が90日以内のものだけです。\" );
  468.                                     document.cart_fm{{ goods.goodsId }}.sample.value = \"\";
  469.                                     document.cart_fm{{ goods.goodsId }}.elements[i-1].focus();
  470.                                     return false;
  471.                                 }
  472.                             }
  473.                         }
  474.                     }
  475.                 }
  476.                 if ( buyAmount == 0 ) {
  477.                     alert( \"半角数字で数量を入力してください。\" );
  478.                     document.cart_fm{{ goods.goodsId }}.sample.value = \"\";
  479.                     document.cart_fm{{ goods.goodsId }}.cart_1_1.focus();
  480.                     return false;
  481.                 }
  482.                 if ( document.cart_fm{{ goods.goodsId }}.sample.value == \"on\" ) {
  483.                     err = false;
  484.                     err2 = 0;
  485.                     for ( i=1; i<=document.cart_fm{{ goods.goodsId }}.elements.length; i++ ) {
  486.                         if ( document.cart_fm{{ goods.goodsId }}.elements[i-1].name.substring( 0, 4 ) == \"cart\" && document.cart_fm{{ goods.goodsId }}.elements[i-1].type == \"text\" ) {
  487.                             if ( document.cart_fm{{ goods.goodsId }}.elements[i-1].value != \"\" && document.cart_fm{{ goods.goodsId }}.elements[i-1].value.match(/[0-9]+/g) == document.cart_fm{{ goods.goodsId }}.elements[i-1].value ) {
  488.                                 if ( Number( document.cart_fm{{ goods.goodsId }}.elements[i-1].value ) > 1 ) {
  489.                                     err = true;
  490.                                     //err2++;
  491.                                 } else if ( Number( document.cart_fm{{ goods.goodsId }}.elements[i-1].value ) == 1 ) {
  492.                                     //err2++;
  493.                                 }
  494.                                 err2+=Number( document.cart_fm{{ goods.goodsId }}.elements[i-1].value );
  495.                             }
  496.                         }
  497.                     }
  498.                     if ( err ) {
  499.                         for ( i=1; i<=document.cart_fm{{ goods.goodsId }}.elements.length; i++ ) {
  500.                             if ( document.cart_fm{{ goods.goodsId }}.elements[i-1].name.substring( 0, 4 ) == \"cart\" && document.cart_fm{{ goods.goodsId }}.elements[i-1].type == \"text\" ) {
  501.                                 if ( document.cart_fm{{ goods.goodsId }}.elements[i-1].value != \"\" && document.cart_fm{{ goods.goodsId }}.elements[i-1].value.match(/[0-9]+/g) == document.cart_fm{{ goods.goodsId }}.elements[i-1].value ) {
  502.                                     if ( Number( document.cart_fm{{ goods.goodsId }}.elements[i-1].value ) > 1 ) {
  503.                                         alert( '貸出サンプルは同色、同サイズ、1点でお願いします。');
  504.                                         document.cart_fm{{ goods.goodsId }}.elements[i-1].value = \"1\";
  505.                                         document.cart_fm{{ goods.goodsId }}.elements[i-1].focus();
  506.                                         return false;
  507.                                     }
  508.                                 }
  509.                             }
  510.                         }
  511.                     }
  512.                     if ( err2 > 10 ) {
  513.                         alert( '貸出サンプルは、色々な商品を合計して、10点以内でお願いします。');
  514.                         document.cart_fm{{ goods.goodsId }}.sample.value = \"\";
  515.                         document.cart_fm{{ goods.goodsId }}.cart_1_1.focus();
  516.                         return false;
  517.                     }
  518.                 }
  519.                 return true;
  520.             }
  521.             function send{{ goods.goodsId }}(){
  522.                 var win = window.open('','win{{ goods.goodsId }}','width=400,height=400,scrollbars=1');
  523.                 document.cart_fm{{ goods.goodsId }}.target = \"win{{ goods.goodsId }}\";
  524.                 document.cart_fm{{ goods.goodsId }}.submit();
  525.                 document.cart_fm{{ goods.goodsId }}.reset();
  526.             }
  527.         </script>
  528.     </div>
  529.     {% endif %}
  530. {% else %}
  531.     <div class=\"end-sale-msg\">
  532.         <img alt=\"お問い合わせイラスト\" src=\"images/detail/bow.png\" width=\"150\" /><br />
  533.         <br />
  534.         この商品は販売終了しました。<br />
  535.         商品に関するお問い合わせは<span>0120-115-116</span>までお電話ください。
  536.     </div>
  537. {% endif %}
  538. ""Block/lm_item_cart_area.twig""/var/www/html/app/template/default/Block/lm_item_cart_area.twig");
  539.     }
  540.     
  541.     public function checkSecurity()
  542.     {
  543.         static $tags = array("if" => 2"set" => 7);
  544.         static $filters = array("escape" => 15"raw" => 58"InventoryMatrix" => 62);
  545.         static $functions = array("constant" => 8);
  546.         try {
  547.             $this->sandbox->checkSecurity(
  548.                 ['if''set'],
  549.                 ['escape''raw''InventoryMatrix'],
  550.                 ['constant']
  551.             );
  552.         } catch (SecurityError $e) {
  553.             $e->setSourceContext($this->source);
  554.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  555.                 $e->setTemplateLine($tags[$e->getTagName()]);
  556.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  557.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  558.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  559.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  560.             }
  561.             throw $e;
  562.         }
  563.     }
  564. }