<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* Block/lm_item_cart_area.twig */
class __TwigTemplate_94d7c8123a1af60c8e42f964994b4b36 extends \Eccube\Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
$this->sandbox = $this->env->getExtension('\Twig\Extension\SandboxExtension');
$this->checkSecurity();
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Block/lm_item_cart_area.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Block/lm_item_cart_area.twig"));
// line 1
echo "
";
// line 2
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", false, false, true, 2) == 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", false, false, true, 2) == 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); })()))) {
// line 3
echo " <!-- カート -->
<div class=\"cart_title\" style=\"position:relative;\">
<div id=\"cart_title\" style=\"position:absolute;top:-65px;\"></div>
</div>
";
// line 7
$context["viewConst"] = "hoge";
// line 8
echo " ";
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", false, false, true, 8)))) {
// line 9
echo " ";
$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", false, false, true, 9), 9, $this->source)));
// line 10
echo " ";
}
// line 11
echo "
<script type=\"text/javascript\">
(function() {
// // var DISPLAY_LINES = 6;
var DISPLAY_LINES = ";
// line 15
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", null, true);
echo ";
\$(function() {
\$('.categories').each(function(index, element) {
var ps = \$(this).find('p.category').each(function(index, element) {
if (index >= DISPLAY_LINES) {
\$(this).hide();
}
});
// 「もっと見る」機能を抑制
// // if (ps.length > DISPLAY_LINES) {
// // \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(
// // \t\t\$('<div class=\"fadeout\"></div><a href=\"#\" style=\"text-decoration: none; color: #212121;\">もっと見る...</a>')
// // \t\t .on('mouseleave', function() {
// // \t\t\t\$(this).css({'text-decoration':'none','color':'#212121'});
// // \t\t}).on('mouseenter', function() {
// // \t\t\t\$(this).css({'text-decoration':'none','color':'#36C'});
// // \t\t}).on('click', function(event) {
// // \t\t\t\$(this).closest('p').hide();
// // \t\t\t\$(this).closest(\".fadeout\").hide();
// // \t\t\t\$(ps).slideDown();
// // \t\t\treturn false;
// // \t\t})
// // \t).appendTo(\$(ps).closest('div'));
// // }
});
});
}())
</script>
";
// line 44
if ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_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", false, false, true, 44), "NewUI", [], "any", false, false, true, 44), "Enabled", [], "any", false, false, true, 44) && 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", false, false, true, 44))) {
// line 45
echo "
";
// line 47
echo "
";
} else {
// line 49
echo " <div class=\"cart_area\">
";
// line 51
if ((isset($context["isYoyakuAvailable"]) || array_key_exists("isYoyakuAvailable", $context) ? $context["isYoyakuAvailable"] : (function () { throw new RuntimeError('Variable "isYoyakuAvailable" does not exist.', 51, $this->source); })())) {
// line 52
echo " <div class=\"vim_flag\" style=\"";
if (((isset($context["viewConst"]) || array_key_exists("viewConst", $context) ? $context["viewConst"] : (function () { throw new RuntimeError('Variable "viewConst" does not exist.', 52, $this->source); })()) != "on")) {
echo " display: none;";
}
echo "\">
<img src=\"/images/itempage/yoyaku/yoyaku.jpg\" alt=\"在庫が無くても、予約注文なら今すぐご注文いただけます!\" />
</div>
";
}
// line 56
echo "
<div class=\"supplement\">
";
// line 58
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);
echo "
</div>
<div id=\"shopping-cart-wrapper\">
";
// line 62
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));
echo "
</div>
<script>
function linkinfo";
// line 66
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", false, false, true, 66), 66, $this->source), "html", null, true);
echo "(msg, id) {
if(!document.all && !document.getElementById) { return; }
id = (!id) ? \"linkinfolay";
// line 68
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", false, false, true, 68), 68, $this->source), "html", null, true);
echo "\" : id;
msg= (!msg) ? \"\" : msg;
var el = (document.getElementById) ? document.getElementById(id) : document.all(id);
el.innerHTML = msg;
}
function checkOrderLot";
// line 73
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", false, false, true, 73), 73, $this->source), "html", null, true);
echo "() {
const now = new Date();
const from = new Date(now.getFullYear(), now.getMonth(), now.getDate());
const to = new Date(from.getFullYear(), from.getMonth(), from.getDate() + 90);
var buyAmount = 0;
if ( document.cart_fm";
// line 78
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", false, false, true, 78), 78, $this->source), "html", null, true);
echo ".sample.value != \"on\" && document.cart_fm";
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", false, false, true, 78), 78, $this->source), "html", null, true);
echo ".sample.value != \"off\" ) {
return false;
}
for ( i=1; i<=document.cart_fm";
// line 81
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", false, false, true, 81), 81, $this->source), "html", null, true);
echo ".elements.length; i++ ) {
if ( document.cart_fm";
// line 82
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", false, false, true, 82), 82, $this->source), "html", null, true);
echo ".elements[i-1].name.substring( 0, 4 ) == \"cart\" && document.cart_fm";
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", false, false, true, 82), 82, $this->source), "html", null, true);
echo ".elements[i-1].type == \"text\" ) {
if ( document.cart_fm";
// line 83
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", false, false, true, 83), 83, $this->source), "html", null, true);
echo ".elements[i-1].value != \"\" && document.cart_fm";
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", false, false, true, 83), 83, $this->source), "html", null, true);
echo ".elements[i-1].value.match(/[0-9]+/g) == document.cart_fm";
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", false, false, true, 83), 83, $this->source), "html", null, true);
echo ".elements[i-1].value ) {
buyAmount += Number( document.cart_fm";
// line 84
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", false, false, true, 84), 84, $this->source), "html", null, true);
echo ".elements[i-1].value );
} else {
document.cart_fm";
// line 86
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", false, false, true, 86), 86, $this->source), "html", null, true);
echo ".elements[i-1].value = \"\";
}
const \$input = \$(document.cart_fm";
// line 88
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", false, false, true, 88), 88, $this->source), "html", null, true);
echo ".elements[i-1]);
if (\$input.val().trim() !== '') {
const nyuukaYoteibi = \$input.data('nyuuka_yoteibi');
if (nyuukaYoteibi) {
const tempDate = new Date(nyuukaYoteibi);
const date = new Date(tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate());
const daysDiff = getDiff(date, to);
if (daysDiff < 0) {
alert( \"予約注文できるのは入荷予定日が90日以内のものだけです。\" );
document.cart_fm";
// line 97
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", false, false, true, 97), 97, $this->source), "html", null, true);
echo ".sample.value = \"\";
document.cart_fm";
// line 98
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", false, false, true, 98), 98, $this->source), "html", null, true);
echo ".elements[i-1].focus();
return false;
}
}
}
}
}
if ( buyAmount == 0 ) {
alert( \"半角数字で数量を入力してください。\" );
document.cart_fm";
// line 107
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", false, false, true, 107), 107, $this->source), "html", null, true);
echo ".sample.value = \"\";
document.cart_fm";
// line 108
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", false, false, true, 108), 108, $this->source), "html", null, true);
echo ".cart_1_1.focus();
return false;
}
if ( document.cart_fm";
// line 111
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", false, false, true, 111), 111, $this->source), "html", null, true);
echo ".sample.value == \"on\" ) {
err = false;
err2 = 0;
for ( i=1; i<=document.cart_fm";
// line 114
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", false, false, true, 114), 114, $this->source), "html", null, true);
echo ".elements.length; i++ ) {
if ( document.cart_fm";
// line 115
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", false, false, true, 115), 115, $this->source), "html", null, true);
echo ".elements[i-1].name.substring( 0, 4 ) == \"cart\" && document.cart_fm";
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", false, false, true, 115), 115, $this->source), "html", null, true);
echo ".elements[i-1].type == \"text\" ) {
if ( document.cart_fm";
// line 116
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", false, false, true, 116), 116, $this->source), "html", null, true);
echo ".elements[i-1].value != \"\" && document.cart_fm";
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", false, false, true, 116), 116, $this->source), "html", null, true);
echo ".elements[i-1].value.match(/[0-9]+/g) == document.cart_fm";
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", false, false, true, 116), 116, $this->source), "html", null, true);
echo ".elements[i-1].value ) {
if ( Number( document.cart_fm";
// line 117
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", false, false, true, 117), 117, $this->source), "html", null, true);
echo ".elements[i-1].value ) > 1 ) {
err = true;
//err2++;
} else if ( Number( document.cart_fm";
// line 120
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", false, false, true, 120), 120, $this->source), "html", null, true);
echo ".elements[i-1].value ) == 1 ) {
//err2++;
}
err2+=Number( document.cart_fm";
// line 123
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", false, false, true, 123), 123, $this->source), "html", null, true);
echo ".elements[i-1].value );
}
}
}
if ( err ) {
for ( i=1; i<=document.cart_fm";
// line 128
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", false, false, true, 128), 128, $this->source), "html", null, true);
echo ".elements.length; i++ ) {
if ( document.cart_fm";
// line 129
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", false, false, true, 129), 129, $this->source), "html", null, true);
echo ".elements[i-1].name.substring( 0, 4 ) == \"cart\" && document.cart_fm";
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", false, false, true, 129), 129, $this->source), "html", null, true);
echo ".elements[i-1].type == \"text\" ) {
if ( document.cart_fm";
// line 130
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", false, false, true, 130), 130, $this->source), "html", null, true);
echo ".elements[i-1].value != \"\" && document.cart_fm";
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", false, false, true, 130), 130, $this->source), "html", null, true);
echo ".elements[i-1].value.match(/[0-9]+/g) == document.cart_fm";
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", false, false, true, 130), 130, $this->source), "html", null, true);
echo ".elements[i-1].value ) {
if ( Number( document.cart_fm";
// line 131
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", false, false, true, 131), 131, $this->source), "html", null, true);
echo ".elements[i-1].value ) > 1 ) {
alert( '貸出サンプルは同色、同サイズ、1点でお願いします。');
document.cart_fm";
// line 133
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", false, false, true, 133), 133, $this->source), "html", null, true);
echo ".elements[i-1].value = \"1\";
document.cart_fm";
// line 134
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", false, false, true, 134), 134, $this->source), "html", null, true);
echo ".elements[i-1].focus();
return false;
}
}
}
}
}
if ( err2 > 10 ) {
alert( '貸出サンプルは、色々な商品を合計して、10点以内でお願いします。');
document.cart_fm";
// line 143
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", false, false, true, 143), 143, $this->source), "html", null, true);
echo ".sample.value = \"\";
document.cart_fm";
// line 144
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", false, false, true, 144), 144, $this->source), "html", null, true);
echo ".cart_1_1.focus();
return false;
}
}
return true;
}
function send";
// line 150
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", false, false, true, 150), 150, $this->source), "html", null, true);
echo "(){
var win = window.open('','win";
// line 151
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", false, false, true, 151), 151, $this->source), "html", null, true);
echo "','width=400,height=400,scrollbars=1');
document.cart_fm";
// line 152
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", false, false, true, 152), 152, $this->source), "html", null, true);
echo ".target = \"win";
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", false, false, true, 152), 152, $this->source), "html", null, true);
echo "\";
document.cart_fm";
// line 153
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", false, false, true, 153), 153, $this->source), "html", null, true);
echo ".submit();
document.cart_fm";
// line 154
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", false, false, true, 154), 154, $this->source), "html", null, true);
echo ".reset();
}
</script>
</div>
";
}
} else {
// line 160
echo " <div class=\"end-sale-msg\">
<img alt=\"お問い合わせイラスト\" src=\"images/detail/bow.png\" width=\"150\" /><br />
<br />
この商品は販売終了しました。<br />
商品に関するお問い合わせは<span>0120-115-116</span>までお電話ください。
</div>
";
}
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
public function getTemplateName()
{
return "Block/lm_item_cart_area.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
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,);
}
public function getSourceContext()
{
return new Source("
{% if data.goods_status == 1 or data.goods_status == 11 or is_preview_mode or is_secret %}
<!-- カート -->
<div class=\"cart_title\" style=\"position:relative;\">
<div id=\"cart_title\" style=\"position:absolute;top:-65px;\"></div>
</div>
{% set viewConst = 'hoge' %}
{% if constant(\"_VIEW_ITEM_DETAIL_FLAG_#{data.goods_id}\") is defined %}
{% set viewConst = constant(\"_VIEW_ITEM_DETAIL_FLAG_#{data.goods_id}\") %}
{% endif %}
<script type=\"text/javascript\">
(function() {
// // var DISPLAY_LINES = 6;
var DISPLAY_LINES = {{ DISPLAY_LINES }};
\$(function() {
\$('.categories').each(function(index, element) {
var ps = \$(this).find('p.category').each(function(index, element) {
if (index >= DISPLAY_LINES) {
\$(this).hide();
}
});
// 「もっと見る」機能を抑制
// // if (ps.length > DISPLAY_LINES) {
// // \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(
// // \t\t\$('<div class=\"fadeout\"></div><a href=\"#\" style=\"text-decoration: none; color: #212121;\">もっと見る...</a>')
// // \t\t .on('mouseleave', function() {
// // \t\t\t\$(this).css({'text-decoration':'none','color':'#212121'});
// // \t\t}).on('mouseenter', function() {
// // \t\t\t\$(this).css({'text-decoration':'none','color':'#36C'});
// // \t\t}).on('click', function(event) {
// // \t\t\t\$(this).closest('p').hide();
// // \t\t\t\$(this).closest(\".fadeout\").hide();
// // \t\t\t\$(ps).slideDown();
// // \t\t\treturn false;
// // \t\t})
// // \t).appendTo(\$(ps).closest('div'));
// // }
});
});
}())
</script>
{% if eccube_config.GoodsSetPurchase.NewUI.Enabled and goods.isGoodsSetPurchase %}
{# include 'Item/GoodsSetPurchase/new_cart_area.twig' with { item: item } only #}
{% else %}
<div class=\"cart_area\">
{% if isYoyakuAvailable %}
<div class=\"vim_flag\" style=\"{% if viewConst != \"on\" %} display: none;{% endif %}\">
<img src=\"/images/itempage/yoyaku/yoyaku.jpg\" alt=\"在庫が無くても、予約注文なら今すぐご注文いただけます!\" />
</div>
{% endif %}
<div class=\"supplement\">
{{ lm_displayHosokuSetsumei2 | raw }}
</div>
<div id=\"shopping-cart-wrapper\">
{{ goods | InventoryMatrix | raw }}
</div>
<script>
function linkinfo{{ goods.goodsId }}(msg, id) {
if(!document.all && !document.getElementById) { return; }
id = (!id) ? \"linkinfolay{{ goods.goodsId }}\" : id;
msg= (!msg) ? \"\" : msg;
var el = (document.getElementById) ? document.getElementById(id) : document.all(id);
el.innerHTML = msg;
}
function checkOrderLot{{ goods.goodsId }}() {
const now = new Date();
const from = new Date(now.getFullYear(), now.getMonth(), now.getDate());
const to = new Date(from.getFullYear(), from.getMonth(), from.getDate() + 90);
var buyAmount = 0;
if ( document.cart_fm{{ goods.goodsId }}.sample.value != \"on\" && document.cart_fm{{ goods.goodsId }}.sample.value != \"off\" ) {
return false;
}
for ( i=1; i<=document.cart_fm{{ goods.goodsId }}.elements.length; i++ ) {
if ( document.cart_fm{{ goods.goodsId }}.elements[i-1].name.substring( 0, 4 ) == \"cart\" && document.cart_fm{{ goods.goodsId }}.elements[i-1].type == \"text\" ) {
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 ) {
buyAmount += Number( document.cart_fm{{ goods.goodsId }}.elements[i-1].value );
} else {
document.cart_fm{{ goods.goodsId }}.elements[i-1].value = \"\";
}
const \$input = \$(document.cart_fm{{ goods.goodsId }}.elements[i-1]);
if (\$input.val().trim() !== '') {
const nyuukaYoteibi = \$input.data('nyuuka_yoteibi');
if (nyuukaYoteibi) {
const tempDate = new Date(nyuukaYoteibi);
const date = new Date(tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate());
const daysDiff = getDiff(date, to);
if (daysDiff < 0) {
alert( \"予約注文できるのは入荷予定日が90日以内のものだけです。\" );
document.cart_fm{{ goods.goodsId }}.sample.value = \"\";
document.cart_fm{{ goods.goodsId }}.elements[i-1].focus();
return false;
}
}
}
}
}
if ( buyAmount == 0 ) {
alert( \"半角数字で数量を入力してください。\" );
document.cart_fm{{ goods.goodsId }}.sample.value = \"\";
document.cart_fm{{ goods.goodsId }}.cart_1_1.focus();
return false;
}
if ( document.cart_fm{{ goods.goodsId }}.sample.value == \"on\" ) {
err = false;
err2 = 0;
for ( i=1; i<=document.cart_fm{{ goods.goodsId }}.elements.length; i++ ) {
if ( document.cart_fm{{ goods.goodsId }}.elements[i-1].name.substring( 0, 4 ) == \"cart\" && document.cart_fm{{ goods.goodsId }}.elements[i-1].type == \"text\" ) {
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 ) {
if ( Number( document.cart_fm{{ goods.goodsId }}.elements[i-1].value ) > 1 ) {
err = true;
//err2++;
} else if ( Number( document.cart_fm{{ goods.goodsId }}.elements[i-1].value ) == 1 ) {
//err2++;
}
err2+=Number( document.cart_fm{{ goods.goodsId }}.elements[i-1].value );
}
}
}
if ( err ) {
for ( i=1; i<=document.cart_fm{{ goods.goodsId }}.elements.length; i++ ) {
if ( document.cart_fm{{ goods.goodsId }}.elements[i-1].name.substring( 0, 4 ) == \"cart\" && document.cart_fm{{ goods.goodsId }}.elements[i-1].type == \"text\" ) {
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 ) {
if ( Number( document.cart_fm{{ goods.goodsId }}.elements[i-1].value ) > 1 ) {
alert( '貸出サンプルは同色、同サイズ、1点でお願いします。');
document.cart_fm{{ goods.goodsId }}.elements[i-1].value = \"1\";
document.cart_fm{{ goods.goodsId }}.elements[i-1].focus();
return false;
}
}
}
}
}
if ( err2 > 10 ) {
alert( '貸出サンプルは、色々な商品を合計して、10点以内でお願いします。');
document.cart_fm{{ goods.goodsId }}.sample.value = \"\";
document.cart_fm{{ goods.goodsId }}.cart_1_1.focus();
return false;
}
}
return true;
}
function send{{ goods.goodsId }}(){
var win = window.open('','win{{ goods.goodsId }}','width=400,height=400,scrollbars=1');
document.cart_fm{{ goods.goodsId }}.target = \"win{{ goods.goodsId }}\";
document.cart_fm{{ goods.goodsId }}.submit();
document.cart_fm{{ goods.goodsId }}.reset();
}
</script>
</div>
{% endif %}
{% else %}
<div class=\"end-sale-msg\">
<img alt=\"お問い合わせイラスト\" src=\"images/detail/bow.png\" width=\"150\" /><br />
<br />
この商品は販売終了しました。<br />
商品に関するお問い合わせは<span>0120-115-116</span>までお電話ください。
</div>
{% endif %}
", "Block/lm_item_cart_area.twig", "/var/www/html/app/template/default/Block/lm_item_cart_area.twig");
}
public function checkSecurity()
{
static $tags = array("if" => 2, "set" => 7);
static $filters = array("escape" => 15, "raw" => 58, "InventoryMatrix" => 62);
static $functions = array("constant" => 8);
try {
$this->sandbox->checkSecurity(
['if', 'set'],
['escape', 'raw', 'InventoryMatrix'],
['constant']
);
} catch (SecurityError $e) {
$e->setSourceContext($this->source);
if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
$e->setTemplateLine($tags[$e->getTagName()]);
} elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
$e->setTemplateLine($filters[$e->getFilterName()]);
} elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
$e->setTemplateLine($functions[$e->getFunctionName()]);
}
throw $e;
}
}
}