<?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;
/* Product/detail.twig */
class __TwigTemplate_c7ea997b4cad8f6b1337810c409fe6a61e625988c4ee0dd605a6ad041a133981 extends \Eccube\Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'stylesheet' => [$this, 'block_stylesheet'],
'javascript' => [$this, 'block_javascript'],
'main' => [$this, 'block_main'],
];
}
protected function doGetParent(array $context)
{
// line 29
return "default_frame.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Product/detail.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Product/detail.twig"));
// line 31
$context["body_class"] = "product_page";
// line 29
$this->parent = $this->loadTemplate("default_frame.twig", "Product/detail.twig", 29);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 33
public function block_stylesheet($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheet"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheet"));
// line 34
echo " ";
echo twig_include($this->env, $context, "Product/option_css.twig", array(), true, true);
echo " ";
// line 35
echo "<style>
.slick-slider {
margin-bottom: 30px;
}
.slick-dots {
position: absolute;
bottom: -45px;
display: block;
width: 100%;
padding: 0;
list-style: none;
text-align: center;
}
.slick-dots li {
position: relative;
display: inline-block;
width: 20px;
height: 20px;
margin: 0 5px;
padding: 0;
cursor: pointer;
}
.slick-dots li button {
font-size: 0;
line-height: 0;
display: block;
width: 20px;
height: 20px;
padding: 5px;
cursor: pointer;
color: transparent;
border: 0;
outline: none;
background: transparent;
}
.slick-dots li button:hover,
.slick-dots li button:focus {
outline: none;
}
.slick-dots li button:hover:before,
.slick-dots li button:focus:before {
opacity: 1;
}
.slick-dots li button:before {
content: \" \";
line-height: 20px;
position: absolute;
top: 0;
left: 0;
width: 12px;
height: 12px;
text-align: center;
opacity: .25;
background-color: black;
border-radius: 50%;
}
.slick-dots li.slick-active button:before {
opacity: .75;
background-color: black;
}
.slick-dots li button.thumbnail img {
width: 0;
height: 0;
}
</style>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 114
public function block_javascript($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascript"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascript"));
// line 115
echo "<meta http-equiv=\"Content-Security-Policy\" content=\"default-src https://www.changer.fun/\" />
<script>
eccube.classCategories = ";
// line 121
echo $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getClassCategoriesAsJson((isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 121, $this->source); })()));
echo ";
// 規格2に選択肢を割り当てる。
function fnSetClassCategories(form, classcat_id2_selected) {
var \$form = \$(form);
var product_id = \$form.find('input[name=product_id]').val();
var \$sele1 = \$form.find('select[name=classcategory_id1]');
var \$sele2 = \$form.find('select[name=classcategory_id2]');
eccube.setClassCategories(\$form, product_id, \$sele1, \$sele2, classcat_id2_selected);
}
";
// line 132
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id2", [], "any", true, true, false, 132)) {
// line 133
echo " fnSetClassCategories(
\$('#form1'), ";
// line 134
echo json_encode(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 134, $this->source); })()), "classcategory_id2", [], "any", false, false, false, 134), "vars", [], "any", false, false, false, 134), "value", [], "any", false, false, false, 134));
echo "
);
";
} elseif (twig_get_attribute($this->env, $this->source, // line 136
($context["form"] ?? null), "classcategory_id1", [], "any", true, true, false, 136)) {
// line 137
echo " eccube.checkStock(\$('#form1'), ";
echo twig_escape_filter($this->env, 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.', 137, $this->source); })()), "id", [], "any", false, false, false, 137), "html", null, true);
echo ", ";
echo json_encode(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 137, $this->source); })()), "classcategory_id1", [], "any", false, false, false, 137), "vars", [], "any", false, false, false, 137), "value", [], "any", false, false, false, 137));
echo ", null);
";
}
// line 139
echo " </script>
<script>
\$(function() {
// bfcache無効化
\$(window).bind('pageshow', function(event) {
if (event.originalEvent.persisted) {
location.reload(true);
}
});
// Core Web Vital の Cumulative Layout Shift(CLS)対策のため
// img タグに width, height が付与されている.
// 630px 未満の画面サイズでは縦横比が壊れるための対策
// see https://github.com/EC-CUBE/ec-cube/pull/5023
// \$('.ec-grid2__cell').hide(); // フェードイン無効化
var removeSize = function () {
\$('.slide-item').height('');
\$('.slide-item img')
.removeAttr('width')
.removeAttr('height')
.removeAttr('style');
};
var slickInitial = function(slick) {
// \$('.ec-grid2__cell').fadeIn(1500); // フェードイン無効化
var baseHeight = \$(slick.target).height();
var baseWidth = \$(slick.target).width();
var rate = baseWidth / baseHeight;
\$('.slide-item').height(baseHeight * rate); // 余白を削除する
// transform を使用することでCLSの影響を受けないようにする
\$('.slide-item img')
.css(
{
'transform-origin': 'top left',
'transform': 'scaleY(' + rate + ')',
'transition': 'transform .1s'
}
);
// 正しいサイズに近くなったら属性を解除する
setTimeout(removeSize, 500);
};
\$('.item_visual').on('init', slickInitial);
// リサイズ時は CLS の影響を受けないため属性を解除する
\$(window).resize(removeSize);
\$('.item_visual').slick({
dots: false,
arrows: false,
responsive: [{
breakpoint: 768,
settings: {
dots: true
}
}]
});
\$('.slideThumb').on('click', function() {
var index = \$(this).attr('data-index');
\$('.item_visual').slick('slickGoTo', index, false);
})
});
</script>
<script>
\$(function() {
\$('.add-cart').on('click', function(event) {
";
// line 203
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id1", [], "any", true, true, false, 203)) {
// line 204
echo " // 規格1フォームの必須チェック
if (\$('#classcategory_id1').val() == '__unselected' || \$('#classcategory_id1').val() == '') {
\$('#classcategory_id1')[0].setCustomValidity('";
// line 206
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("項目が選択されていません"), "html", null, true);
echo "');
return true;
} else {
\$('#classcategory_id1')[0].setCustomValidity('');
}
";
}
// line 212
echo "
";
// line 213
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id2", [], "any", true, true, false, 213)) {
// line 214
echo " // 規格2フォームの必須チェック
if (\$('#classcategory_id2').val() == '__unselected' || \$('#classcategory_id2').val() == '') {
\$('#classcategory_id2')[0].setCustomValidity('";
// line 216
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("項目が選択されていません"), "html", null, true);
echo "');
return true;
} else {
\$('#classcategory_id2')[0].setCustomValidity('');
}
";
}
// line 222
echo "
// 個数フォームのチェック
if (\$('#quantity').val() < 1) {
\$('#quantity')[0].setCustomValidity('";
// line 225
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("1以上で入力してください。"), "html", null, true);
echo "');
return true;
} else {
\$('#quantity')[0].setCustomValidity('');
}
event.preventDefault();
\$form = \$('#form1');
\$.ajax({
url: \$form.attr('action'),
type: \$form.attr('method'),
data: \$form.serialize(),
dataType: 'json',
beforeSend: function(xhr, settings) {
// Buttonを無効にする
\$('.add-cart').prop('disabled', true);
}
}).done(function(data) {
// レスポンス内のメッセージをalertで表示
let first_flg = true;
let err_flg = false;
\$.each(data.messages, function() {
// console.log('data.messages:'+data.messages);
if (first_flg == true) {
\$('#ec-modal-header').html(this);
let result = this.indexOf( '買い物かごに追加しました' );
if (result == -1) {
err_flg = true;
}
first_flg = false;
} else {
\$('#ec-modal-header').append('</br>'+this);
let result = this.indexOf( '買い物かごに追加しました' );
if (result == -1) {
err_flg = true;
}
}
// \$('#ec-modal-header').html(this);
});
if (err_flg == true) { // エラーメッセージあり -> リンクボタンは表示しない
";
// line 268
echo " \$('#to-shopping').css('display', 'none');
} else {
";
// line 274
echo " \$('#to-shopping').css('display', 'block');
}
\$('.ec-modal').show()
\$.ajax({
url: \"";
// line 278
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("block_cart");
echo "\",
type: 'GET',
dataType: 'html'
}).done(function(html) {
\$('.ec-headerRole__cart').html(html);
});
}).fail(function(data) {
alert('";
// line 286
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("買い物かごへの追加に失敗しました。"), "html", null, true);
echo "');
}).always(function(data) {
// Buttonを有効にする
\$('.add-cart').prop('disabled', false);
});
});
});
\$('.ec-modal-wrap').on('click', function(e) {
// モーダル内の処理は外側にバブリングさせない
e.stopPropagation();
});
// .ec-modal-close はリロード対象から外す。hide()のみ実施
\$('.ec-modal-overlay, .ec-modal, .ec-inlineBtn--cancel').on('click', function() {
document.location.reload()//追加 買い物かご追加後はブラウザ更新
\t\t\t\$('.ec-modal').hide()
});
\$('.ec-modal-close').on('click', function() {
\t\t\t\$('.ec-modal').hide()
});
</script>
<script type=\"application/ld+json\">
{
\"@context\": \"https://schema.org/\",
\"@type\": \"Product\",
\"name\": \"";
// line 313
echo twig_escape_filter($this->env, 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.', 313, $this->source); })()), "name", [], "any", false, false, false, 313), "html", null, true);
echo "\",
\"image\": [
";
// line 315
$context['_parent'] = $context;
$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.', 315, $this->source); })()), "ProductImage", [], "any", false, false, false, 315));
$context['_iterated'] = false;
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["img"]) {
// line 316
echo " \"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 316, $this->source); })()), "request", [], "any", false, false, false, 316), "schemeAndHttpHost", [], "any", false, false, false, 316), "html", null, true);
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($context["img"], "save_image"), "html", null, true);
echo "\"";
if ( !twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, false, 316)) {
echo ",";
}
// line 317
echo "
";
$context['_iterated'] = true;
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
if (!$context['_iterated']) {
// line 319
echo " \"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 319, $this->source); })()), "request", [], "any", false, false, false, 319), "schemeAndHttpHost", [], "any", false, false, false, 319), "html", null, true);
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->extensions['Eccube\Twig\Extension\EccubeExtension']->getNoImageProduct(""), "save_image"), "html", null, true);
echo "\"
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['img'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 321
echo " ],
\"description\": \"";
// line 322
echo twig_escape_filter($this->env, twig_slice($this->env, twig_replace_filter(((twig_get_attribute($this->env, $this->source, ($context["Product"] ?? null), "description_list", [], "any", true, true, false, 322)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, ($context["Product"] ?? null), "description_list", [], "any", false, false, false, 322), 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.', 322, $this->source); })()), "description_detail", [], "any", false, false, false, 322))) : (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.', 322, $this->source); })()), "description_detail", [], "any", false, false, false, 322))), ["
" => "", "
" => ""]), 0, 300), "html", null, true);
echo "\",
";
// line 323
if (twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 323, $this->source); })()), "code_min", [], "any", false, false, false, 323)) {
// line 324
echo " \"sku\": \"";
echo twig_escape_filter($this->env, 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.', 324, $this->source); })()), "code_min", [], "any", false, false, false, 324), "html", null, true);
echo "\",
";
}
// line 326
echo " \"offers\": {
\"@type\": \"Offer\",
\"url\": \"";
// line 328
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_detail", ["id" => twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 328, $this->source); })()), "id", [], "any", false, false, false, 328)]), "html", null, true);
echo "\",
\"priceCurrency\": \"";
// line 329
echo twig_escape_filter($this->env, 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.', 329, $this->source); })()), "currency", [], "any", false, false, false, 329), "html", null, true);
echo "\",
\"price\": ";
// line 330
((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.', 330, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 330)) ? (print (twig_escape_filter($this->env, 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.', 330, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 330), "html", null, true))) : (print (0)));
echo ",
\"availability\": \"";
// line 331
echo ((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.', 331, $this->source); })()), "stock_find", [], "any", false, false, false, 331)) ? ("InStock") : ("OutOfStock"));
echo "\"
}
}
</script>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 337
public function block_main($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "main"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "main"));
// line 338
echo "
<div class=\"ec-cartRole\">
<div class=\"ec-cartRole__progress\">
<ul class=\"ec-progress\">
";
// line 342
$context["step"] = 1;
// line 343
echo " <li class=\"ec-progress__item is-complete\">
<div class=\"ec-progress__number\">";
// line 344
echo twig_escape_filter($this->env, (isset($context["step"]) || array_key_exists("step", $context) ? $context["step"] : (function () { throw new RuntimeError('Variable "step" does not exist.', 344, $this->source); })()), "html", null, true);
$context["step"] = ((isset($context["step"]) || array_key_exists("step", $context) ? $context["step"] : (function () { throw new RuntimeError('Variable "step" does not exist.', 344, $this->source); })()) + 1);
// line 345
echo " </div>
<div class=\"ec-progress__label\">";
// line 346
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("商品詳細"), "html", null, true);
echo "
</div>
</li>
<li class=\"ec-progress__item\">
<div class=\"ec-progress__number\">";
// line 350
echo twig_escape_filter($this->env, (isset($context["step"]) || array_key_exists("step", $context) ? $context["step"] : (function () { throw new RuntimeError('Variable "step" does not exist.', 350, $this->source); })()), "html", null, true);
$context["step"] = ((isset($context["step"]) || array_key_exists("step", $context) ? $context["step"] : (function () { throw new RuntimeError('Variable "step" does not exist.', 350, $this->source); })()) + 1);
// line 351
echo " </div>
<div class=\"ec-progress__label\">";
// line 352
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("写真アップロード"), "html", null, true);
echo "
</div>
</li>
<li class=\"ec-progress__item\">
<div class=\"ec-progress__number\">";
// line 356
echo twig_escape_filter($this->env, (isset($context["step"]) || array_key_exists("step", $context) ? $context["step"] : (function () { throw new RuntimeError('Variable "step" does not exist.', 356, $this->source); })()), "html", null, true);
$context["step"] = ((isset($context["step"]) || array_key_exists("step", $context) ? $context["step"] : (function () { throw new RuntimeError('Variable "step" does not exist.', 356, $this->source); })()) + 1);
// line 357
echo " </div>
<div class=\"ec-progress__label\">";
// line 358
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お客様情報"), "html", null, true);
echo "
</div>
</li>
<li class=\"ec-progress__item\">
<div class=\"ec-progress__number\">";
// line 362
echo twig_escape_filter($this->env, (isset($context["step"]) || array_key_exists("step", $context) ? $context["step"] : (function () { throw new RuntimeError('Variable "step" does not exist.', 362, $this->source); })()), "html", null, true);
$context["step"] = ((isset($context["step"]) || array_key_exists("step", $context) ? $context["step"] : (function () { throw new RuntimeError('Variable "step" does not exist.', 362, $this->source); })()) + 1);
// line 363
echo " </div>
<div class=\"ec-progress__label\">";
// line 364
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("決済情報"), "html", null, true);
echo "
</div>
</li>
<li class=\"ec-progress__item\">
<div class=\"ec-progress__number\">";
// line 368
echo twig_escape_filter($this->env, (isset($context["step"]) || array_key_exists("step", $context) ? $context["step"] : (function () { throw new RuntimeError('Variable "step" does not exist.', 368, $this->source); })()), "html", null, true);
$context["step"] = ((isset($context["step"]) || array_key_exists("step", $context) ? $context["step"] : (function () { throw new RuntimeError('Variable "step" does not exist.', 368, $this->source); })()) + 1);
// line 369
echo " </div>
<div class=\"ec-progress__label\">";
// line 370
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ご注文内容確認"), "html", null, true);
echo "
</div>
</li>
<li class=\"ec-progress__item\">
<div class=\"ec-progress__number\">";
// line 374
echo twig_escape_filter($this->env, (isset($context["step"]) || array_key_exists("step", $context) ? $context["step"] : (function () { throw new RuntimeError('Variable "step" does not exist.', 374, $this->source); })()), "html", null, true);
$context["step"] = ((isset($context["step"]) || array_key_exists("step", $context) ? $context["step"] : (function () { throw new RuntimeError('Variable "step" does not exist.', 374, $this->source); })()) + 1);
// line 375
echo " </div>
<div class=\"ec-progress__label\">";
// line 376
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("完了"), "html", null, true);
echo "
</div>
</li>
</ul>
</div>
</div>
<div class=\"ec-productRole\">
<article id=\"p-art\" class=\"p-art\">
<header class=\"p-art-header\">
";
// line 387
echo " ";
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.', 387, $this->source); })()), "ProductCategories", [], "any", false, false, false, 387))) {
// line 388
echo " <div class=\"ec-productRole__category\">
<div>";
// line 389
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("関連カテゴリ"), "html", null, true);
echo "</div>
";
// line 390
$context['_parent'] = $context;
$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.', 390, $this->source); })()), "ProductCategories", [], "any", false, false, false, 390));
foreach ($context['_seq'] as $context["_key"] => $context["ProductCategory"]) {
// line 391
echo " <ul>
<li>
";
// line 393
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["ProductCategory"], "Category", [], "any", false, false, false, 393), "path", [], "any", false, false, false, 393));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["Category"]) {
// line 394
echo " <a href=\"";
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
echo "?category_id=";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Category"], "id", [], "any", false, false, false, 394), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Category"], "name", [], "any", false, false, false, 394), "html", null, true);
echo "</a>";
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, false, 394) == false)) {
// line 395
echo " <span>></span>";
}
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Category'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 397
echo " </li>
</ul>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ProductCategory'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 400
echo " </div>
";
}
// line 402
echo " ";
// line 403
echo " <div class=\"ec-productRole__title\">
<h2 class=\"ec-headingTitle\">";
// line 404
echo twig_escape_filter($this->env, 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.', 404, $this->source); })()), "name", [], "any", false, false, false, 404), "html", null, true);
echo "</h2>
</div>
<div class=\"ec-productRole__header_price\">\t\t\t
\t\t\t";
// line 407
if (twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 407, $this->source); })()), "hasProductClass", [], "any", false, false, false, 407)) {
// line 408
if ((twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 408, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 408) == 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.', 408, $this->source); })()), "getPrice02IncTaxMax", [], "any", false, false, false, 408))) {
// line 409
echo "\t\t\t\t\t";
$context["headerPrice"] = 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.', 409, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 409);
// line 410
echo "\t\t\t\t";
} else {
// line 411
echo "\t\t\t\t\t";
$context["headerPrice"] = ((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.', 411, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 411) . "〜") . 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.', 411, $this->source); })()), "getPrice02IncTaxMax", [], "any", false, false, false, 411));
// line 412
echo " \t";
}
// line 413
echo "\t\t\t";
} else {
// line 414
echo "\t\t\t\t";
$context["headerPrice"] = 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.', 414, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 414);
// line 415
echo "\t\t\t";
}
// line 416
echo " <p class=\"price\">
住設チェンジャー特価(本体+基本工事)<span class=\"num\">";
// line 417
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter((isset($context["headerPrice"]) || array_key_exists("headerPrice", $context) ? $context["headerPrice"] : (function () { throw new RuntimeError('Variable "headerPrice" does not exist.', 417, $this->source); })())), "html", null, true);
echo "</span>";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("(税込)"), "html", null, true);
echo "
</p>
</div>
";
// line 421
echo " <ul class=\"ec-productRole__tags\">
";
// line 422
$context['_parent'] = $context;
$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.', 422, $this->source); })()), "Tags", [], "any", false, false, false, 422));
foreach ($context['_seq'] as $context["_key"] => $context["Tag"]) {
// line 423
echo " <li class=\"ec-productRole__tag tag_";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Tag"], "id", [], "any", false, false, false, 423), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $context["Tag"], "html", null, true);
echo "</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Tag'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 425
echo " </ul>
</header>
<div class=\"p-contents\">
<div class=\"ec-grid2\">
<div class=\"ec-grid2__cell\">
<div class=\"ec-sliderItemRole\">
<div class=\"item_visual\">
";
// line 432
$context['_parent'] = $context;
$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.', 432, $this->source); })()), "ProductImage", [], "any", false, false, false, 432));
$context['_iterated'] = false;
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["ProductImage"]) {
// line 433
echo " <div class=\"slide-item\"><img src=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($context["ProductImage"], "save_image"), "html", null, true);
echo "\" alt=\"";
((twig_get_attribute($this->env, $this->source, $context["loop"], "first", [], "any", false, false, false, 433)) ? (print (twig_escape_filter($this->env, 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.', 433, $this->source); })()), "name", [], "any", false, false, false, 433), "html", null, true))) : (print ("")));
echo "\" width=\"550\" height=\"550\"";
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 433) > 1)) {
echo " loading=\"lazy\"";
}
echo "></div>
";
$context['_iterated'] = true;
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
if (!$context['_iterated']) {
// line 435
echo " <div class=\"slide-item\"><img src=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->extensions['Eccube\Twig\Extension\EccubeExtension']->getNoImageProduct(""), "save_image"), "html", null, true);
echo "\" alt=\"";
((twig_get_attribute($this->env, $this->source, $context["loop"], "first", [], "any", false, false, false, 435)) ? (print (twig_escape_filter($this->env, 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.', 435, $this->source); })()), "name", [], "any", false, false, false, 435), "html", null, true))) : (print ("")));
echo "\" width=\"550\" height=\"550\"></div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ProductImage'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 437
echo " </div>
<div class=\"item_nav\">
";
// line 439
$context['_parent'] = $context;
$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.', 439, $this->source); })()), "ProductImage", [], "any", false, false, false, 439));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["ProductImage"]) {
// line 440
echo " <div class=\"slideThumb\" data-index=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["loop"], "index0", [], "any", false, false, false, 440), "html", null, true);
echo "\"><img src=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($context["ProductImage"], "save_image"), "html", null, true);
echo "\" alt=\"\" width=\"133\" height=\"133\" loading=\"lazy\"></div>
";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ProductImage'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 442
echo " </div>
</div>
</div>
<div class=\"ec-grid2__cell\">
<form action=\"";
// line 446
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_add_cart", ["id" => twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 446, $this->source); })()), "id", [], "any", false, false, false, 446)]), "html", null, true);
echo "\" method=\"post\" id=\"form1\" name=\"form1\">
";
// line 447
if (twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 447, $this->source); })()), "stock_find", [], "any", false, false, false, 447)) {
// line 448
echo " <div class=\"ec-productRole__actions\">
";
// line 449
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id1", [], "any", true, true, false, 449)) {
// line 450
echo " <div class=\"ec-select\">
";
// line 451
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 451, $this->source); })()), "classcategory_id1", [], "any", false, false, false, 451), 'row');
echo "
";
// line 452
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 452, $this->source); })()), "classcategory_id1", [], "any", false, false, false, 452), 'errors');
echo "
</div>
";
// line 454
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id2", [], "any", true, true, false, 454)) {
// line 455
echo " <div class=\"ec-select\">
";
// line 456
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 456, $this->source); })()), "classcategory_id2", [], "any", false, false, false, 456), 'row');
echo "
";
// line 457
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 457, $this->source); })()), "classcategory_id2", [], "any", false, false, false, 457), 'errors');
echo "
</div>
";
}
// line 460
echo " ";
}
// line 461
echo "
";
// line 463
echo "
<!-- カレンダー -->
<div class=\"createCalendar\" id=\"calendarumekomi\">
";
// line 467
echo "\t\t\t\t\t\t\t";
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("block_calendar"));
echo "
</div>
<!-- // -->
";
// line 481
echo " ";
// line 487
echo " ";
echo twig_include($this->env, $context, "Product/option.twig", array(), true, true);
echo "
<div class=\"kntn-no-display\">
****非表示ここから****
<div class=\"ec-input\">
";
// line 491
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 491, $this->source); })()), "main_staff", [], "any", false, false, false, 491), 'row');
echo "
";
// line 492
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 492, $this->source); })()), "main_staff", [], "any", false, false, false, 492), 'errors');
echo "
</div>
<div class=\"ec-input\">
";
// line 496
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 496, $this->source); })()), "main_staff_schedule", [], "any", false, false, false, 496), 'row');
echo "
";
// line 497
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 497, $this->source); })()), "main_staff_schedule", [], "any", false, false, false, 497), 'errors');
echo "
</div>
<div class=\"ec-input\">
";
// line 501
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 501, $this->source); })()), "sub_staff", [], "any", false, false, false, 501), 'row');
echo "
";
// line 502
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 502, $this->source); })()), "sub_staff", [], "any", false, false, false, 502), 'errors');
echo "
</div>
<div class=\"ec-input\">
";
// line 506
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 506, $this->source); })()), "sub_staff_schedule", [], "any", false, false, false, 506), 'row');
echo "
";
// line 507
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 507, $this->source); })()), "sub_staff_schedule", [], "any", false, false, false, 507), 'errors');
echo "
</div>
<div class=\"ec-input\">
";
// line 511
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 511, $this->source); })()), "kntn_area", [], "any", false, false, false, 511), 'row');
echo "
";
// line 512
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 512, $this->source); })()), "kntn_area", [], "any", false, false, false, 512), 'errors');
echo "
</div>
****非表示ここまで****
</div>
";
// line 519
echo "
<div class=\"ec-numberInput\">
<div class=\"kntn-no-display\">
****非表示ここから****
<span>";
// line 523
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("数量"), "html", null, true);
echo "</span>
";
// line 524
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 524, $this->source); })()), "quantity", [], "any", false, false, false, 524), 'widget');
echo "
";
// line 525
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 525, $this->source); })()), "quantity", [], "any", false, false, false, 525), 'errors');
echo "
****非表示ここまで****
</div>
</div>
</div>
<div class=\"ec-productRole__profile\">
";
// line 533
echo " ";
// line 549
echo " ";
// line 550
echo " <div class=\"ec-productRole__price\">
";
// line 551
if (twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 551, $this->source); })()), "hasProductClass", [], "any", false, false, false, 551)) {
// line 552
if ((twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 552, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 552) == 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.', 552, $this->source); })()), "getPrice02IncTaxMax", [], "any", false, false, false, 552))) {
// line 553
echo " <div class=\"ec-price\">
<span class=\"ec-price__price price02-default\">";
// line 554
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 554, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 554)), "html", null, true);
echo "</span>
<span class=\"ec-price__tax\">";
// line 555
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("(税込)"), "html", null, true);
echo "</span>
</div>
";
} else {
// line 558
echo " <div class=\"ec-price\">
<span class=\"ec-price__price price02-default\">";
// line 559
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 559, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 559)), "html", null, true);
echo " ~ ";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 559, $this->source); })()), "getPrice02IncTaxMax", [], "any", false, false, false, 559)), "html", null, true);
echo "</span>
<span class=\"ec-price__tax\">";
// line 560
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("(税込)"), "html", null, true);
echo "</span>
</div>
";
}
// line 563
echo " ";
} else {
// line 564
echo " <div class=\"ec-price\">
<span class=\"ec-price__price\">";
// line 565
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 565, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 565)), "html", null, true);
echo "</span>
<span class=\"ec-price__tax\">";
// line 566
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("(税込)"), "html", null, true);
echo "</span>
</div>
";
}
// line 569
echo " ";
// line 570
echo " ";
// line 571
echo " ";
// line 572
echo " ";
echo twig_include($this->env, $context, "@ProductOption42/default/Product/option_price.twig", array(), true, true);
echo "
</div>
";
// line 575
echo " ";
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.', 575, $this->source); })()), "code_min", [], "any", false, false, false, 575))) {
// line 576
echo " <div class=\"ec-productRole__code\">
";
// line 577
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("商品コード"), "html", null, true);
echo ": <span class=\"product-code-default\">";
echo twig_escape_filter($this->env, 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.', 577, $this->source); })()), "code_min", [], "any", false, false, false, 577), "html", null, true);
if ((twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 577, $this->source); })()), "code_min", [], "any", false, false, false, 577) != 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.', 577, $this->source); })()), "code_max", [], "any", false, false, false, 577))) {
echo " ~ ";
echo twig_escape_filter($this->env, 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.', 577, $this->source); })()), "code_max", [], "any", false, false, false, 577), "html", null, true);
}
echo "</span>
</div>
";
}
// line 580
echo " </div>
<div class=\"ec-productRole__btn\">
";
// line 583
echo " ";
if ((isset($context["existsProduct"]) || array_key_exists("existsProduct", $context) ? $context["existsProduct"] : (function () { throw new RuntimeError('Variable "existsProduct" does not exist.', 583, $this->source); })())) {
// line 584
echo " <button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
";
// line 585
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("一度に購入出来る商品は1つになります"), "html", null, true);
echo "
</button>
";
} else {
// line 588
echo " <button type=\"submit\" class=\"ec-blockBtn--action add-cart\">
";
// line 589
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("購入手続きに進む"), "html", null, true);
echo "
</button>
";
}
// line 592
echo " ";
// line 593
echo " ";
// line 598
echo " </div>
";
} else {
// line 600
echo " <div class=\"ec-productRole__btn\">
<button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
";
// line 602
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ただいま品切れ中です。"), "html", null, true);
echo "
</button>
</div>
";
}
// line 606
echo "
";
// line 607
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 607, $this->source); })()), 'rest');
echo "
</form>
<div class=\"ec-modal\">
<div class=\"ec-modal-overlay\">
<div class=\"ec-modal-wrap\">
<span class=\"ec-modal-close\"><span class=\"ec-icon\"><img src=\"";
// line 612
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/icon/cross-dark.svg"), "html", null, true);
echo "\" alt=\"\"/></span></span>
<div id=\"ec-modal-header\" class=\"text-center\">";
// line 613
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("買い物かごに追加しました。"), "html", null, true);
echo "</div>
<div class=\"ec-modal-box\">
<div id=\"to-shopping\" class=\"ec-role\">
";
// line 617
echo " ";
// line 620
echo " ";
// line 621
echo " ";
// line 624
echo " <a href=\"";
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("shopping");
echo "\" class=\"ec-inlineBtn--action\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("購入手続きに進む"), "html", null, true);
echo "</a>
</div>
</div>
</div>
</div>
</div>
";
// line 630
if (twig_get_attribute($this->env, $this->source, (isset($context["BaseInfo"]) || array_key_exists("BaseInfo", $context) ? $context["BaseInfo"] : (function () { throw new RuntimeError('Variable "BaseInfo" does not exist.', 630, $this->source); })()), "option_favorite_product", [], "any", false, false, false, 630)) {
// line 631
echo " <form action=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_add_favorite", ["id" => twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 631, $this->source); })()), "id", [], "any", false, false, false, 631)]), "html", null, true);
echo "\" method=\"post\">
<div class=\"ec-productRole__btn\">
";
// line 633
if (((isset($context["is_favorite"]) || array_key_exists("is_favorite", $context) ? $context["is_favorite"] : (function () { throw new RuntimeError('Variable "is_favorite" does not exist.', 633, $this->source); })()) == false)) {
// line 634
echo " <button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel\">
";
// line 635
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お気に入りに追加"), "html", null, true);
echo "
</button>
";
} else {
// line 638
echo " <button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel\"
disabled=\"disabled\">";
// line 639
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お気に入りに追加済です。"), "html", null, true);
echo "
</button>
";
}
// line 642
echo " </div>
";
// line 648
echo " </form>
";
}
// line 650
echo " <div class=\"ec-productRole__description\">";
echo twig_nl2br(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.', 650, $this->source); })()), "description_detail", [], "any", false, false, false, 650));
echo "
</div>
</div>
</div>
";
// line 655
if (twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 655, $this->source); })()), "freearea", [], "any", false, false, false, 655)) {
// line 656
echo " <div class=\"ec-productRole__description\">
";
// line 657
echo twig_include($this->env, $context, twig_template_from_string($this->env, 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.', 657, $this->source); })()), "freearea", [], "any", false, false, false, 657)));
echo "
</div>
";
}
// line 660
echo " </div>
</article>
</div>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "Product/detail.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 1234 => 660, 1228 => 657, 1225 => 656, 1223 => 655, 1214 => 650, 1210 => 648, 1207 => 642, 1201 => 639, 1198 => 638, 1192 => 635, 1189 => 634, 1187 => 633, 1181 => 631, 1179 => 630, 1167 => 624, 1165 => 621, 1163 => 620, 1161 => 617, 1155 => 613, 1151 => 612, 1143 => 607, 1140 => 606, 1133 => 602, 1129 => 600, 1125 => 598, 1123 => 593, 1121 => 592, 1115 => 589, 1112 => 588, 1106 => 585, 1103 => 584, 1100 => 583, 1096 => 580, 1084 => 577, 1081 => 576, 1078 => 575, 1072 => 572, 1070 => 571, 1068 => 570, 1066 => 569, 1060 => 566, 1056 => 565, 1053 => 564, 1050 => 563, 1044 => 560, 1038 => 559, 1035 => 558, 1029 => 555, 1025 => 554, 1022 => 553, 1020 => 552, 1018 => 551, 1015 => 550, 1013 => 549, 1011 => 533, 1001 => 525, 997 => 524, 993 => 523, 987 => 519, 978 => 512, 974 => 511, 967 => 507, 963 => 506, 956 => 502, 952 => 501, 945 => 497, 941 => 496, 934 => 492, 930 => 491, 922 => 487, 920 => 481, 913 => 467, 908 => 463, 905 => 461, 902 => 460, 896 => 457, 892 => 456, 889 => 455, 887 => 454, 882 => 452, 878 => 451, 875 => 450, 873 => 449, 870 => 448, 868 => 447, 864 => 446, 858 => 442, 839 => 440, 822 => 439, 818 => 437, 807 => 435, 785 => 433, 767 => 432, 758 => 425, 747 => 423, 743 => 422, 740 => 421, 732 => 417, 729 => 416, 726 => 415, 723 => 414, 720 => 413, 717 => 412, 714 => 411, 711 => 410, 708 => 409, 706 => 408, 704 => 407, 698 => 404, 695 => 403, 693 => 402, 689 => 400, 681 => 397, 666 => 395, 657 => 394, 640 => 393, 636 => 391, 632 => 390, 628 => 389, 625 => 388, 622 => 387, 609 => 376, 606 => 375, 603 => 374, 596 => 370, 593 => 369, 590 => 368, 583 => 364, 580 => 363, 577 => 362, 570 => 358, 567 => 357, 564 => 356, 557 => 352, 554 => 351, 551 => 350, 544 => 346, 541 => 345, 538 => 344, 535 => 343, 533 => 342, 527 => 338, 517 => 337, 502 => 331, 498 => 330, 494 => 329, 490 => 328, 486 => 326, 480 => 324, 478 => 323, 473 => 322, 470 => 321, 460 => 319, 446 => 317, 438 => 316, 420 => 315, 415 => 313, 385 => 286, 374 => 278, 368 => 274, 363 => 268, 320 => 225, 315 => 222, 306 => 216, 302 => 214, 300 => 213, 297 => 212, 288 => 206, 284 => 204, 282 => 203, 216 => 139, 208 => 137, 206 => 136, 201 => 134, 198 => 133, 196 => 132, 182 => 121, 174 => 115, 164 => 114, 77 => 35, 73 => 34, 63 => 33, 52 => 29, 50 => 31, 37 => 29,);
}
public function getSourceContext()
{
return new Source("{#
This file is part of EC-CUBE
Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
http://www.ec-cube.co.jp/
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
ファイル名:detail.twig
処理概要:商品詳細ページにkintoneと連携したカレンダーを追加
作成年月日:2023/08/17
作成者:a.tojo
修正年月日:2024/02/13 k.saito
修正内容:商品詳細画面から、カート画面(cart)ではなく、注文手続き画面(shopping)に移動するように修正
修正年月日:2024/02/28 k.saito
修正内容:チェック未了の場合、「カートブロックを更新する」部分をコメントアウトして、更新しないように修正
チェック未了の場合、「購入手続きに進む」ボタンを非表示にして、エラーメッセージをすべて表示するように修正
修正年月日:2024/02/29 k.saito
修正内容:数量の項目を表示しないように修正
修正年月日:2024/03/15 k.saito
修正内容:エラー表示でカレンダが消えてしまう。ec-roleクラスが複数存在しているため。IDを使用するように変更。
#}
{% extends 'default_frame.twig' %}
{% set body_class = 'product_page' %}
{% block stylesheet %}
{{ include('Product/option_css.twig', ignore_missing=true) }} {# 追加 商品オプションCSS 本来の追加方法ではない気がするので他の方法があれば修正する #}
<style>
.slick-slider {
margin-bottom: 30px;
}
.slick-dots {
position: absolute;
bottom: -45px;
display: block;
width: 100%;
padding: 0;
list-style: none;
text-align: center;
}
.slick-dots li {
position: relative;
display: inline-block;
width: 20px;
height: 20px;
margin: 0 5px;
padding: 0;
cursor: pointer;
}
.slick-dots li button {
font-size: 0;
line-height: 0;
display: block;
width: 20px;
height: 20px;
padding: 5px;
cursor: pointer;
color: transparent;
border: 0;
outline: none;
background: transparent;
}
.slick-dots li button:hover,
.slick-dots li button:focus {
outline: none;
}
.slick-dots li button:hover:before,
.slick-dots li button:focus:before {
opacity: 1;
}
.slick-dots li button:before {
content: \" \";
line-height: 20px;
position: absolute;
top: 0;
left: 0;
width: 12px;
height: 12px;
text-align: center;
opacity: .25;
background-color: black;
border-radius: 50%;
}
.slick-dots li.slick-active button:before {
opacity: .75;
background-color: black;
}
.slick-dots li button.thumbnail img {
width: 0;
height: 0;
}
</style>
{% endblock %}
{% block javascript %}
<meta http-equiv=\"Content-Security-Policy\" content=\"default-src https://www.changer.fun/\" />
<script>
eccube.classCategories = {{ class_categories_as_json(Product)|raw }};
// 規格2に選択肢を割り当てる。
function fnSetClassCategories(form, classcat_id2_selected) {
var \$form = \$(form);
var product_id = \$form.find('input[name=product_id]').val();
var \$sele1 = \$form.find('select[name=classcategory_id1]');
var \$sele2 = \$form.find('select[name=classcategory_id2]');
eccube.setClassCategories(\$form, product_id, \$sele1, \$sele2, classcat_id2_selected);
}
{% if form.classcategory_id2 is defined %}
fnSetClassCategories(
\$('#form1'), {{ form.classcategory_id2.vars.value|json_encode|raw }}
);
{% elseif form.classcategory_id1 is defined %}
eccube.checkStock(\$('#form1'), {{ Product.id }}, {{ form.classcategory_id1.vars.value|json_encode|raw }}, null);
{% endif %}
</script>
<script>
\$(function() {
// bfcache無効化
\$(window).bind('pageshow', function(event) {
if (event.originalEvent.persisted) {
location.reload(true);
}
});
// Core Web Vital の Cumulative Layout Shift(CLS)対策のため
// img タグに width, height が付与されている.
// 630px 未満の画面サイズでは縦横比が壊れるための対策
// see https://github.com/EC-CUBE/ec-cube/pull/5023
// \$('.ec-grid2__cell').hide(); // フェードイン無効化
var removeSize = function () {
\$('.slide-item').height('');
\$('.slide-item img')
.removeAttr('width')
.removeAttr('height')
.removeAttr('style');
};
var slickInitial = function(slick) {
// \$('.ec-grid2__cell').fadeIn(1500); // フェードイン無効化
var baseHeight = \$(slick.target).height();
var baseWidth = \$(slick.target).width();
var rate = baseWidth / baseHeight;
\$('.slide-item').height(baseHeight * rate); // 余白を削除する
// transform を使用することでCLSの影響を受けないようにする
\$('.slide-item img')
.css(
{
'transform-origin': 'top left',
'transform': 'scaleY(' + rate + ')',
'transition': 'transform .1s'
}
);
// 正しいサイズに近くなったら属性を解除する
setTimeout(removeSize, 500);
};
\$('.item_visual').on('init', slickInitial);
// リサイズ時は CLS の影響を受けないため属性を解除する
\$(window).resize(removeSize);
\$('.item_visual').slick({
dots: false,
arrows: false,
responsive: [{
breakpoint: 768,
settings: {
dots: true
}
}]
});
\$('.slideThumb').on('click', function() {
var index = \$(this).attr('data-index');
\$('.item_visual').slick('slickGoTo', index, false);
})
});
</script>
<script>
\$(function() {
\$('.add-cart').on('click', function(event) {
{% if form.classcategory_id1 is defined %}
// 規格1フォームの必須チェック
if (\$('#classcategory_id1').val() == '__unselected' || \$('#classcategory_id1').val() == '') {
\$('#classcategory_id1')[0].setCustomValidity('{{ '項目が選択されていません'|trans }}');
return true;
} else {
\$('#classcategory_id1')[0].setCustomValidity('');
}
{% endif %}
{% if form.classcategory_id2 is defined %}
// 規格2フォームの必須チェック
if (\$('#classcategory_id2').val() == '__unselected' || \$('#classcategory_id2').val() == '') {
\$('#classcategory_id2')[0].setCustomValidity('{{ '項目が選択されていません'|trans }}');
return true;
} else {
\$('#classcategory_id2')[0].setCustomValidity('');
}
{% endif %}
// 個数フォームのチェック
if (\$('#quantity').val() < 1) {
\$('#quantity')[0].setCustomValidity('{{ '1以上で入力してください。'|trans }}');
return true;
} else {
\$('#quantity')[0].setCustomValidity('');
}
event.preventDefault();
\$form = \$('#form1');
\$.ajax({
url: \$form.attr('action'),
type: \$form.attr('method'),
data: \$form.serialize(),
dataType: 'json',
beforeSend: function(xhr, settings) {
// Buttonを無効にする
\$('.add-cart').prop('disabled', true);
}
}).done(function(data) {
// レスポンス内のメッセージをalertで表示
let first_flg = true;
let err_flg = false;
\$.each(data.messages, function() {
// console.log('data.messages:'+data.messages);
if (first_flg == true) {
\$('#ec-modal-header').html(this);
let result = this.indexOf( '買い物かごに追加しました' );
if (result == -1) {
err_flg = true;
}
first_flg = false;
} else {
\$('#ec-modal-header').append('</br>'+this);
let result = this.indexOf( '買い物かごに追加しました' );
if (result == -1) {
err_flg = true;
}
}
// \$('#ec-modal-header').html(this);
});
if (err_flg == true) { // エラーメッセージあり -> リンクボタンは表示しない
{# ec-roleクラスは複数存在するので、ここではIDを使用する。カレンダが消えてしまうので。
\$('.ec-role').css('display', 'none');
#}
\$('#to-shopping').css('display', 'none');
} else {
{# ec-roleクラスは複数存在するので、ここではIDを使用する
\$('.ec-role').css('display', 'block');
#}
\$('#to-shopping').css('display', 'block');
}
\$('.ec-modal').show()
\$.ajax({
url: \"{{ url('block_cart') }}\",
type: 'GET',
dataType: 'html'
}).done(function(html) {
\$('.ec-headerRole__cart').html(html);
});
}).fail(function(data) {
alert('{{ '買い物かごへの追加に失敗しました。'|trans }}');
}).always(function(data) {
// Buttonを有効にする
\$('.add-cart').prop('disabled', false);
});
});
});
\$('.ec-modal-wrap').on('click', function(e) {
// モーダル内の処理は外側にバブリングさせない
e.stopPropagation();
});
// .ec-modal-close はリロード対象から外す。hide()のみ実施
\$('.ec-modal-overlay, .ec-modal, .ec-inlineBtn--cancel').on('click', function() {
document.location.reload()//追加 買い物かご追加後はブラウザ更新
\t\t\t\$('.ec-modal').hide()
});
\$('.ec-modal-close').on('click', function() {
\t\t\t\$('.ec-modal').hide()
});
</script>
<script type=\"application/ld+json\">
{
\"@context\": \"https://schema.org/\",
\"@type\": \"Product\",
\"name\": \"{{ Product.name }}\",
\"image\": [
{% for img in Product.ProductImage %}
\"{{ app.request.schemeAndHttpHost }}{{ asset(img, 'save_image') }}\"{% if not loop.last %},{% endif %}
{% else %}
\"{{ app.request.schemeAndHttpHost }}{{ asset(''|no_image_product, 'save_image') }}\"
{% endfor %}
],
\"description\": \"{{ Product.description_list | default(Product.description_detail) | replace({'\\n': '', '\\r': ''}) | slice(0,300) }}\",
{% if Product.code_min %}
\"sku\": \"{{ Product.code_min }}\",
{% endif %}
\"offers\": {
\"@type\": \"Offer\",
\"url\": \"{{ url('product_detail', {'id': Product.id}) }}\",
\"priceCurrency\": \"{{ eccube_config.currency }}\",
\"price\": {{ Product.getPrice02IncTaxMin ? Product.getPrice02IncTaxMin : 0}},
\"availability\": \"{{ Product.stock_find ? \"InStock\" : \"OutOfStock\" }}\"
}
}
</script>
{% endblock %}
{% block main %}
<div class=\"ec-cartRole\">
<div class=\"ec-cartRole__progress\">
<ul class=\"ec-progress\">
{% set step = 1 %}
<li class=\"ec-progress__item is-complete\">
<div class=\"ec-progress__number\">{{ step }}{% set step = step + 1 %}
</div>
<div class=\"ec-progress__label\">{{ '商品詳細'|trans }}
</div>
</li>
<li class=\"ec-progress__item\">
<div class=\"ec-progress__number\">{{ step }}{% set step = step + 1 %}
</div>
<div class=\"ec-progress__label\">{{ '写真アップロード'|trans }}
</div>
</li>
<li class=\"ec-progress__item\">
<div class=\"ec-progress__number\">{{ step }}{% set step = step + 1 %}
</div>
<div class=\"ec-progress__label\">{{ 'お客様情報'|trans }}
</div>
</li>
<li class=\"ec-progress__item\">
<div class=\"ec-progress__number\">{{ step }}{% set step = step + 1 %}
</div>
<div class=\"ec-progress__label\">{{ '決済情報'|trans }}
</div>
</li>
<li class=\"ec-progress__item\">
<div class=\"ec-progress__number\">{{ step }}{% set step = step + 1 %}
</div>
<div class=\"ec-progress__label\">{{ 'ご注文内容確認'|trans }}
</div>
</li>
<li class=\"ec-progress__item\">
<div class=\"ec-progress__number\">{{ step }}{% set step = step + 1 %}
</div>
<div class=\"ec-progress__label\">{{ '完了'|trans }}
</div>
</li>
</ul>
</div>
</div>
<div class=\"ec-productRole\">
<article id=\"p-art\" class=\"p-art\">
<header class=\"p-art-header\">
{# 関連カテゴリ #}
{% if Product.ProductCategories is not empty %}
<div class=\"ec-productRole__category\">
<div>{{ '関連カテゴリ'|trans }}</div>
{% for ProductCategory in Product.ProductCategories %}
<ul>
<li>
{% for Category in ProductCategory.Category.path %}
<a href=\"{{ url('product_list') }}?category_id={{ Category.id }}\">{{ Category.name }}</a> {%- if loop.last == false %}
<span>></span>{% endif -%}
{% endfor %}
</li>
</ul>
{% endfor %}
</div>
{% endif %}
{# 商品名 #}
<div class=\"ec-productRole__title\">
<h2 class=\"ec-headingTitle\">{{ Product.name }}</h2>
</div>
<div class=\"ec-productRole__header_price\">\t\t\t
\t\t\t{% if Product.hasProductClass -%}
\t\t\t\t{% if Product.getPrice02IncTaxMin == Product.getPrice02IncTaxMax %}
\t\t\t\t\t{% set headerPrice = Product.getPrice02IncTaxMin %}
\t\t\t\t{% else %}
\t\t\t\t\t{% set headerPrice = Product.getPrice02IncTaxMin ~ \"〜\" ~ Product.getPrice02IncTaxMax %}
\t{% endif %}
\t\t\t{% else %}
\t\t\t\t{% set headerPrice = Product.getPrice02IncTaxMin %}
\t\t\t{% endif %}
<p class=\"price\">
住設チェンジャー特価(本体+基本工事)<span class=\"num\">{{ headerPrice | price }}{# ¥113,300 #}</span>{{ '(税込)'|trans }}
</p>
</div>
{# タグ #}
<ul class=\"ec-productRole__tags\">
{% for Tag in Product.Tags %}
<li class=\"ec-productRole__tag tag_{{ Tag.id }}\">{{ Tag }}</li>
{% endfor %}
</ul>
</header>
<div class=\"p-contents\">
<div class=\"ec-grid2\">
<div class=\"ec-grid2__cell\">
<div class=\"ec-sliderItemRole\">
<div class=\"item_visual\">
{% for ProductImage in Product.ProductImage %}
<div class=\"slide-item\"><img src=\"{{ asset(ProductImage, 'save_image') }}\" alt=\"{{ loop.first ? Product.name : '' }}\" width=\"550\" height=\"550\"{% if loop.index > 1 %} loading=\"lazy\"{% endif %}></div>
{% else %}
<div class=\"slide-item\"><img src=\"{{ asset(''|no_image_product, 'save_image') }}\" alt=\"{{ loop.first ? Product.name : '' }}\" width=\"550\" height=\"550\"></div>
{% endfor %}
</div>
<div class=\"item_nav\">
{% for ProductImage in Product.ProductImage %}
<div class=\"slideThumb\" data-index=\"{{ loop.index0 }}\"><img src=\"{{ asset(ProductImage, 'save_image') }}\" alt=\"\" width=\"133\" height=\"133\" loading=\"lazy\"></div>
{% endfor %}
</div>
</div>
</div>
<div class=\"ec-grid2__cell\">
<form action=\"{{ url('product_add_cart', {id:Product.id}) }}\" method=\"post\" id=\"form1\" name=\"form1\">
{% if Product.stock_find %}
<div class=\"ec-productRole__actions\">
{% if form.classcategory_id1 is defined %}
<div class=\"ec-select\">
{{ form_row(form.classcategory_id1) }}
{{ form_errors(form.classcategory_id1) }}
</div>
{% if form.classcategory_id2 is defined %}
<div class=\"ec-select\">
{{ form_row(form.classcategory_id2) }}
{{ form_errors(form.classcategory_id2) }}
</div>
{% endif %}
{% endif %}
{# kintone連携 追加 #}
<!-- カレンダー -->
<div class=\"createCalendar\" id=\"calendarumekomi\">
{# {{ include('Block/calendar.twig', ignore_missing = true) }} #}
\t\t\t\t\t\t\t{{ render(path('block_calendar')) }}
</div>
<!-- // -->
{#
<div class=\"ec-input\">
{{ form_row(form.construction_date) }}
{{ form_errors(form.construction_date) }}
</div>
<div class=\"ec-select\">
{{ form_row(form.select_schedule) }}
{{ form_errors(form.select_schedule) }}
</div>
#}
{#
<div class=\"ec-select\">
{{ form_row(form.bakusoku_price) }}
{{ form_errors(form.bakusoku_price) }}
</div>
#}
{{ include('Product/option.twig', ignore_missing=true) }}
<div class=\"kntn-no-display\">
****非表示ここから****
<div class=\"ec-input\">
{{ form_row(form.main_staff) }}
{{ form_errors(form.main_staff) }}
</div>
<div class=\"ec-input\">
{{ form_row(form.main_staff_schedule) }}
{{ form_errors(form.main_staff_schedule) }}
</div>
<div class=\"ec-input\">
{{ form_row(form.sub_staff) }}
{{ form_errors(form.sub_staff) }}
</div>
<div class=\"ec-input\">
{{ form_row(form.sub_staff_schedule) }}
{{ form_errors(form.sub_staff_schedule) }}
</div>
<div class=\"ec-input\">
{{ form_row(form.kntn_area) }}
{{ form_errors(form.kntn_area) }}
</div>
****非表示ここまで****
</div>
{# 追加ここまで #}
<div class=\"ec-numberInput\">
<div class=\"kntn-no-display\">
****非表示ここから****
<span>{{ '数量'|trans }}</span>
{{ form_widget(form.quantity) }}
{{ form_errors(form.quantity) }}
****非表示ここまで****
</div>
</div>
</div>
<div class=\"ec-productRole__profile\">
{# 通常価格 #}
{# {% if Product.hasProductClass -%}
<div class=\"ec-productRole__priceRegular\">
{% if Product.getPrice01Min is not null and Product.getPrice01IncTaxMin == Product.getPrice01IncTaxMax %}
<span class=\"ec-productRole__priceRegularPrice\">{{ '通常価格'|trans }}:<span class=\"price01-default\">{{ Product.getPrice01IncTaxMin|price }}</span></span>
<span class=\"ec-productRole__priceRegularTax\">{{ '(税込)'|trans }}</span>
{% elseif Product.getPrice01Min is not null and Product.getPrice01Max is not null %}
<span class=\"ec-productRole__priceRegularPrice\">{{ '通常価格'|trans }}:<span class=\"price01-default\">{{ Product.getPrice01IncTaxMin|price }}~ {{ Product.getPrice01IncTaxMax|price }}</span></span>
<span class=\"ec-productRole__priceRegularTax\">{{ '(税込)'|trans }}</span>
{% endif %}
</div>
{% else %}
{% if Product.getPrice01Max is not null %}
<span class=\"ec-productRole__priceRegularPrice\">{{ '通常価格'|trans }}:{{ Product.getPrice01IncTaxMin|price }}</span>
<span class=\"ec-productRole__priceRegularTax\">{{ '(税込)'|trans }}</span>
{% endif %}
{% endif %} #}
{# 販売価格 #}
<div class=\"ec-productRole__price\">
{% if Product.hasProductClass -%}
{% if Product.getPrice02IncTaxMin == Product.getPrice02IncTaxMax %}
<div class=\"ec-price\">
<span class=\"ec-price__price price02-default\">{{ Product.getPrice02IncTaxMin|price }}</span>
<span class=\"ec-price__tax\">{{ '(税込)'|trans }}</span>
</div>
{% else %}
<div class=\"ec-price\">
<span class=\"ec-price__price price02-default\">{{ Product.getPrice02IncTaxMin|price }} ~ {{ Product.getPrice02IncTaxMax|price }}</span>
<span class=\"ec-price__tax\">{{ '(税込)'|trans }}</span>
</div>
{% endif %}
{% else %}
<div class=\"ec-price\">
<span class=\"ec-price__price\">{{ Product.getPrice02IncTaxMin|price }}</span>
<span class=\"ec-price__tax\">{{ '(税込)'|trans }}</span>
</div>
{% endif %}
{# {{ include('Product/option.twig', ignore_missing = true)}} #}
{# {{ include('Product/option_price.twig', ignore_missing = true)}}#}
{# {{ include('@ProductOption42/default/Product/option.twig', ignore_missing = true)}} #}
{{ include('@ProductOption42/default/Product/option_price.twig', ignore_missing = true)}}
</div>
{# 商品コード #}
{% if Product.code_min is not empty %}
<div class=\"ec-productRole__code\">
{{ '商品コード'|trans }}: <span class=\"product-code-default\">{{ Product.code_min }}{% if Product.code_min != Product.code_max %} ~ {{ Product.code_max }}{% endif %}</span>
</div>
{% endif %}
</div>
<div class=\"ec-productRole__btn\">
{# 追加 買い物かごに商品がある場合は買い物かごに追加しない #}
{% if existsProduct %}
<button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
{{ '一度に購入出来る商品は1つになります'|trans }}
</button>
{% else %}
<button type=\"submit\" class=\"ec-blockBtn--action add-cart\">
{{ '購入手続きに進む'|trans }}
</button>
{% endif %}
{# 追加 ここまで #}
{#
<button type=\"submit\" class=\"ec-blockBtn--action add-cart\">
{{ '購入手続きに進む'|trans }}
</button>
#}
</div>
{% else %}
<div class=\"ec-productRole__btn\">
<button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
{{ 'ただいま品切れ中です。'|trans }}
</button>
</div>
{% endif %}
{{ form_rest(form) }}
</form>
<div class=\"ec-modal\">
<div class=\"ec-modal-overlay\">
<div class=\"ec-modal-wrap\">
<span class=\"ec-modal-close\"><span class=\"ec-icon\"><img src=\"{{ asset('assets/icon/cross-dark.svg') }}\" alt=\"\"/></span></span>
<div id=\"ec-modal-header\" class=\"text-center\">{{ '買い物かごに追加しました。'|trans }}</div>
<div class=\"ec-modal-box\">
<div id=\"to-shopping\" class=\"ec-role\">
{# 追加 1注文1商品のためコメントアウト #}
{#
<span class=\"ec-inlineBtn--cancel\">{{ 'お買い物を続ける'|trans }}</span>
#}
{# 修正 移動先を変更 #}
{#
<a href=\"{{ url('cart') }}\" class=\"ec-inlineBtn--action\">{{ '購入手続きに進む'|trans }}</a>
#}
<a href=\"{{ url('shopping') }}\" class=\"ec-inlineBtn--action\">{{ '購入手続きに進む'|trans }}</a>
</div>
</div>
</div>
</div>
</div>
{% if BaseInfo.option_favorite_product %}
<form action=\"{{ url('product_add_favorite', {id:Product.id}) }}\" method=\"post\">
<div class=\"ec-productRole__btn\">
{% if is_favorite == false %}
<button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel\">
{{ 'お気に入りに追加'|trans }}
</button>
{% else %}
<button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel\"
disabled=\"disabled\">{{ 'お気に入りに追加済です。'|trans }}
</button>
{% endif %}
</div>
{# カートリセットボタン
<div class=\"ec-productRole__btn\">
<a href=\"{{ path('cart_clear') }}\" class=\"ec-blockBtn--cancel\" style=\"color: #fff; width: 350px; margin: 10px auto;\">はじめからやり直す</a>
</div>
カートリセットボタン ここまで#}
</form>
{% endif %}
<div class=\"ec-productRole__description\">{{ Product.description_detail|raw|nl2br }}
</div>
</div>
</div>
{% if Product.freearea %}
<div class=\"ec-productRole__description\">
{{ include(template_from_string(Product.freearea)) }}
</div>
{% endif %}
</div>
</article>
</div>
{% endblock %}", "Product/detail.twig", "/home/sinwa/changer.fun/public_html/www2.changer.fun/app/template/default/Product/detail.twig");
}
}