<?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_5634727c89aa670b2185bc4292a0e1df 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 11
return "default_frame.twig";
}
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", "Product/detail.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Product/detail.twig"));
// line 13
$context["body_class"] = "product_page";
// line 110
$context["is_calendar"] = false;
// line 111
$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.', 111, $this->source); })()), "ProductCategories", [], "any", false, false, false, 111));
foreach ($context['_seq'] as $context["_key"] => $context["pc"]) {
// line 112
if ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["pc"], "Category", [], "any", false, false, false, 112), "id", [], "any", false, false, false, 112) == 124)) {
// line 113
$context["is_calendar"] = true;
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['pc'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 11
$this->parent = $this->loadTemplate("default_frame.twig", "Product/detail.twig", 11);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 15
public function block_stylesheet($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(), "block", "stylesheet"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheet"));
// line 16
echo " <style>
.hidden{
display: none;
}
.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;
}
.price_no_tax{
color: black;
}
.price_no_tax_first{
margin-left: 30px;
}
.product_plate_type_print img{
width: unset;
}
.ec-productRole .ec-productRole__category{
border-bottom: unset;
}
</style>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 117
public function block_javascript($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(), "block", "javascript"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascript"));
// line 118
echo " <script>
var stocks = ";
// line 119
echo json_encode((isset($context["stocks"]) || array_key_exists("stocks", $context) ? $context["stocks"] : (function () { throw new RuntimeError('Variable "stocks" does not exist.', 119, $this->source); })()));
echo ";
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);
}
var code = jQuery('.product-code-default').text();
if (Number(stocks[code]) < 0){
jQuery('.product-stock-quantity-default').html('<b>あり</b>');
}
if (stocks[code] != undefined && stocks[code] > 0){
jQuery('.product-stock-quantity-default').html(stocks[code]);
}else if (stocks[code] != undefined && stocks[code] == 0){
jQuery('.product-stock-quantity-default').html('<b>なし</b>');
}
";
// line 141
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id2", [], "any", true, true, false, 141)) {
// line 142
echo " fnSetClassCategories(
\$('#form1'), ";
// line 143
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.', 143, $this->source); })()), "classcategory_id2", [], "any", false, false, false, 143), "vars", [], "any", false, false, false, 143), "value", [], "any", false, false, false, 143));
echo "
);
";
} elseif (twig_get_attribute($this->env, $this->source, // line 145
($context["form"] ?? null), "classcategory_id1", [], "any", true, true, false, 145)) {
// line 146
echo " \$('input[name=\"classcategory_option\"]').on('change', function(e) {
\$('#classcategory_id1').val(\$(e.target).val()).change();
})
eccube.checkStock(\$('#form1'), ";
// line 149
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.', 149, $this->source); })()), "id", [], "any", false, false, false, 149), "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.', 149, $this->source); })()), "classcategory_id1", [], "any", false, false, false, 149), "vars", [], "any", false, false, false, 149), "value", [], "any", false, false, false, 149));
echo ", null);
";
}
// line 151
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() {
function htmlQty(type, printerUnit, orderUnit) {
var html = ``;
if(type === 1) {
";
// line 219
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.', 219, $this->source); })()), "printer_unit", [], "any", false, false, false, 219)) {
// line 220
echo " html += `<select id=\"quantity\" name=\"quantity\" style=\"min-width:unset;\" placeholder=\"数量\" class=\"form-select\">`;
html += `<option value=\"\" selected=\"selected\">数量</option>`;
for(let i = 1; i < 31; i++) {
html += `<option value=\"\${ i*printerUnit }\">\${ i*printerUnit }</option>`;
}
html += `</select>`;
";
} else {
// line 227
echo "
if(orderUnit > 0) {
if(printerUnit === 0) {
printerUnit = orderUnit;
}
html += `<select id=\"quantity\" name=\"quantity\" style=\"min-width:unset;\" placeholder=\"数量\" class=\"form-select\">`;
html += `<option value=\"\" selected=\"selected\">数量</option>`;
for(let i = 1; i < 31; i++) {
html += `<option value=\"\${ i*printerUnit }\">\${ i*printerUnit }</option>`;
}
html += `</select>`;
} else {
html += `<input type=\"number\" id=\"quantity\" name=\"quantity\" required=\"required\" min=\"1\" maxlength=\"9\" style=\"min-width:unset; display: block !important;\" placeholder=\"数量\" class=\"form-control\" value=\"1\">`;
}
";
}
// line 242
echo " } else {
";
// line 243
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.', 243, $this->source); })()), "order_unit", [], "any", false, false, false, 243)) {
// line 244
echo " html += `<select id=\"quantity\" name=\"quantity\" style=\"min-width:unset;\" placeholder=\"数量\" class=\"form-select\">`;
html += `<option value=\"\" selected=\"selected\">数量</option>`;
for(let i = 1; i < 31; i++) {
html += `<option value=\"\${ i*orderUnit }\">\${ i*orderUnit }</option>`;
}
html += `</select>`;
";
} else {
// line 251
echo " html += `<input type=\"number\" id=\"quantity\" name=\"quantity\" required=\"required\" min=\"1\" maxlength=\"9\" style=\"min-width:unset; display: block !important;\" placeholder=\"数量\" class=\"form-control\" value=\"1\">`;
";
}
// line 253
echo " }
return html;
}
\$(\".group-input-qty\").html('');
\$(\".group-input-qty\").append(htmlQty(0, ";
// line 258
echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, ($context["Product"] ?? null), "printer_unit", [], "any", true, true, false, 258)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, ($context["Product"] ?? null), "printer_unit", [], "any", false, false, false, 258), 0)) : (0)), "html", null, true);
echo ", ";
echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, ($context["Product"] ?? null), "order_unit", [], "any", true, true, false, 258)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, ($context["Product"] ?? null), "order_unit", [], "any", false, false, false, 258), 0)) : (0)), "html", null, true);
echo "));
\$('.add-cart').on('click', function(event) {
";
// line 262
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id1", [], "any", true, true, false, 262)) {
// line 263
echo " // 規格1フォームの必須チェック
if (\$('#classcategory_id1').val() == '__unselected' || \$('#classcategory_id1').val() == '') {
\$('#classcategory_id1')[0].setCustomValidity('";
// line 265
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 271
echo "
";
// line 272
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id2", [], "any", true, true, false, 272)) {
// line 273
echo " // 規格2フォームの必須チェック
if (\$('#classcategory_id2').val() == '__unselected' || \$('#classcategory_id2').val() == '') {
\$('#classcategory_id2')[0].setCustomValidity('";
// line 275
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 281
echo "
// 個数フォームのチェック
var isPrint = false;
if (\$('#is_print').val() == 1) {
isPrint = true;
if (!\$('#product_print_color').val()) {
\$('#product_print_color')[0].setCustomValidity('";
// line 287
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ネームプリントの色を選択してください。"), "html", null, true);
echo "');
return true;
} else {
\$('#product_print_color')[0].setCustomValidity('');
}
}
// 個数フォームのチェック
if (!\$('#quantity').val()) {
if (\$('#quantity').prop('nodeName') == 'SELECT') {
\$('#quantity')[0].setCustomValidity('";
// line 297
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("数量を選択してください。"), "html", null, true);
echo "');
} else {
\$('#quantity')[0].setCustomValidity('";
// line 299
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("数量を入力してください。"), "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で表示
\$.each(data.messages, function() {
\$('#ec-modal-header').html(this);
});
\$('.ec-modal').show()
// カートブロックを更新する
\$.ajax({
url: \"";
// line 327
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 334
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);
});
});
\$(\"#is_print\").change(function(){
\$(\".group-input-qty\").html('');
if (\$(this).val() == 1) {
\$('.form-is_repurchase').css('display', 'block');
\$('.form-is_repurchase input:first').prop('checked', true);
\$('.form-product-color').css('display', 'block');
\$(\".group-input-qty\").append(htmlQty(1, ";
// line 348
echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, ($context["Product"] ?? null), "printer_unit", [], "any", true, true, false, 348)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, ($context["Product"] ?? null), "printer_unit", [], "any", false, false, false, 348), 0)) : (0)), "html", null, true);
echo ", ";
echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, ($context["Product"] ?? null), "order_unit", [], "any", true, true, false, 348)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, ($context["Product"] ?? null), "order_unit", [], "any", false, false, false, 348), 0)) : (0)), "html", null, true);
echo "));
// \$(\"#quantity\").attr('name', 'quantity').css('display', 'inline-block');
// \$(\"#quantity_raw\").attr('name', 'quantity_raw').css('display', 'none');
} else {
\$('.form-is_repurchase').css('display', 'none');
\$('.form-is_repurchase input').prop('checked', false);
\$('.form-product-color').css('display', 'none');
\$('.form-product-color select').val('');
\$(\".group-input-qty\").append(htmlQty(0, ";
// line 356
echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, ($context["Product"] ?? null), "printer_unit", [], "any", true, true, false, 356)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, ($context["Product"] ?? null), "printer_unit", [], "any", false, false, false, 356), 0)) : (0)), "html", null, true);
echo ", ";
echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, ($context["Product"] ?? null), "order_unit", [], "any", true, true, false, 356)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, ($context["Product"] ?? null), "order_unit", [], "any", false, false, false, 356), 0)) : (0)), "html", null, true);
echo "));
// \$(\"#quantity\").attr('name', 'quantity_raw').css('display', 'none');
// \$(\"#quantity_raw\").attr('name', 'quantity').css('display', 'inline-block');
}
});
});
\$('.ec-modal-wrap').on('click', function(e) {
// モーダル内の処理は外側にバブリングさせない
e.stopPropagation();
});
\$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
\$('.ec-modal').hide()
});
var nIndexClass = 1;
\$(\"#classcategory_id1 > option\").each(function(k, v) {
if(this.value != \"__unselected\") {
\$(v).attr('key', nIndexClass);
nIndexClass++;
}
});
var jsonQty = ";
// line 379
echo json_encode(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.', 379, $this->source); })()), "getAllStocks", [], "any", false, false, false, 379));
echo "
var select_classcategory_id1 = 0;
\$('#classcategory_id1').on('change', function(e) {
if(this.selectedIndex < 1) return false;
";
// line 383
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id1", [], "any", true, true, false, 383)) {
// line 384
echo " getClass(this.selectedIndex)
";
// line 385
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id2", [], "any", true, true, false, 385)) {
// line 386
echo " select_classcategory_id1 = this.selectedIndex;
";
}
// line 388
echo " ";
}
// line 389
echo " });
\$('#classcategory_id2').on('change', function(e) {
if(this.selectedIndex < 1) return false;
getClass(select_classcategory_id1, this.selectedIndex)
});
function getClass(class1, class2) {
var qty = '';
";
// line 397
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id1", [], "any", true, true, false, 397)) {
// line 398
echo " qty = jsonQty[class1];
";
// line 399
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id2", [], "any", true, true, false, 399)) {
// line 400
echo " qty = jsonQty[class1][class2];
";
}
// line 402
echo " ";
}
// line 403
echo " if(qty == \"0\") {
\$('.ec-productRole__code span.product-stock-quantity-default').html(\"<b>なし</b>\");
} else if(!!qty === false){
\$('.ec-productRole__code span.product-stock-quantity-default').html(\"<b>あり</b>\");
}else {
qty = parseInt(qty);
\$('.ec-productRole__code span.product-stock-quantity-default').html(\"<b>\"+qty+\"</b>\");
}
}
// \$('#is_print').change(function() {
// window.location.href = window.location.href+'?is_print='+\$(this).val();
// });
</script>
<script type=\"application/ld+json\">
{
\"@context\": \"https://schema.org/\",
\"@type\": \"Product\",
\"name\": \"";
// line 422
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.', 422, $this->source); })()), "name", [], "any", false, false, false, 422), "html", null, true);
echo "\",
\"image\": [
";
// line 424
$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.', 424, $this->source); })()), "ProductImage", [], "any", false, false, false, 424));
$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 425
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.', 425, $this->source); })()), "request", [], "any", false, false, false, 425), "schemeAndHttpHost", [], "any", false, false, false, 425), "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, 425)) {
echo ",";
}
// line 426
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 428
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.', 428, $this->source); })()), "request", [], "any", false, false, false, 428), "schemeAndHttpHost", [], "any", false, false, false, 428), "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 430
echo " ],
\"description\": \"";
// line 431
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, 431)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, ($context["Product"] ?? null), "description_list", [], "any", false, false, false, 431), 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.', 431, $this->source); })()), "description_detail", [], "any", false, false, false, 431))) : (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.', 431, $this->source); })()), "description_detail", [], "any", false, false, false, 431))), ["
" => "", "
" => ""]), 0, 300), "html", null, true);
echo "\",
";
// line 432
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.', 432, $this->source); })()), "code_min", [], "any", false, false, false, 432)) {
// line 433
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.', 433, $this->source); })()), "code_min", [], "any", false, false, false, 433), "html", null, true);
echo "\",
";
}
// line 435
echo " \"offers\": {
\"@type\": \"Offer\",
\"url\": \"";
// line 437
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.', 437, $this->source); })()), "id", [], "any", false, false, false, 437)]), "html", null, true);
echo "\",
\"priceCurrency\": \"";
// line 438
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.', 438, $this->source); })()), "currency", [], "any", false, false, false, 438), "html", null, true);
echo "\",
\"price\": ";
// line 439
((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); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 439)) ? (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.', 439, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 439), "html", null, true))) : (print (0)));
echo ",
\"availability\": \"";
// line 440
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.', 440, $this->source); })()), "stock_find", [], "any", false, false, false, 440)) ? ("InStock") : ("OutOfStock"));
echo "\"
}
}
</script>
";
// line 445
$context["is_calendar"] = false;
// line 446
$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.', 446, $this->source); })()), "ProductCategories", [], "any", false, false, false, 446));
foreach ($context['_seq'] as $context["_key"] => $context["pc"]) {
// line 447
echo " ";
if ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["pc"], "Category", [], "any", false, false, false, 447), "id", [], "any", false, false, false, 447) == 124)) {
// line 448
echo " ";
$context["is_calendar"] = true;
// line 449
echo " ";
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['pc'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 451
echo "
";
// line 452
if ((isset($context["is_calendar"]) || array_key_exists("is_calendar", $context) ? $context["is_calendar"] : (function () { throw new RuntimeError('Variable "is_calendar" does not exist.', 452, $this->source); })())) {
// line 453
echo "<script>
document.addEventListener('DOMContentLoaded', function () {
// 規格1(数量パターン)
const select1 = document.getElementById('classcategory_id1')
|| document.querySelector('select[name=\"classcategory_id1\"]');
if (!select1) return;
// 規格2(優先: #is_print、なければ classcategory_id2)
const isPrint = document.getElementById('is_print'); // 0=しない, 1=する
const select2 = isPrint || document.getElementById('classcategory_id2')
|| document.querySelector('select[name=\"classcategory_id2\"]');
// 再版区分(表示/非表示を切り替え)
const repurchaseBlock = document.querySelector('.form-is_repurchase');
// ネームプリント切替連動(カレンダー)
const PRINT_ON_VALUES = new Set(['291', '292']); // ネームプリントあり
const PRINT_OFF_VALUES = new Set(['289', '290']); // ネームプリントなし
const PRINT_BOTH_VALUES = new Set(['288']); // 両方選択可
// classcategory_id2 用に元<option>保存(#is_printが無い場合に使う)
let original2 = null;
if (select2 && select2 !== isPrint) {
original2 = Array.from(select2.options).map(o => ({ value: o.value, text: (o.text||'').trim() }));
}
function applyRepurchaseVisibility() {
if (!repurchaseBlock) return;
if (isPrint) {
repurchaseBlock.style.display = (isPrint.value === '1') ? '' : 'none';
}
}
function setIsPrintMode(mode) {
// #is_print がある(今回の構成)場合
if (isPrint) {
isPrint.innerHTML = '';
if (mode === 'do') {
isPrint.add(new Option('ネームプリントする', '1'));
isPrint.value = '1';
} else if (mode === 'dont') {
isPrint.add(new Option('ネームプリントしない', '0'));
isPrint.value = '0';
} else if (mode === 'both') {
// ★ 両方出す
isPrint.add(new Option('ネームプリントしない', '0'));
isPrint.add(new Option('ネームプリントする', '1'));
// 初期は「しない」に寄せる(必要なら '1' に変更可)
isPrint.value = '0';
}
// 他のハンドラより後に発火させる
setTimeout(() => {
isPrint.dispatchEvent(new Event('change', { bubbles: true }));
applyRepurchaseVisibility();
}, 0);
return;
}
// #is_print が無く、classcategory_id2 を使っている場合(参考)
if (select2 && original2) {
let list = [];
if (mode === 'do') list = original2.filter(o => o.text.includes('する'));
else if (mode === 'dont') list = original2.filter(o => o.text.includes('しない'));
else /* both */ list = original2.slice();
select2.innerHTML = '';
list.forEach(o => select2.add(new Option(o.text, o.value)));
select2.selectedIndex = list.length ? 0 : -1;
setTimeout(() => {
select2.dispatchEvent(new Event('change', { bubbles: true }));
}, 0);
if (repurchaseBlock) {
repurchaseBlock.style.display = (mode === 'do') ? '' : 'none';
}
}
}
function onFirstChanged() {
const v1 = select1.value;
if (!v1 || v1 === '__unselected') {
if (repurchaseBlock) repurchaseBlock.style.display = 'none';
return;
}
if (PRINT_BOTH_VALUES.has(v1)) {
setIsPrintMode('both'); // ★ 100冊以上~ は両方
} else if (PRINT_ON_VALUES.has(v1)) {
setIsPrintMode('do');
} else if (PRINT_OFF_VALUES.has(v1)) {
setIsPrintMode('dont');
} else {
setIsPrintMode('dont');
}
}
if (isPrint) {
isPrint.addEventListener('change', applyRepurchaseVisibility);
}
function updateIsPrintOptions(mode) {
const isPrint = document.getElementById('is_print');
const repurchaseBlock = document.querySelector('.form-is_repurchase');
if (!isPrint) return;
// 一旦 option 全削除
isPrint.innerHTML = '';
if (mode === 'do') {
isPrint.add(new Option('ネームプリントする', '1'));
isPrint.value = '1';
} else if (mode === 'dont') {
isPrint.add(new Option('ネームプリントしない', '0'));
isPrint.value = '0';
} else {
isPrint.add(new Option('ネームプリントしない', '0'));
isPrint.add(new Option('ネームプリントする', '1'));
isPrint.value = '0';
}
// ネームプリント「する」なら再版選択を表示
if (repurchaseBlock) {
repurchaseBlock.style.display = (isPrint.value === '1') ? '' : 'none';
}
// イベント発火で数量 UI 切り替えなど反映
isPrint.dispatchEvent(new Event('change', { bubbles: true }));
}
select1.addEventListener('change', onFirstChanged);
onFirstChanged(); // 初期反映
});
</script>
<script>
document.addEventListener('DOMContentLoaded', function () {
const el1 = document.getElementById('classcategory_id1') || document.querySelector('select[name=\"classcategory_id1\"]');
const el2 = document.getElementById('classcategory_id2') || document.querySelector('select[name=\"classcategory_id2\"]');
const out = document.getElementById('delivery-duration-text');
// 発送目安マップ
const deliveryMap = {};
";
// line 596
$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.', 596, $this->source); })()), "ProductClasses", [], "any", false, false, false, 596));
foreach ($context['_seq'] as $context["_key"] => $context["pc"]) {
// line 597
echo " ";
$context["c1"] = ((twig_get_attribute($this->env, $this->source, $context["pc"], "ClassCategory1", [], "any", false, false, false, 597)) ? (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["pc"], "ClassCategory1", [], "any", false, false, false, 597), "id", [], "any", false, false, false, 597)) : (""));
// line 598
echo " ";
$context["c2"] = ((twig_get_attribute($this->env, $this->source, $context["pc"], "ClassCategory2", [], "any", false, false, false, 598)) ? (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["pc"], "ClassCategory2", [], "any", false, false, false, 598), "id", [], "any", false, false, false, 598)) : (""));
// line 599
echo " ";
$context["label"] = ((twig_get_attribute($this->env, $this->source, $context["pc"], "DeliveryDuration", [], "any", false, false, false, 599)) ? (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["pc"], "DeliveryDuration", [], "any", false, false, false, 599), "name", [], "any", false, false, false, 599)) : (""));
// line 600
echo " ";
if (twig_get_attribute($this->env, $this->source, $context["pc"], "ClassCategory2", [], "any", false, false, false, 600)) {
// line 601
echo " deliveryMap['";
echo twig_escape_filter($this->env, (isset($context["c1"]) || array_key_exists("c1", $context) ? $context["c1"] : (function () { throw new RuntimeError('Variable "c1" does not exist.', 601, $this->source); })()), "html", null, true);
echo "'] = deliveryMap['";
echo twig_escape_filter($this->env, (isset($context["c1"]) || array_key_exists("c1", $context) ? $context["c1"] : (function () { throw new RuntimeError('Variable "c1" does not exist.', 601, $this->source); })()), "html", null, true);
echo "'] || {};
deliveryMap['";
// line 602
echo twig_escape_filter($this->env, (isset($context["c1"]) || array_key_exists("c1", $context) ? $context["c1"] : (function () { throw new RuntimeError('Variable "c1" does not exist.', 602, $this->source); })()), "html", null, true);
echo "']['";
echo twig_escape_filter($this->env, (isset($context["c2"]) || array_key_exists("c2", $context) ? $context["c2"] : (function () { throw new RuntimeError('Variable "c2" does not exist.', 602, $this->source); })()), "html", null, true);
echo "'] = '";
echo twig_escape_filter($this->env, twig_escape_filter($this->env, (isset($context["label"]) || array_key_exists("label", $context) ? $context["label"] : (function () { throw new RuntimeError('Variable "label" does not exist.', 602, $this->source); })()), "js"), "html", null, true);
echo "';
";
} else {
// line 604
echo " deliveryMap['";
echo twig_escape_filter($this->env, (isset($context["c1"]) || array_key_exists("c1", $context) ? $context["c1"] : (function () { throw new RuntimeError('Variable "c1" does not exist.', 604, $this->source); })()), "html", null, true);
echo "'] = '";
echo twig_escape_filter($this->env, twig_escape_filter($this->env, (isset($context["label"]) || array_key_exists("label", $context) ? $context["label"] : (function () { throw new RuntimeError('Variable "label" does not exist.', 604, $this->source); })()), "js"), "html", null, true);
echo "';
";
}
// line 606
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['pc'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 607
echo "
function updateDelivery() {
if (!el1 || !out) return;
const v1 = el1.value;
if (!v1 || v1 === '__unselected') {
out.textContent = '';
return;
}
let label = '';
if (el2 && el2.value && el2.value !== '__unselected') {
if (deliveryMap[v1] && typeof deliveryMap[v1] === 'object') {
label = deliveryMap[v1][el2.value] || '';
}
} else {
label = (typeof deliveryMap[v1] === 'string') ? deliveryMap[v1] : '';
}
out.textContent = label || '';
}
if (el1) el1.addEventListener('change', updateDelivery);
if (el2) el2.addEventListener('change', updateDelivery);
updateDelivery(); // 初期表示
});
</script>
<script>
document.addEventListener('DOMContentLoaded', function () {
const form = document.querySelector('#form1');
const select1 = document.getElementById('classcategory_id1');
const qtySelector = 'select[name=\"quantity\"], input[name=\"quantity\"]';
function getQtyEl() {
return document.querySelector(qtySelector);
}
function getFixedQty(v1) {
if (v1 === '291' || v1 === '289') return '50';
if (v1 === '292' || v1 === '290') return '90';
return null;
}
function enforceQuantity(showAlert = false) {
const selected = select1?.value;
const qtyEl = getQtyEl();
const fixed = getFixedQty(selected);
if (!selected || !qtyEl || !fixed) return;
if (qtyEl.value !== fixed) {
if (showAlert) alert(`この規格では数量は\${fixed}個に固定されています。`);
qtyEl.value = fixed;
}
}
// 数量変更時に自動補正
document.addEventListener('change', function (e) {
if (e.target.matches(qtySelector) || e.target.id === 'classcategory_id1') {
enforceQuantity(false);
}
});
// フォーム送信時にも補正とアラート
if (form) {
form.addEventListener('submit', function () {
enforceQuantity(true);
});
}
});
</script>
<script>
document.addEventListener('DOMContentLoaded', function () {
const select1 = document.getElementById('classcategory_id1');
const form = document.querySelector('#form1');
function getQtyEl() {
return document.querySelector('select[name=\"quantity\"], input[name=\"quantity\"]');
}
function getFixedQty(v1) {
if (v1 === '291' || v1 === '289') return '50';
if (v1 === '292' || v1 === '290') return '90';
return null;
}
function enforceQuantity(showAlert = false) {
const selected = select1?.value;
const qtyEl = getQtyEl();
const fixed = getFixedQty(selected);
if (!selected || !qtyEl || !fixed) return;
if (qtyEl.value !== fixed) {
if (showAlert) alert(`この規格では数量は \${fixed} 個に固定されています。`);
qtyEl.value = fixed;
}
}
function attachQtyWatcher() {
const qtyEl = getQtyEl();
if (!qtyEl) return;
qtyEl.removeEventListener('change', qtyEl._handler || (() => {}));
qtyEl._handler = () => enforceQuantity(false);
qtyEl.addEventListener('change', qtyEl._handler);
}
// セレクト1が変わるたびに数量制御イベント再アタッチ
select1?.addEventListener('change', () => {
setTimeout(() => {
enforceQuantity(false);
attachQtyWatcher();
}, 100);
});
// is_print変更時もセレクトが入れ替わるため再アタッチ
const isPrint = document.getElementById('is_print');
isPrint?.addEventListener('change', () => {
setTimeout(() => {
enforceQuantity(false);
attachQtyWatcher();
}, 100);
});
// 最初の数量セレクトにも適用
setTimeout(() => {
enforceQuantity(false);
attachQtyWatcher();
}, 300);
// フォーム送信時チェック
form?.addEventListener('submit', function (e) {
enforceQuantity(true);
});
});
</script>
";
}
// line 741
echo "//カレンダー終わり
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 745
public function block_main($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(), "block", "main"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "main"));
// line 746
echo " <div class=\"ec-productRole\">
<div class=\"ec-grid2\">
<div class=\"ec-grid2__cell\">
<div class=\"ec-sliderItemRole\">
";
// line 751
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.', 751, $this->source); })()), "ProductCategories", [], "any", false, false, false, 751))) {
// line 752
echo " <div class=\"ec-productRole__category\">
<div>";
// line 753
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("関連カテゴリ"), "html", null, true);
echo "</div>
";
// line 754
$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.', 754, $this->source); })()), "ProductCategories", [], "any", false, false, false, 754));
foreach ($context['_seq'] as $context["_key"] => $context["ProductCategory"]) {
// line 755
echo " <ul>
<li>
";
// line 757
$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, 757), "path", [], "any", false, false, false, 757));
$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 758
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, 758), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Category"], "name", [], "any", false, false, false, 758), "html", null, true);
echo "</a>";
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, false, 758) == false)) {
// line 759
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 761
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 764
echo " </div>
";
}
// line 766
echo " </div>
<div class=\"ec-sliderItemRole\">
<div class=\"item_visual\">
";
// line 770
$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.', 770, $this->source); })()), "ProductImage", [], "any", false, false, false, 770));
$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 771
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, 771)) ? (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.', 771, $this->source); })()), "name", [], "any", false, false, false, 771), "html", null, true))) : (print ("")));
echo "\" width=\"550\" height=\"550\"";
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 771) > 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 773
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, 773)) ? (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.', 773, $this->source); })()), "name", [], "any", false, false, false, 773), "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 775
echo " </div>
<div class=\"item_nav\">
";
// line 777
$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.', 777, $this->source); })()), "ProductImage", [], "any", false, false, false, 777));
$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 778
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, 778), "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 780
echo " </div>
</div>
";
// line 782
$context["sampleTagIds"] = [0 => 8, 1 => 12];
// line 783
$context["hasSampleTag"] = false;
// line 784
$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.', 784, $this->source); })()), "ProductTag", [], "any", false, false, false, 784));
foreach ($context['_seq'] as $context["_key"] => $context["ProductTag"]) {
// line 785
echo " ";
if (twig_in_filter(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["ProductTag"], "Tag", [], "any", false, false, false, 785), "id", [], "any", false, false, false, 785), (isset($context["sampleTagIds"]) || array_key_exists("sampleTagIds", $context) ? $context["sampleTagIds"] : (function () { throw new RuntimeError('Variable "sampleTagIds" does not exist.', 785, $this->source); })()))) {
// line 786
echo " ";
$context["hasSampleTag"] = true;
// line 787
echo " ";
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ProductTag'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 789
echo "
";
// line 790
if ((isset($context["hasSampleTag"]) || array_key_exists("hasSampleTag", $context) ? $context["hasSampleTag"] : (function () { throw new RuntimeError('Variable "hasSampleTag" does not exist.', 790, $this->source); })())) {
// line 791
echo " <div class=\"ec-sliderItemRole\">
<p style=\"text-align: center;\">
<a class=\"ec-blockBtn--cancel\" href=\"/contact?product_id=";
// line 793
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.', 793, $this->source); })()), "id", [], "any", false, false, false, 793), "html", null, true);
echo "\" target=\"_blank\">サンプル請求</a>
</p>
</div>
<div class=\"ec-sliderItemRole\">
<p><b>【サンプルについて】</b><br>
<b><サンプル無料マークの商品について></b><br>
こちらのの商品は3点まで組み合わせ自由、無料で発送いたします。<br>
<b><サンプルレンタルOKマークの商品について></b><br>
こちらの商品は3点まで組み合わせ自由、貸出いたします。(※発送料は弊社負担ですが、ご返却送料はお客様ご負担となります。※サンプル到着後2週間以内にご返却ください。)</p><br>
<p>※在庫状況により、ご要望に添えない場合がございます。ご了承ください。</p>
</div>
";
}
// line 805
echo " </div>
<div class=\"ec-grid2__cell\">
<div class=\"ec-productRole__profile\">
";
// line 809
echo " <div class=\"ec-productRole__title\">
<h2 class=\"ec-headingTitle\">";
// line 810
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.', 810, $this->source); })()), "name", [], "any", false, false, false, 810), "html", null, true);
echo "</h2>
</div>
";
// line 813
echo " <ul class=\"ec-productRole__tags\">
";
// line 814
$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.', 814, $this->source); })()), "Tags", [], "any", false, false, false, 814));
foreach ($context['_seq'] as $context["_key"] => $context["Tag"]) {
// line 815
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, 815), "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 817
echo " </ul>
";
// line 819
echo " ";
// line 835
echo " ";
// line 836
echo " <div class=\"ec-productRole__price\">
";
// line 837
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.', 837, $this->source); })()), "hasProductClass", [], "any", false, false, false, 837)) {
// line 838
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.', 838, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 838) == 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.', 838, $this->source); })()), "getPrice02IncTaxMax", [], "any", false, false, false, 838))) {
// line 839
echo " <div class=\"ec-price\">
<span class=\"ec-price__price price02-default\">";
// line 840
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.', 840, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 840)), "html", null, true);
echo "</span>
<span class=\"ec-price__tax\">";
// line 841
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html", null, true);
echo "</span>
<span class=\"ec-price__price price_no_tax price_no_tax_first\">";
// line 843
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.', 843, $this->source); })()), "getPrice02Min", [], "any", false, false, false, 843)), "html", null, true);
echo "</span>
<span class=\"ec-price__tax price_no_tax\">";
// line 844
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税抜"), "html", null, true);
echo "</span>
</div>
";
} else {
// line 847
echo " <div class=\"ec-price\">
<span class=\"ec-price__price price02-default\">";
// line 848
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.', 848, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 848)), "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.', 848, $this->source); })()), "getPrice02IncTaxMax", [], "any", false, false, false, 848)), "html", null, true);
echo "</span>
<span class=\"ec-price__tax\">";
// line 849
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html", null, true);
echo "</span><br>
<span class=\"ec-price__price price_no_tax\">";
// line 851
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.', 851, $this->source); })()), "getPrice02Min", [], "any", false, false, false, 851)), "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.', 851, $this->source); })()), "getPrice02Max", [], "any", false, false, false, 851)), "html", null, true);
echo "</span>
<span class=\"ec-price__tax price_no_tax\">";
// line 852
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税抜"), "html", null, true);
echo "</span>
</div>
";
}
// line 855
echo " ";
} else {
// line 856
echo " <div class=\"ec-price\">
<span class=\"ec-price__price\">";
// line 857
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.', 857, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, false, 857)), "html", null, true);
echo "</span>
<span class=\"ec-price__tax\">";
// line 858
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html", null, true);
echo "</span>
<span class=\"ec-price__price price_no_tax price_no_tax_first\">";
// line 859
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.', 859, $this->source); })()), "getPrice02Min", [], "any", false, false, false, 859)), "html", null, true);
echo "</span>
<span class=\"ec-price__tax price_no_tax\">";
// line 860
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税抜"), "html", null, true);
echo "</span>
</div>
";
}
// line 863
echo " </div>
";
// line 865
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.', 865, $this->source); })()), "code_min", [], "any", false, false, false, 865))) {
// line 866
echo " <div class=\"ec-productRole__code\">
";
// line 867
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.', 867, $this->source); })()), "code_min", [], "any", false, false, false, 867), "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.', 867, $this->source); })()), "code_min", [], "any", false, false, false, 867) != 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.', 867, $this->source); })()), "code_max", [], "any", false, false, false, 867))) {
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.', 867, $this->source); })()), "code_max", [], "any", false, false, false, 867), "html", null, true);
}
echo "</span>
</div>
";
}
// line 870
echo " ";
if ( !(isset($context["is_calendar"]) || array_key_exists("is_calendar", $context) ? $context["is_calendar"] : (function () { throw new RuntimeError('Variable "is_calendar" does not exist.', 870, $this->source); })())) {
// line 871
echo " <div class=\"ec-productRole__code\">
";
// line 872
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("在庫"), "html", null, true);
echo ": <span class=\"product-stock-quantity-default\"></span>
</div>
";
}
// line 875
echo " ";
if ((isset($context["is_calendar"]) || array_key_exists("is_calendar", $context) ? $context["is_calendar"] : (function () { throw new RuntimeError('Variable "is_calendar" does not exist.', 875, $this->source); })())) {
// line 876
echo " <div class=\"ec-productRole__code\">
発送日目安:<span id=\"delivery-duration-text\"></span>
</div>
";
}
// line 880
echo " <br>
<div class=\"ec-productRole__description\">";
// line 881
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.', 881, $this->source); })()), "description_detail", [], "any", false, false, false, 881));
echo "
</div>
<form action=\"";
// line 884
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.', 884, $this->source); })()), "id", [], "any", false, false, false, 884)]), "html", null, true);
echo "\" method=\"post\" id=\"form1\" name=\"form1\">
";
// line 885
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.', 885, $this->source); })()), "stock_find", [], "any", false, false, false, 885)) {
// line 886
echo " <div class=\"ec-productRole__actions\">
";
// line 887
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id1", [], "any", true, true, false, 887)) {
// line 888
echo " <div class=\"ec-select\">
";
// line 889
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.', 889, $this->source); })()), "classcategory_id1", [], "any", false, false, false, 889), 'row', ["label" => false]);
echo "
";
// line 890
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.', 890, $this->source); })()), "classcategory_id1", [], "any", false, false, false, 890), 'errors');
echo "
</div>
";
// line 892
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id2", [], "any", true, true, false, 892)) {
// line 893
echo " <div class=\"ec-select\">
";
// line 894
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.', 894, $this->source); })()), "classcategory_id2", [], "any", false, false, false, 894), 'row', ["label" => false]);
echo "
";
// line 895
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.', 895, $this->source); })()), "classcategory_id2", [], "any", false, false, false, 895), 'errors');
echo "
</div>
";
}
// line 898
echo " ";
}
// line 899
echo "
";
// line 900
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.', 900, $this->source); })()), "product_print_type", [], "any", false, false, false, 900) == false)) {
// line 901
echo " ";
$context["colors"] = twig_split_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.', 901, $this->source); })()), "product_print_color", [], "any", false, false, false, 901), ",");
// line 902
echo " ";
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.', 902, $this->source); })()), "product_print_type", [], "any", false, false, false, 902) == false) && (twig_length_filter($this->env, (isset($context["colors"]) || array_key_exists("colors", $context) ? $context["colors"] : (function () { throw new RuntimeError('Variable "colors" does not exist.', 902, $this->source); })())) > 0))) {
// line 903
echo " <div class=\"row mb-2\">
<div class=\"col-4\">
<div class=\"ec-select\">
";
// line 906
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.', 906, $this->source); })()), "is_print", [], "any", false, false, false, 906), 'widget', ["attr" => ["style" => "min-width:unset", "id" => "is_print"]]);
echo "
";
// line 907
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.', 907, $this->source); })()), "is_print", [], "any", false, false, false, 907), 'errors');
echo "
</div>
</div>
<div class=\"col-6 form-is_repurchase\" style=\"display: none\">
<div class=\"form-check mt-2\">
";
// line 912
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.', 912, $this->source); })()), "is_repurchase", [], "any", false, false, false, 912), 'widget', ["label_attr" => ["class" => "radio-inline"]]);
echo "
";
// line 913
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.', 913, $this->source); })()), "is_repurchase", [], "any", false, false, false, 913), 'errors');
echo "
</div>
</div>
</div>
<div class=\"row form-product-color\" style=\"display: none\">
<div class=\"col-5\">
<div class=\"ec-select\">
<div class=\"mb-3\">
";
// line 921
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.', 921, $this->source); })()), "product_print_color", [], "any", false, false, false, 921), 'widget', ["attr" => ["style" => "min-width:unset"]]);
echo "
";
// line 922
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.', 922, $this->source); })()), "product_print_color", [], "any", false, false, false, 922), 'errors');
echo "
</div>
</div>
</div>
</div>
";
}
// line 928
echo " ";
}
// line 929
echo "
<div class=\"row\">
<div class=\"col-3\">
<div class=\"";
// line 932
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.', 932, $this->source); })()), "order_unit", [], "any", false, false, false, 932)) {
echo "ec-select";
} else {
echo "ec-numberInput";
}
echo " mt-2 group-input-qty\">
";
// line 933
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.', 933, $this->source); })()), "quantity", [], "any", false, false, false, 933), 'widget', ["attr" => ["style" => "min-width:unset;display: none;", "placeholder" => "数量"]]);
echo "
";
// line 935
echo " ";
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.', 935, $this->source); })()), "quantity", [], "any", false, false, false, 935), 'errors');
echo "
</div>
</div>
<div class=\"col-8\">
<button type=\"submit\" class=\"ec-blockBtn--action add-cart\">
";
// line 941
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに入れる"), "html", null, true);
echo "
</button>
</div>
</div>
</div>
";
} else {
// line 947
echo " <div class=\"ec-productRole__btn\">
<button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
";
// line 949
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ただいま品切れ中です。"), "html", null, true);
echo "
</button>
</div>
";
}
// line 953
echo "
";
// line 954
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.', 954, $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 959
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 960
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 class=\"ec-role\">
<span class=\"ec-inlineBtn--cancel\">";
// line 963
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お買い物を続ける"), "html", null, true);
echo "</span>
<a href=\"";
// line 964
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("cart");
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>
<div class=\"ec-productRole__SNS\">
<a href=\"https://twitter.com/share\" class=\"twitter-share-button\" data-via=\"lemanze\" data-lang=\"ja\" data-count=\"none\">ツイート</a>
<script>
!function(d,s,id){
var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';
if(!d.getElementById(id)){
js=d.createElement(s);
js.id=id;
js.src=p+'://platform.twitter.com/widgets.js';
fjs.parentNode.insertBefore(js,fjs);
}
}(document, 'script', 'twitter-wjs');
</script>
<div class=\"line-it-button\" data-lang=\"ja\" data-type=\"share-a\" data-env=\"REAL\" data-url=\"";
// line 985
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.', 985, $this->source); })()), "id", [], "any", false, false, false, 985)]), "html", null, true);
echo "\" data-color=\"default\" data-size=\"small\" data-count=\"true\" data-ver=\"3\" style=\"display: none;\"></div>
<script src=\"https://www.line-website.com/social-plugins/js/thirdparty/loader.min.js\" async=\"async\" defer=\"defer\"></script>
</div>
";
// line 989
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.', 989, $this->source); })()), "option_favorite_product", [], "any", false, false, false, 989)) {
// line 990
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.', 990, $this->source); })()), "id", [], "any", false, false, false, 990)]), "html", null, true);
echo "\" method=\"post\">
<div class=\"ec-productRole__btn\">
";
// line 992
if (((isset($context["is_favorite"]) || array_key_exists("is_favorite", $context) ? $context["is_favorite"] : (function () { throw new RuntimeError('Variable "is_favorite" does not exist.', 992, $this->source); })()) == false)) {
// line 993
echo " <button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel\">
";
// line 994
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お気に入りに追加"), "html", null, true);
echo "
</button>
";
} else {
// line 997
echo " <button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel\"
disabled=\"disabled\">";
// line 998
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お気に入りに追加済です。"), "html", null, true);
echo "
</button>
";
}
// line 1001
echo " </div>
</form>
";
}
// line 1004
echo " ";
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.', 1004, $this->source); })()), "freearea", [], "any", false, false, false, 1004)) {
// line 1005
echo " <div class=\"ec-productRole__description\">
";
// line 1006
echo twig_include($this->env, $context, twig_template_from_string($this->env, 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.', 1006, $this->source); })()), "freearea", [], "any", false, false, false, 1006))));
echo "
</div>
";
}
// line 1009
echo " </div>
</div>
</div>
</div>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "Product/detail.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 1718 => 1009, 1712 => 1006, 1709 => 1005, 1706 => 1004, 1701 => 1001, 1695 => 998, 1692 => 997, 1686 => 994, 1683 => 993, 1681 => 992, 1675 => 990, 1673 => 989, 1666 => 985, 1640 => 964, 1636 => 963, 1630 => 960, 1626 => 959, 1618 => 954, 1615 => 953, 1608 => 949, 1604 => 947, 1595 => 941, 1585 => 935, 1581 => 933, 1573 => 932, 1568 => 929, 1565 => 928, 1556 => 922, 1552 => 921, 1541 => 913, 1537 => 912, 1529 => 907, 1525 => 906, 1520 => 903, 1517 => 902, 1514 => 901, 1512 => 900, 1509 => 899, 1506 => 898, 1500 => 895, 1496 => 894, 1493 => 893, 1491 => 892, 1486 => 890, 1482 => 889, 1479 => 888, 1477 => 887, 1474 => 886, 1472 => 885, 1468 => 884, 1462 => 881, 1459 => 880, 1453 => 876, 1450 => 875, 1444 => 872, 1441 => 871, 1438 => 870, 1426 => 867, 1423 => 866, 1420 => 865, 1417 => 863, 1411 => 860, 1407 => 859, 1403 => 858, 1399 => 857, 1396 => 856, 1393 => 855, 1387 => 852, 1381 => 851, 1376 => 849, 1370 => 848, 1367 => 847, 1361 => 844, 1357 => 843, 1352 => 841, 1348 => 840, 1345 => 839, 1343 => 838, 1341 => 837, 1338 => 836, 1336 => 835, 1334 => 819, 1331 => 817, 1320 => 815, 1316 => 814, 1313 => 813, 1308 => 810, 1305 => 809, 1300 => 805, 1285 => 793, 1281 => 791, 1279 => 790, 1276 => 789, 1269 => 787, 1266 => 786, 1263 => 785, 1259 => 784, 1257 => 783, 1255 => 782, 1251 => 780, 1232 => 778, 1215 => 777, 1211 => 775, 1200 => 773, 1178 => 771, 1160 => 770, 1154 => 766, 1150 => 764, 1142 => 761, 1127 => 759, 1118 => 758, 1101 => 757, 1097 => 755, 1093 => 754, 1089 => 753, 1086 => 752, 1083 => 751, 1077 => 746, 1067 => 745, 1055 => 741, 918 => 607, 912 => 606, 904 => 604, 895 => 602, 888 => 601, 885 => 600, 882 => 599, 879 => 598, 876 => 597, 872 => 596, 727 => 453, 725 => 452, 722 => 451, 715 => 449, 712 => 448, 709 => 447, 705 => 446, 703 => 445, 696 => 440, 692 => 439, 688 => 438, 684 => 437, 680 => 435, 674 => 433, 672 => 432, 667 => 431, 664 => 430, 654 => 428, 640 => 426, 632 => 425, 614 => 424, 609 => 422, 588 => 403, 585 => 402, 581 => 400, 579 => 399, 576 => 398, 574 => 397, 564 => 389, 561 => 388, 557 => 386, 555 => 385, 552 => 384, 550 => 383, 543 => 379, 515 => 356, 502 => 348, 485 => 334, 475 => 327, 444 => 299, 439 => 297, 426 => 287, 418 => 281, 409 => 275, 405 => 273, 403 => 272, 400 => 271, 391 => 265, 387 => 263, 385 => 262, 376 => 258, 369 => 253, 365 => 251, 356 => 244, 354 => 243, 351 => 242, 334 => 227, 325 => 220, 323 => 219, 253 => 151, 246 => 149, 241 => 146, 239 => 145, 234 => 143, 231 => 142, 229 => 141, 206 => 121, 201 => 119, 198 => 118, 188 => 117, 88 => 16, 78 => 15, 67 => 11, 60 => 113, 58 => 112, 54 => 111, 52 => 110, 50 => 13, 37 => 11,);
}
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.
#}
{% extends 'default_frame.twig' %}
{% set body_class = 'product_page' %}
{% block stylesheet %}
<style>
.hidden{
display: none;
}
.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;
}
.price_no_tax{
color: black;
}
.price_no_tax_first{
margin-left: 30px;
}
.product_plate_type_print img{
width: unset;
}
.ec-productRole .ec-productRole__category{
border-bottom: unset;
}
</style>
{% endblock %}
{# --- この商品がカテゴリID=124か判定 --- #}
{% set is_calendar = false %}
{% for pc in Product.ProductCategories %}
{% if pc.Category.id == 124 %}
{% set is_calendar = true %}
{% endif %}
{% endfor %}
{% block javascript %}
<script>
var stocks = {{stocks|json_encode|raw}};
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);
}
var code = jQuery('.product-code-default').text();
if (Number(stocks[code]) < 0){
jQuery('.product-stock-quantity-default').html('<b>あり</b>');
}
if (stocks[code] != undefined && stocks[code] > 0){
jQuery('.product-stock-quantity-default').html(stocks[code]);
}else if (stocks[code] != undefined && stocks[code] == 0){
jQuery('.product-stock-quantity-default').html('<b>なし</b>');
}
{% if form.classcategory_id2 is defined %}
fnSetClassCategories(
\$('#form1'), {{ form.classcategory_id2.vars.value|json_encode|raw }}
);
{% elseif form.classcategory_id1 is defined %}
\$('input[name=\"classcategory_option\"]').on('change', function(e) {
\$('#classcategory_id1').val(\$(e.target).val()).change();
})
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() {
function htmlQty(type, printerUnit, orderUnit) {
var html = ``;
if(type === 1) {
{% if Product.printer_unit %}
html += `<select id=\"quantity\" name=\"quantity\" style=\"min-width:unset;\" placeholder=\"数量\" class=\"form-select\">`;
html += `<option value=\"\" selected=\"selected\">数量</option>`;
for(let i = 1; i < 31; i++) {
html += `<option value=\"\${ i*printerUnit }\">\${ i*printerUnit }</option>`;
}
html += `</select>`;
{% else %}
if(orderUnit > 0) {
if(printerUnit === 0) {
printerUnit = orderUnit;
}
html += `<select id=\"quantity\" name=\"quantity\" style=\"min-width:unset;\" placeholder=\"数量\" class=\"form-select\">`;
html += `<option value=\"\" selected=\"selected\">数量</option>`;
for(let i = 1; i < 31; i++) {
html += `<option value=\"\${ i*printerUnit }\">\${ i*printerUnit }</option>`;
}
html += `</select>`;
} else {
html += `<input type=\"number\" id=\"quantity\" name=\"quantity\" required=\"required\" min=\"1\" maxlength=\"9\" style=\"min-width:unset; display: block !important;\" placeholder=\"数量\" class=\"form-control\" value=\"1\">`;
}
{% endif %}
} else {
{% if Product.order_unit %}
html += `<select id=\"quantity\" name=\"quantity\" style=\"min-width:unset;\" placeholder=\"数量\" class=\"form-select\">`;
html += `<option value=\"\" selected=\"selected\">数量</option>`;
for(let i = 1; i < 31; i++) {
html += `<option value=\"\${ i*orderUnit }\">\${ i*orderUnit }</option>`;
}
html += `</select>`;
{% else %}
html += `<input type=\"number\" id=\"quantity\" name=\"quantity\" required=\"required\" min=\"1\" maxlength=\"9\" style=\"min-width:unset; display: block !important;\" placeholder=\"数量\" class=\"form-control\" value=\"1\">`;
{% endif %}
}
return html;
}
\$(\".group-input-qty\").html('');
\$(\".group-input-qty\").append(htmlQty(0, {{ Product.printer_unit | default(0) }}, {{ Product.order_unit | default(0) }}));
\$('.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 %}
// 個数フォームのチェック
var isPrint = false;
if (\$('#is_print').val() == 1) {
isPrint = true;
if (!\$('#product_print_color').val()) {
\$('#product_print_color')[0].setCustomValidity('{{ 'ネームプリントの色を選択してください。'|trans }}');
return true;
} else {
\$('#product_print_color')[0].setCustomValidity('');
}
}
// 個数フォームのチェック
if (!\$('#quantity').val()) {
if (\$('#quantity').prop('nodeName') == 'SELECT') {
\$('#quantity')[0].setCustomValidity('{{ '数量を選択してください。'|trans }}');
} else {
\$('#quantity')[0].setCustomValidity('{{ '数量を入力してください。'|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で表示
\$.each(data.messages, function() {
\$('#ec-modal-header').html(this);
});
\$('.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);
});
});
\$(\"#is_print\").change(function(){
\$(\".group-input-qty\").html('');
if (\$(this).val() == 1) {
\$('.form-is_repurchase').css('display', 'block');
\$('.form-is_repurchase input:first').prop('checked', true);
\$('.form-product-color').css('display', 'block');
\$(\".group-input-qty\").append(htmlQty(1, {{ Product.printer_unit | default(0) }}, {{ Product.order_unit | default(0) }}));
// \$(\"#quantity\").attr('name', 'quantity').css('display', 'inline-block');
// \$(\"#quantity_raw\").attr('name', 'quantity_raw').css('display', 'none');
} else {
\$('.form-is_repurchase').css('display', 'none');
\$('.form-is_repurchase input').prop('checked', false);
\$('.form-product-color').css('display', 'none');
\$('.form-product-color select').val('');
\$(\".group-input-qty\").append(htmlQty(0, {{ Product.printer_unit | default(0) }}, {{ Product.order_unit | default(0) }}));
// \$(\"#quantity\").attr('name', 'quantity_raw').css('display', 'none');
// \$(\"#quantity_raw\").attr('name', 'quantity').css('display', 'inline-block');
}
});
});
\$('.ec-modal-wrap').on('click', function(e) {
// モーダル内の処理は外側にバブリングさせない
e.stopPropagation();
});
\$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
\$('.ec-modal').hide()
});
var nIndexClass = 1;
\$(\"#classcategory_id1 > option\").each(function(k, v) {
if(this.value != \"__unselected\") {
\$(v).attr('key', nIndexClass);
nIndexClass++;
}
});
var jsonQty = {{ Product.getAllStocks|json_encode|raw }}
var select_classcategory_id1 = 0;
\$('#classcategory_id1').on('change', function(e) {
if(this.selectedIndex < 1) return false;
{% if form.classcategory_id1 is defined %}
getClass(this.selectedIndex)
{% if form.classcategory_id2 is defined %}
select_classcategory_id1 = this.selectedIndex;
{% endif %}
{% endif %}
});
\$('#classcategory_id2').on('change', function(e) {
if(this.selectedIndex < 1) return false;
getClass(select_classcategory_id1, this.selectedIndex)
});
function getClass(class1, class2) {
var qty = '';
{% if form.classcategory_id1 is defined %}
qty = jsonQty[class1];
{% if form.classcategory_id2 is defined %}
qty = jsonQty[class1][class2];
{% endif %}
{% endif %}
if(qty == \"0\") {
\$('.ec-productRole__code span.product-stock-quantity-default').html(\"<b>なし</b>\");
} else if(!!qty === false){
\$('.ec-productRole__code span.product-stock-quantity-default').html(\"<b>あり</b>\");
}else {
qty = parseInt(qty);
\$('.ec-productRole__code span.product-stock-quantity-default').html(\"<b>\"+qty+\"</b>\");
}
}
// \$('#is_print').change(function() {
// window.location.href = window.location.href+'?is_print='+\$(this).val();
// });
</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>
{# --- この商品がカテゴリID=124か判定 --- #}
{% set is_calendar = false %}
{% for pc in Product.ProductCategories %}
{% if pc.Category.id == 124 %}
{% set is_calendar = true %}
{% endif %}
{% endfor %}
{% if is_calendar %}
<script>
document.addEventListener('DOMContentLoaded', function () {
// 規格1(数量パターン)
const select1 = document.getElementById('classcategory_id1')
|| document.querySelector('select[name=\"classcategory_id1\"]');
if (!select1) return;
// 規格2(優先: #is_print、なければ classcategory_id2)
const isPrint = document.getElementById('is_print'); // 0=しない, 1=する
const select2 = isPrint || document.getElementById('classcategory_id2')
|| document.querySelector('select[name=\"classcategory_id2\"]');
// 再版区分(表示/非表示を切り替え)
const repurchaseBlock = document.querySelector('.form-is_repurchase');
// ネームプリント切替連動(カレンダー)
const PRINT_ON_VALUES = new Set(['291', '292']); // ネームプリントあり
const PRINT_OFF_VALUES = new Set(['289', '290']); // ネームプリントなし
const PRINT_BOTH_VALUES = new Set(['288']); // 両方選択可
// classcategory_id2 用に元<option>保存(#is_printが無い場合に使う)
let original2 = null;
if (select2 && select2 !== isPrint) {
original2 = Array.from(select2.options).map(o => ({ value: o.value, text: (o.text||'').trim() }));
}
function applyRepurchaseVisibility() {
if (!repurchaseBlock) return;
if (isPrint) {
repurchaseBlock.style.display = (isPrint.value === '1') ? '' : 'none';
}
}
function setIsPrintMode(mode) {
// #is_print がある(今回の構成)場合
if (isPrint) {
isPrint.innerHTML = '';
if (mode === 'do') {
isPrint.add(new Option('ネームプリントする', '1'));
isPrint.value = '1';
} else if (mode === 'dont') {
isPrint.add(new Option('ネームプリントしない', '0'));
isPrint.value = '0';
} else if (mode === 'both') {
// ★ 両方出す
isPrint.add(new Option('ネームプリントしない', '0'));
isPrint.add(new Option('ネームプリントする', '1'));
// 初期は「しない」に寄せる(必要なら '1' に変更可)
isPrint.value = '0';
}
// 他のハンドラより後に発火させる
setTimeout(() => {
isPrint.dispatchEvent(new Event('change', { bubbles: true }));
applyRepurchaseVisibility();
}, 0);
return;
}
// #is_print が無く、classcategory_id2 を使っている場合(参考)
if (select2 && original2) {
let list = [];
if (mode === 'do') list = original2.filter(o => o.text.includes('する'));
else if (mode === 'dont') list = original2.filter(o => o.text.includes('しない'));
else /* both */ list = original2.slice();
select2.innerHTML = '';
list.forEach(o => select2.add(new Option(o.text, o.value)));
select2.selectedIndex = list.length ? 0 : -1;
setTimeout(() => {
select2.dispatchEvent(new Event('change', { bubbles: true }));
}, 0);
if (repurchaseBlock) {
repurchaseBlock.style.display = (mode === 'do') ? '' : 'none';
}
}
}
function onFirstChanged() {
const v1 = select1.value;
if (!v1 || v1 === '__unselected') {
if (repurchaseBlock) repurchaseBlock.style.display = 'none';
return;
}
if (PRINT_BOTH_VALUES.has(v1)) {
setIsPrintMode('both'); // ★ 100冊以上~ は両方
} else if (PRINT_ON_VALUES.has(v1)) {
setIsPrintMode('do');
} else if (PRINT_OFF_VALUES.has(v1)) {
setIsPrintMode('dont');
} else {
setIsPrintMode('dont');
}
}
if (isPrint) {
isPrint.addEventListener('change', applyRepurchaseVisibility);
}
function updateIsPrintOptions(mode) {
const isPrint = document.getElementById('is_print');
const repurchaseBlock = document.querySelector('.form-is_repurchase');
if (!isPrint) return;
// 一旦 option 全削除
isPrint.innerHTML = '';
if (mode === 'do') {
isPrint.add(new Option('ネームプリントする', '1'));
isPrint.value = '1';
} else if (mode === 'dont') {
isPrint.add(new Option('ネームプリントしない', '0'));
isPrint.value = '0';
} else {
isPrint.add(new Option('ネームプリントしない', '0'));
isPrint.add(new Option('ネームプリントする', '1'));
isPrint.value = '0';
}
// ネームプリント「する」なら再版選択を表示
if (repurchaseBlock) {
repurchaseBlock.style.display = (isPrint.value === '1') ? '' : 'none';
}
// イベント発火で数量 UI 切り替えなど反映
isPrint.dispatchEvent(new Event('change', { bubbles: true }));
}
select1.addEventListener('change', onFirstChanged);
onFirstChanged(); // 初期反映
});
</script>
<script>
document.addEventListener('DOMContentLoaded', function () {
const el1 = document.getElementById('classcategory_id1') || document.querySelector('select[name=\"classcategory_id1\"]');
const el2 = document.getElementById('classcategory_id2') || document.querySelector('select[name=\"classcategory_id2\"]');
const out = document.getElementById('delivery-duration-text');
// 発送目安マップ
const deliveryMap = {};
{% for pc in Product.ProductClasses %}
{% set c1 = pc.ClassCategory1 ? pc.ClassCategory1.id : '' %}
{% set c2 = pc.ClassCategory2 ? pc.ClassCategory2.id : '' %}
{% set label = pc.DeliveryDuration ? pc.DeliveryDuration.name : '' %}
{% if pc.ClassCategory2 %}
deliveryMap['{{ c1 }}'] = deliveryMap['{{ c1 }}'] || {};
deliveryMap['{{ c1 }}']['{{ c2 }}'] = '{{ label|e('js') }}';
{% else %}
deliveryMap['{{ c1 }}'] = '{{ label|e('js') }}';
{% endif %}
{% endfor %}
function updateDelivery() {
if (!el1 || !out) return;
const v1 = el1.value;
if (!v1 || v1 === '__unselected') {
out.textContent = '';
return;
}
let label = '';
if (el2 && el2.value && el2.value !== '__unselected') {
if (deliveryMap[v1] && typeof deliveryMap[v1] === 'object') {
label = deliveryMap[v1][el2.value] || '';
}
} else {
label = (typeof deliveryMap[v1] === 'string') ? deliveryMap[v1] : '';
}
out.textContent = label || '';
}
if (el1) el1.addEventListener('change', updateDelivery);
if (el2) el2.addEventListener('change', updateDelivery);
updateDelivery(); // 初期表示
});
</script>
<script>
document.addEventListener('DOMContentLoaded', function () {
const form = document.querySelector('#form1');
const select1 = document.getElementById('classcategory_id1');
const qtySelector = 'select[name=\"quantity\"], input[name=\"quantity\"]';
function getQtyEl() {
return document.querySelector(qtySelector);
}
function getFixedQty(v1) {
if (v1 === '291' || v1 === '289') return '50';
if (v1 === '292' || v1 === '290') return '90';
return null;
}
function enforceQuantity(showAlert = false) {
const selected = select1?.value;
const qtyEl = getQtyEl();
const fixed = getFixedQty(selected);
if (!selected || !qtyEl || !fixed) return;
if (qtyEl.value !== fixed) {
if (showAlert) alert(`この規格では数量は\${fixed}個に固定されています。`);
qtyEl.value = fixed;
}
}
// 数量変更時に自動補正
document.addEventListener('change', function (e) {
if (e.target.matches(qtySelector) || e.target.id === 'classcategory_id1') {
enforceQuantity(false);
}
});
// フォーム送信時にも補正とアラート
if (form) {
form.addEventListener('submit', function () {
enforceQuantity(true);
});
}
});
</script>
<script>
document.addEventListener('DOMContentLoaded', function () {
const select1 = document.getElementById('classcategory_id1');
const form = document.querySelector('#form1');
function getQtyEl() {
return document.querySelector('select[name=\"quantity\"], input[name=\"quantity\"]');
}
function getFixedQty(v1) {
if (v1 === '291' || v1 === '289') return '50';
if (v1 === '292' || v1 === '290') return '90';
return null;
}
function enforceQuantity(showAlert = false) {
const selected = select1?.value;
const qtyEl = getQtyEl();
const fixed = getFixedQty(selected);
if (!selected || !qtyEl || !fixed) return;
if (qtyEl.value !== fixed) {
if (showAlert) alert(`この規格では数量は \${fixed} 個に固定されています。`);
qtyEl.value = fixed;
}
}
function attachQtyWatcher() {
const qtyEl = getQtyEl();
if (!qtyEl) return;
qtyEl.removeEventListener('change', qtyEl._handler || (() => {}));
qtyEl._handler = () => enforceQuantity(false);
qtyEl.addEventListener('change', qtyEl._handler);
}
// セレクト1が変わるたびに数量制御イベント再アタッチ
select1?.addEventListener('change', () => {
setTimeout(() => {
enforceQuantity(false);
attachQtyWatcher();
}, 100);
});
// is_print変更時もセレクトが入れ替わるため再アタッチ
const isPrint = document.getElementById('is_print');
isPrint?.addEventListener('change', () => {
setTimeout(() => {
enforceQuantity(false);
attachQtyWatcher();
}, 100);
});
// 最初の数量セレクトにも適用
setTimeout(() => {
enforceQuantity(false);
attachQtyWatcher();
}, 300);
// フォーム送信時チェック
form?.addEventListener('submit', function (e) {
enforceQuantity(true);
});
});
</script>
{% endif %}//カレンダー終わり
{% endblock %}
{% block main %}
<div class=\"ec-productRole\">
<div class=\"ec-grid2\">
<div class=\"ec-grid2__cell\">
<div class=\"ec-sliderItemRole\">
{# 関連カテゴリ #}
{% 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>
<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>
{% set sampleTagIds = [8, 12] %}
{% set hasSampleTag = false %}
{% for ProductTag in Product.ProductTag %}
{% if ProductTag.Tag.id in sampleTagIds %}
{% set hasSampleTag = true %}
{% endif %}
{% endfor %}
{% if hasSampleTag %}
<div class=\"ec-sliderItemRole\">
<p style=\"text-align: center;\">
<a class=\"ec-blockBtn--cancel\" href=\"/contact?product_id={{ Product.id }}\" target=\"_blank\">サンプル請求</a>
</p>
</div>
<div class=\"ec-sliderItemRole\">
<p><b>【サンプルについて】</b><br>
<b><サンプル無料マークの商品について></b><br>
こちらのの商品は3点まで組み合わせ自由、無料で発送いたします。<br>
<b><サンプルレンタルOKマークの商品について></b><br>
こちらの商品は3点まで組み合わせ自由、貸出いたします。(※発送料は弊社負担ですが、ご返却送料はお客様ご負担となります。※サンプル到着後2週間以内にご返却ください。)</p><br>
<p>※在庫状況により、ご要望に添えない場合がございます。ご了承ください。</p>
</div>
{% endif %}
</div>
<div class=\"ec-grid2__cell\">
<div class=\"ec-productRole__profile\">
{# 商品名 #}
<div class=\"ec-productRole__title\">
<h2 class=\"ec-headingTitle\">{{ Product.name }}</h2>
</div>
{# タグ #}
<ul class=\"ec-productRole__tags\">
{% for Tag in Product.Tags %}
<li class=\"ec-productRole__tag tag_{{ Tag.id }}\">{{ Tag }}</li>
{% endfor %}
</ul>
{# 通常価格 #}
{#{% 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>
<span class=\"ec-price__price price_no_tax price_no_tax_first\">{{ Product.getPrice02Min|price }}</span>
<span class=\"ec-price__tax price_no_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><br>
<span class=\"ec-price__price price_no_tax\">{{ Product.getPrice02Min|price }} ~ {{ Product.getPrice02Max|price }}</span>
<span class=\"ec-price__tax price_no_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>
<span class=\"ec-price__price price_no_tax price_no_tax_first\">{{ Product.getPrice02Min|price }}</span>
<span class=\"ec-price__tax price_no_tax\">{{ '税抜'|trans }}</span>
</div>
{% endif %}
</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 %}
{% if not is_calendar %}
<div class=\"ec-productRole__code\">
{{ '在庫'|trans }}: <span class=\"product-stock-quantity-default\"></span>
</div>
{% endif %}
{% if is_calendar %}
<div class=\"ec-productRole__code\">
発送日目安:<span id=\"delivery-duration-text\"></span>
</div>
{% endif %}
<br>
<div class=\"ec-productRole__description\">{{ Product.description_detail|raw|nl2br }}
</div>
<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, {'label':false}) }}
{{ form_errors(form.classcategory_id1) }}
</div>
{% if form.classcategory_id2 is defined %}
<div class=\"ec-select\">
{{ form_row(form.classcategory_id2, {'label':false}) }}
{{ form_errors(form.classcategory_id2) }}
</div>
{% endif %}
{% endif %}
{% if Product.product_print_type == false %}
{% set colors = Product.product_print_color|split(',') %}
{% if Product.product_print_type == false and colors|length > 0 %}
<div class=\"row mb-2\">
<div class=\"col-4\">
<div class=\"ec-select\">
{{ form_widget(form.is_print, {'attr': {'style':'min-width:unset', 'id': 'is_print'}}) }}
{{ form_errors(form.is_print) }}
</div>
</div>
<div class=\"col-6 form-is_repurchase\" style=\"display: none\">
<div class=\"form-check mt-2\">
{{ form_widget(form.is_repurchase, {'label_attr': {'class': 'radio-inline'}}) }}
{{ form_errors(form.is_repurchase) }}
</div>
</div>
</div>
<div class=\"row form-product-color\" style=\"display: none\">
<div class=\"col-5\">
<div class=\"ec-select\">
<div class=\"mb-3\">
{{ form_widget(form.product_print_color, {'attr': {'style':'min-width:unset'}}) }}
{{ form_errors(form.product_print_color) }}
</div>
</div>
</div>
</div>
{% endif %}
{% endif %}
<div class=\"row\">
<div class=\"col-3\">
<div class=\"{% if Product.order_unit %}ec-select{% else %}ec-numberInput{% endif %} mt-2 group-input-qty\">
{{ form_widget(form.quantity, {'attr': {'style':'min-width:unset;display: none;', 'placeholder': '数量'}}) }}
{# {{ form_widget(form.quantity_raw, {'attr': {'style':'min-width: unset;display: none', 'placeholder': '数量'}}) }}#}
{{ form_errors(form.quantity) }}
</div>
</div>
<div class=\"col-8\">
<button type=\"submit\" class=\"ec-blockBtn--action add-cart\">
{{ 'カートに入れる'|trans }}
</button>
</div>
</div>
</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 class=\"ec-role\">
<span class=\"ec-inlineBtn--cancel\">{{ 'お買い物を続ける'|trans }}</span>
<a href=\"{{ url('cart') }}\" class=\"ec-inlineBtn--action\">{{ 'カートへ進む'|trans }}</a>
</div>
</div>
</div>
</div>
</div>
<div class=\"ec-productRole__SNS\">
<a href=\"https://twitter.com/share\" class=\"twitter-share-button\" data-via=\"lemanze\" data-lang=\"ja\" data-count=\"none\">ツイート</a>
<script>
!function(d,s,id){
var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';
if(!d.getElementById(id)){
js=d.createElement(s);
js.id=id;
js.src=p+'://platform.twitter.com/widgets.js';
fjs.parentNode.insertBefore(js,fjs);
}
}(document, 'script', 'twitter-wjs');
</script>
<div class=\"line-it-button\" data-lang=\"ja\" data-type=\"share-a\" data-env=\"REAL\" data-url=\"{{ url('product_detail', {'id': Product.id}) }}\" data-color=\"default\" data-size=\"small\" data-count=\"true\" data-ver=\"3\" style=\"display: none;\"></div>
<script src=\"https://www.line-website.com/social-plugins/js/thirdparty/loader.min.js\" async=\"async\" defer=\"defer\"></script>
</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>
</form>
{% endif %}
{% if Product.freearea %}
<div class=\"ec-productRole__description\">
{{ include(template_from_string(Product.freearea|raw|nl2br)) }}
</div>
{% endif %}
</div>
</div>
</div>
</div>
{% endblock %}
", "Product/detail.twig", "/virtual/adnet/public_html/lemanze.awe.jp/app/template/default/Product/detail.twig");
}
}