<?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_5c590d3b1215fdbafc7d493a1cf5eac1 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'],
];
$this->sandbox = $this->env->getExtension('\Twig\Extension\SandboxExtension');
$this->checkSecurity();
}
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 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>
.slick-slider {
margin-bottom: 30px;
}
.slick-dots {
position: absolute;
bottom: -45px;
display: block;
width: 100%;
padding: 0;
list-style: none;
text-align: center;
}
.slick-dots li {
position: relative;
display: inline-block;
width: 20px;
height: 20px;
margin: 0 5px;
padding: 0;
cursor: pointer;
}
.slick-dots li button {
font-size: 0;
line-height: 0;
display: block;
width: 20px;
height: 20px;
padding: 5px;
cursor: pointer;
color: transparent;
border: 0;
outline: none;
background: transparent;
}
.slick-dots li button:hover,
.slick-dots li button:focus {
outline: none;
}
.slick-dots li button:hover:before,
.slick-dots li button:focus:before {
opacity: 1;
}
.slick-dots li button:before {
content: \" \";
line-height: 20px;
position: absolute;
top: 0;
left: 0;
width: 12px;
height: 12px;
text-align: center;
opacity: .25;
background-color: black;
border-radius: 50%;
}
.slick-dots li.slick-active button:before {
opacity: .75;
background-color: black;
}
.slick-dots li button.thumbnail img {
width: 0;
height: 0;
}
</style>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 95
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 96
echo " <script>
eccube.classCategories = ";
// line 97
echo $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getClassCategoriesAsJson($this->sandbox->ensureToStringAllowed((isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 97, $this->source); })()), 97, $this->source));
echo ";
// 規格2に選択肢を割り当てる。
function fnSetClassCategories(form, classcat_id2_selected) {
var \$form = \$(form);
var product_id = \$form.find('input[name=product_id]').val();
var \$sele1 = \$form.find('select[name=classcategory_id1]');
var \$sele2 = \$form.find('select[name=classcategory_id2]');
eccube.setClassCategories(\$form, product_id, \$sele1, \$sele2, classcat_id2_selected);
}
";
// line 108
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id2", [], "any", true, true, true, 108)) {
// line 109
echo " fnSetClassCategories(
\$('#form1'), ";
// line 110
echo json_encode($this->sandbox->ensureToStringAllowed(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.', 110, $this->source); })()), "classcategory_id2", [], "any", false, false, true, 110), "vars", [], "any", false, false, true, 110), "value", [], "any", false, false, true, 110), 110, $this->source));
echo "
);
";
} elseif (twig_get_attribute($this->env, $this->source, // line 112
($context["form"] ?? null), "classcategory_id1", [], "any", true, true, true, 112)) {
// line 113
echo " eccube.checkStock(\$('#form1'), ";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 113, $this->source); })()), "id", [], "any", false, false, true, 113), 113, $this->source), "html", null, true);
echo ", ";
echo json_encode($this->sandbox->ensureToStringAllowed(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.', 113, $this->source); })()), "classcategory_id1", [], "any", false, false, true, 113), "vars", [], "any", false, false, true, 113), "value", [], "any", false, false, true, 113), 113, $this->source));
echo ", null);
";
}
// line 115
echo " </script>
<script>
\$(function() {
// bfcache無効化
\$(window).bind('pageshow', function(event) {
if (event.originalEvent.persisted) {
location.reload(true);
}
});
// Core Web Vital の Cumulative Layout Shift(CLS)対策のため
// img タグに width, height が付与されている.
// 630px 未満の画面サイズでは縦横比が壊れるための対策
// see https://github.com/EC-CUBE/ec-cube/pull/5023
\$('.ec-grid2__cell').hide();
var removeSize = function () {
\$('.slide-item').height('');
\$('.slide-item img')
.removeAttr('width')
.removeAttr('height')
.removeAttr('style');
};
var slickInitial = function(slick) {
\$('.ec-grid2__cell').fadeIn(1500);
var baseHeight = \$(slick.target).height();
var baseWidth = \$(slick.target).width();
var rate = baseWidth / baseHeight;
\$('.slide-item').height(baseHeight * rate); // 余白を削除する
// transform を使用することでCLSの影響を受けないようにする
\$('.slide-item img')
.css(
{
'transform-origin': 'top left',
'transform': 'scaleY(' + rate + ')',
'transition': 'transform .1s'
}
);
// 正しいサイズに近くなったら属性を解除する
setTimeout(removeSize, 500);
};
\$('.item_visual').on('init', slickInitial);
// リサイズ時は CLS の影響を受けないため属性を解除する
\$(window).resize(removeSize);
\$('.item_visual').slick({
dots: false,
arrows: false,
responsive: [{
breakpoint: 768,
settings: {
dots: true
}
}]
});
\$('.slideThumb').on('click', function() {
var index = \$(this).attr('data-index');
\$('.item_visual').slick('slickGoTo', index, false);
})
});
</script>
<script>
\$(function() {
\$('.add-cart').on('click', function(event) {
// 入力チェックここから
if(\$(this).hasClass('add-cart_left') || \$(this).hasClass('add-cart_set') || \$(this).hasClass('add-cart_no_type')) {
var data_0_classcategory_id1 = document.getElementById(\"form_data_0_classcategory_id1\");
if (data_0_classcategory_id1 === null) {
} else {
// 規格1フォームの必須チェック
if (\$('#form_data_0_classcategory_id1').val() == '__unselected' || \$('#form_data_0_classcategory_id1').val() == '') {
\$('#form_data_0_classcategory_id1')[0].setCustomValidity('";
// line 186
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("項目が選択されていません"), "html", null, true);
echo "');
return true;
} else {
\$('#form_data_0_classcategory_id1')[0].setCustomValidity('');
}
}
var data_0_classcategory_id2 = document.getElementById(\"form_data_0_classcategory_id2\");
if (data_0_classcategory_id2 === null) {
} else {
// 規格2フォームの必須チェック
if (\$('#form_data_0_classcategory_id2').val() == '__unselected' || \$('#form_data_0_classcategory_id2').val() == '') {
\$('#form_data_0_classcategory_id2')[0].setCustomValidity('";
// line 197
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("項目が選択されていません"), "html", null, true);
echo "');
return true;
} else {
\$('#form_data_0_classcategory_id2')[0].setCustomValidity('');
}
}
// サイズの入力チェックは結婚指輪・婚約指輪の場合のみ
var category=0;
";
// line 205
$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.', 205, $this->source); })()), "ProductCategories", [], "any", false, false, true, 205));
foreach ($context['_seq'] as $context["_key"] => $context["ProductCategory"]) {
// line 206
echo " ";
if ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["ProductCategory"], "Category", [], "any", false, false, true, 206), "id", [], "any", false, false, true, 206) == 1)) {
// line 207
echo " // 結婚指輪
category = 1;
";
} elseif ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 209
$context["ProductCategory"], "Category", [], "any", false, false, true, 209), "id", [], "any", false, false, true, 209) == 2)) {
// line 210
echo " // 婚約指輪
category = 2;
";
}
// line 213
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ProductCategory'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 214
echo " if (category == 1 || category == 2) {
var form_data_0_size = document.getElementById(\"form_data_0_size\");
if (form_data_0_size === null) {
} else {
// サイズ フォームの必須チェック
if (\$('#form_data_0_size').val() == '__unselected' || \$('#form_data_0_size').val() == '') {
\$('#form_data_0_size')[0].setCustomValidity('";
// line 220
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("項目が選択されていません"), "html", null, true);
echo "');
return true;
} else {
\$('#form_data_0_size')[0].setCustomValidity('');
}
}
}
}
if(\$(this).hasClass('add-cart_right') || \$(this).hasClass('add-cart_set')) {
var data_1_classcategory_id1 = document.getElementById(\"form_data_1_classcategory_id1\");
if (data_1_classcategory_id1 === null) {
} else {
// 規格1フォームの必須チェック
if (\$('#form_data_1_classcategory_id1').val() == '__unselected' || \$('#form_data_1_classcategory_id1').val() == '') {
\$('#form_data_1_classcategory_id1')[0].setCustomValidity('";
// line 235
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("項目が選択されていません"), "html", null, true);
echo "');
if (\$(this).hasClass('add-cart_right')) {
\$('#form_data_0_classcategory_id1')[0].setCustomValidity('');
\$('#form_data_0_classcategory_id2')[0].setCustomValidity('');
\$('#form_data_0_size')[0].setCustomValidity('');
}
return true;
} else {
\$('#form_data_1_classcategory_id1')[0].setCustomValidity('');
}
}
var data_1_classcategory_id2 = document.getElementById(\"form_data_1_classcategory_id2\");
if (data_1_classcategory_id2 === null) {
} else {
// 規格2フォームの必須チェック
if (\$('#form_data_1_classcategory_id2').val() == '__unselected' || \$('#form_data_1_classcategory_id2').val() == '') {
\$('#form_data_1_classcategory_id2')[0].setCustomValidity('";
// line 251
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("項目が選択されていません"), "html", null, true);
echo "');
if (\$(this).hasClass('add-cart_right')) {
\$('#form_data_0_classcategory_id2')[0].setCustomValidity('');
\$('#form_data_0_size')[0].setCustomValidity('');
}
return true;
} else {
\$('#form_data_1_classcategory_id2')[0].setCustomValidity('');
}
}
var form_data_1_size = document.getElementById(\"form_data_1_size\");
if (form_data_1_size === null) {
} else {
// サイズ フォームの必須チェック
if (\$('#form_data_1_size').val() == '__unselected' || \$('#form_data_1_size').val() == '') {
\$('#form_data_1_size')[0].setCustomValidity('";
// line 266
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("項目が選択されていません"), "html", null, true);
echo "');
if (\$(this).hasClass('add-cart_right')) {
\$('#form_data_0_size')[0].setCustomValidity('');
}
return true;
} else {
\$('#form_data_1_size')[0].setCustomValidity('');
}
}
}
if(\$(this).hasClass('add-cart_left')) {
document.getElementById(\"form1\").action = \"";
// line 278
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_addmulti_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.', 278, $this->source); })()), "id", [], "any", false, false, true, 278), "type" => "left"]), "html", null, true);
echo "\";
} else if(\$(this).hasClass('add-cart_right')) {
document.getElementById(\"form1\").action = \"";
// line 280
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_addmulti_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.', 280, $this->source); })()), "id", [], "any", false, false, true, 280), "type" => "right"]), "html", null, true);
echo "\";
} else if(\$(this).hasClass('add-cart_set')) {
document.getElementById(\"form1\").action = \"";
// line 282
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_addmulti_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.', 282, $this->source); })()), "id", [], "any", false, false, true, 282), "type" => "set"]), "html", null, true);
echo "\";
}
// 入力チェックここまで
";
// line 286
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id1", [], "any", true, true, true, 286)) {
// line 287
echo " // 規格1フォームの必須チェック
if (\$('#classcategory_id1').val() == '__unselected' || \$('#classcategory_id1').val() == '') {
\$('#classcategory_id1')[0].setCustomValidity('";
// line 289
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 295
echo "
";
// line 296
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id2", [], "any", true, true, true, 296)) {
// line 297
echo " // 規格2フォームの必須チェック
if (\$('#classcategory_id2').val() == '__unselected' || \$('#classcategory_id2').val() == '') {
\$('#classcategory_id2')[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 {
\$('#classcategory_id2')[0].setCustomValidity('');
}
";
}
// line 305
echo "
// 個数フォームのチェック
/*
if (\$('#quantity').val() < 1) {
\$('#quantity')[0].setCustomValidity('";
// line 309
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("1以上で入力してください。"), "html", null, true);
echo "');
return true;
} else {
\$('#quantity')[0].setCustomValidity('');
}
*/
event.preventDefault();
\$form = \$('#form1');
\$.ajax({
url: \$form.attr('action'),
type: \$form.attr('method'),
data: \$form.serialize(),
dataType: 'json',
beforeSend: function(xhr, settings) {
// Buttonを無効にする
\$('.add-cart').prop('disabled', true);
}
}).done(function(data) {
// レスポンス内のメッセージをalertで表示
\$.each(data.messages, function() {
\$('#ec-modal-header').text(this);
});
\$('.ec-modal').show()
// カートブロックを更新する
\$.ajax({
url: \"";
// line 337
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(XMLHttpRequest, textStatus, errorThrown) {
console.log(\"XMLHttpRequest : \" + XMLHttpRequest.status);
console.log(\"textStatus : \" + textStatus);
console.log(\"errorThrown : \" + errorThrown.message);
alert('";
// line 347
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへの追加に失敗しました。"), "html", null, true);
echo "');
}).always(function(data) {
// Buttonを有効にする
\$('.add-cart').prop('disabled', false);
});
});
});
\$('.ec-modal-wrap').on('click', function(e) {
// モーダル内の処理は外側にバブリングさせない
e.stopPropagation();
});
\$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
\$('.ec-modal').hide()
});
</script>
<script type=\"application/ld+json\">
{
\"@context\": \"https://schema.org/\",
\"@type\": \"Product\",
\"name\": \"";
// line 367
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 367, $this->source); })()), "name", [], "any", false, false, true, 367), 367, $this->source), "html", null, true);
echo "\",
\"image\": [
";
// line 369
$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.', 369, $this->source); })()), "ProductImage", [], "any", false, false, true, 369));
$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 370
echo " \"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(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.', 370, $this->source); })()), "request", [], "any", false, false, true, 370), "schemeAndHttpHost", [], "any", false, false, true, 370), 370, $this->source), "html", null, true);
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->sandbox->ensureToStringAllowed($context["img"], 370, $this->source), "save_image"), "html", null, true);
echo "\"";
if ( !twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, true, 370)) {
echo ",";
}
// line 371
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 373
echo " \"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(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.', 373, $this->source); })()), "request", [], "any", false, false, true, 373), "schemeAndHttpHost", [], "any", false, false, true, 373), 373, $this->source), "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 375
echo " ],
// description_list 使わない 2024.10 \"description\": \"";
// line 376
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, true, 376)) ? (_twig_default_filter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, ($context["Product"] ?? null), "description_list", [], "any", false, false, true, 376), 376, $this->source), $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 376, $this->source); })()), "description_detail", [], "any", false, false, true, 376), 376, $this->source))) : (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.', 376, $this->source); })()), "description_detail", [], "any", false, false, true, 376))), ["
" => "", "
" => ""]), 0, 300), "html", null, true);
echo "\",
\"description\": \"";
// line 377
echo twig_escape_filter($this->env, twig_slice($this->env, twig_replace_filter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 377, $this->source); })()), "description_detail", [], "any", false, false, true, 377), 377, $this->source), ["
" => "", "
" => ""]), 0, 300), "html", null, true);
echo "\",
";
// line 378
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.', 378, $this->source); })()), "code_min", [], "any", false, false, true, 378)) {
// line 379
echo " \"sku\": \"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 379, $this->source); })()), "code_min", [], "any", false, false, true, 379), 379, $this->source), "html", null, true);
echo "\",
";
}
// line 381
echo " \"offers\": {
\"@type\": \"Offer\",
\"url\": \"";
// line 383
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.', 383, $this->source); })()), "id", [], "any", false, false, true, 383)]), "html", null, true);
echo "\",
\"priceCurrency\": \"";
// line 384
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(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.', 384, $this->source); })()), "currency", [], "any", false, false, true, 384), 384, $this->source), "html", null, true);
echo "\",
\"price\": ";
// line 385
((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.', 385, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, true, 385)) ? (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.', 385, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, true, 385), "html", null, true))) : (print (0)));
echo ",
\"availability\": \"";
// line 386
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.', 386, $this->source); })()), "stock_find", [], "any", false, false, true, 386)) ? ("InStock") : ("OutOfStock"));
echo "\"
}
}
</script>
<script>
var localfavo = localStorage.getItem('favo');
if(localfavo) {
var lsfavo = JSON.parse(localfavo);
if (lsfavo.length) {
console.log(lsfavo);
for (i=0;i<lsfavo.length;i++) {
if(lsfavo[i][0] == ";
// line 397
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 397, $this->source); })()), "id", [], "any", false, false, true, 397), 397, $this->source), "html", null, true);
echo ") {
//\$(\"#favorite_local\").removeAttr(\"onclick\");
//\$(\"#favorite_local\").prop('disabled', true);
\$(\"#favorite_local\").addClass(\"registered\");
\$(\"#favorite_local\").html(\"お気に入りに追加済みです\");
}
}
}
}
</script>
<script>
\$(function() {
//\$('.js_form_add').on('click', function(e) {
//e.preventDefault
var category=0;
";
// line 412
$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.', 412, $this->source); })()), "ProductCategories", [], "any", false, false, true, 412));
foreach ($context['_seq'] as $context["_key"] => $context["ProductCategory"]) {
// line 413
echo " ";
if ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["ProductCategory"], "Category", [], "any", false, false, true, 413), "id", [], "any", false, false, true, 413) == 1)) {
// line 414
echo " // 結婚指輪
category = 1;
";
} elseif ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 416
$context["ProductCategory"], "Category", [], "any", false, false, true, 416), "id", [], "any", false, false, true, 416) == 2)) {
// line 417
echo " // 婚約指輪
category = 2;
";
}
// line 420
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ProductCategory'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 421
echo " // 結婚指輪は規格1がタイプ、規格2が素材
// 婚約指輪は規格1が素材、規格2がカラット数
for (let i = 0; i < 2; i++){
// Get the data-prototype explained earlier
var prototype = \$('.product-class-item').data('prototype');
// get the new index
var index = \$('.product-class-item').data('index');
// Replace '__name__' in the prototype's HTML to
// instead be a number based on how many items we have
var newForm = '';
if (index == 0) {
if(category == 1) {
newForm += '<div class=\"category1 left_option\"><p class=\"fw-bold\">左のリング:<span class=\"ps-3 fs-3 text-danger fw-normal left_price\"></span></p>';
} else if (category == 2) {
";
// line 435
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.', 435, $this->source); })()), "id", [], "any", false, false, true, 435) == 119)) {
// line 436
echo " newForm += '<div class=\"category2\"><p class=\"mb-3\"><span class=\"fs-3 text-danger ring_price\"></p>';
";
} else {
// line 438
echo " newForm += '<div class=\"category2\"><p class=\"mb-3\"><span class=\"fs-3 text-danger ring_price\"></p><p>まず素材を選択してください。<br>素材を選択するとダイヤモンドの選択肢が表示されます。</p>';
";
}
// line 440
echo " } else {
newForm += '<div class=\"category0\"><p class=\"mb-3\"><span class=\"fs-3 text-danger ring_price\"></p>';
}
} else {
if(category == 1) {
newForm += '<div class=\"category1 right_option\"><p class=\"fw-bold\">右のリング:<span class=\"ps-3 fs-3 text-danger fw-normal right_price\"></span></p>';
} else if (category == 2) {
newForm += '<div class=\"category2\">';
} else {
newForm += '<div class=\"category0\">';
}
}
newForm += prototype.replace(/__name__/g, index);
newForm += '</div>';
// increase the index with one for the next item
\$('.product-class-item').data('index', index + 1);
// Display the form in the page before the \"new\" link
//\$(this).before(newForm);
\$('.js_form_add').before(newForm);
}
if(category == 1) {
document.getElementById(\"form_data_0_classcategory_id1\").value = 1;
document.getElementById(\"form_data_1_classcategory_id1\").value = 2;
}
var data_0_classcategory_id1 = document.getElementById(\"form_data_0_classcategory_id1\");
if (data_0_classcategory_id1 === null) {
} else {
// 規格2に選択肢を割り当てる。
function fnSetClassCategories(form, classcat_id2_selected) {
var \$form = \$(form);
var product_id = \$form.find('input[name=product_id]').val();
var \$sele1 = \$form.find('#form_data_0_classcategory_id1');
var \$sele2 = \$form.find('#form_data_0_classcategory_id2');
eccube.setClassCategories(\$form, product_id, \$sele1, \$sele2, classcat_id2_selected);
}
var \$form = \$('#form1');
var \$sele2 = \$form.find('#form_data_0_classcategory_id2');
if (data_0_classcategory_id1 === null) {
} else {
";
// line 481
if (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "data", [], "any", false, true, true, 481), "vars", [], "any", false, true, true, 481), "prototype", [], "any", false, true, true, 481), "classcategory_id2", [], "any", true, true, true, 481)) {
// line 482
echo " fnSetClassCategories(
\$('#form1'), ";
// line 483
echo json_encode($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, 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.', 483, $this->source); })()), "data", [], "any", false, false, true, 483), "vars", [], "any", false, false, true, 483), "prototype", [], "any", false, false, true, 483), "classcategory_id2", [], "any", false, false, true, 483), "vars", [], "any", false, false, true, 483), "value", [], "any", false, false, true, 483), 483, $this->source));
echo "
);
";
} elseif (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 485
($context["form"] ?? null), "data", [], "any", false, true, true, 485), "vars", [], "any", false, true, true, 485), "prototype", [], "any", false, true, true, 485), "classcategory_id1", [], "any", true, true, true, 485)) {
// line 486
echo " eccube.checkStock(\$('#form1'), ";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 486, $this->source); })()), "id", [], "any", false, false, true, 486), 486, $this->source), "html", null, true);
echo ", ";
echo json_encode($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, 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.', 486, $this->source); })()), "data", [], "any", false, false, true, 486), "vars", [], "any", false, false, true, 486), "prototype", [], "any", false, false, true, 486), "classcategory_id1", [], "any", false, false, true, 486), "vars", [], "any", false, false, true, 486), "value", [], "any", false, false, true, 486), 486, $this->source));
echo ", null);
";
}
// line 488
echo " }
}
var data_1_classcategory_id1 = document.getElementById(\"form_data_1_classcategory_id1\");
if (data_1_classcategory_id1 === null) {
} else {
// 規格2に選択肢を割り当てる。
function fnSetClassCategories(form, classcat_id2_selected) {
var \$form = \$(form);
var product_id = \$form.find('input[name=product_id]').val();
var \$sele1 = \$form.find('#form_data_1_classcategory_id1');
var \$sele2 = \$form.find('#form_data_1_classcategory_id2');
eccube.setClassCategories(\$form, product_id, \$sele1, \$sele2, classcat_id2_selected);
}
var \$form = \$('#form1');
var \$sele2 = \$form.find('#form_data_1_classcategory_id2');
if (data_0_classcategory_id1 === null) {
} else {
";
// line 507
if (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "data", [], "any", false, true, true, 507), "vars", [], "any", false, true, true, 507), "prototype", [], "any", false, true, true, 507), "classcategory_id2", [], "any", true, true, true, 507)) {
// line 508
echo " fnSetClassCategories(
\$('#form1'), ";
// line 509
echo json_encode($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, 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.', 509, $this->source); })()), "data", [], "any", false, false, true, 509), "vars", [], "any", false, false, true, 509), "prototype", [], "any", false, false, true, 509), "classcategory_id2", [], "any", false, false, true, 509), "vars", [], "any", false, false, true, 509), "value", [], "any", false, false, true, 509), 509, $this->source));
echo "
);
";
} elseif (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 511
($context["form"] ?? null), "data", [], "any", false, true, true, 511), "vars", [], "any", false, true, true, 511), "prototype", [], "any", false, true, true, 511), "classcategory_id1", [], "any", true, true, true, 511)) {
// line 512
echo " eccube.checkStock(\$('#form1'), ";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 512, $this->source); })()), "id", [], "any", false, false, true, 512), 512, $this->source), "html", null, true);
echo ", ";
echo json_encode($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, 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.', 512, $this->source); })()), "data", [], "any", false, false, true, 512), "vars", [], "any", false, false, true, 512), "prototype", [], "any", false, false, true, 512), "classcategory_id1", [], "any", false, false, true, 512), "vars", [], "any", false, false, true, 512), "value", [], "any", false, false, true, 512), 512, $this->source));
echo ", null);
";
}
// line 514
echo " }
}
//});
";
// line 517
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.', 517, $this->source); })()), "hasProductClass", [], "any", false, false, true, 517)) {
// line 518
echo " if(category == 2) {
// 婚約指輪は2本同時購入はない
const element = document.getElementById('form_data_1');
element.remove();
}
";
} else {
// line 524
echo " // 規格なし
\$('#form1').addClass('no_product_class');
const element = document.getElementById('form_data_1');
element.remove();
";
}
// line 529
echo "
// 婚約指輪で素材が選択されたとき
if (category == 2) {
\$('#form_data_0_classcategory_id1').change(function() {
// 規格2に選択肢を割り当てる。
function fnSetClassCategories(form, classcat_id2_selected) {
var \$form = \$(form);
var product_id = \$form.find('input[name=product_id]').val();
var \$sele1 = \$form.find('#form_data_0_classcategory_id1');
var \$sele2 = \$form.find('#form_data_0_classcategory_id2');
eccube.setClassCategories(\$form, product_id, \$sele1, \$sele2, classcat_id2_selected);
}
var \$form = \$('#form1');
var \$sele2 = \$form.find('#form_data_1_classcategory_id2');
";
// line 544
if (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "data", [], "any", false, true, true, 544), "vars", [], "any", false, true, true, 544), "prototype", [], "any", false, true, true, 544), "classcategory_id2", [], "any", true, true, true, 544)) {
// line 545
echo " fnSetClassCategories(
\$('#form1'), ";
// line 546
echo json_encode($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, 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.', 546, $this->source); })()), "data", [], "any", false, false, true, 546), "vars", [], "any", false, false, true, 546), "prototype", [], "any", false, false, true, 546), "classcategory_id2", [], "any", false, false, true, 546), "vars", [], "any", false, false, true, 546), "value", [], "any", false, false, true, 546), 546, $this->source));
echo "
);
";
} elseif (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 548
($context["form"] ?? null), "data", [], "any", false, true, true, 548), "vars", [], "any", false, true, true, 548), "prototype", [], "any", false, true, true, 548), "classcategory_id1", [], "any", true, true, true, 548)) {
// line 549
echo " eccube.checkStock(\$('#form1'), ";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 549, $this->source); })()), "id", [], "any", false, false, true, 549), 549, $this->source), "html", null, true);
echo ", ";
echo json_encode($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, 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.', 549, $this->source); })()), "data", [], "any", false, false, true, 549), "vars", [], "any", false, false, true, 549), "prototype", [], "any", false, false, true, 549), "classcategory_id1", [], "any", false, false, true, 549), "vars", [], "any", false, false, true, 549), "value", [], "any", false, false, true, 549), 549, $this->source));
echo ", null);
";
}
// line 551
echo " });
}
// 選択肢と連動する価格の表示
";
// line 555
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.', 555, $this->source); })()), "hasProductClass", [], "any", false, false, true, 555)) {
// line 556
echo " if(category == 1) {
var default_left_price = \$('.ec-layoutRole__main').find('.price02-default_left').first();
var default_right_price = \$('.ec-layoutRole__main').find('.price02-default_right').first();
\$('.left_price').text(default_left_price.text());
\$('.right_price').text(default_right_price.text());
} else if(category == 2) {
var default_ring_price = \$('.ec-layoutRole__main').find('.price02-default_ring').first();
\$('.ring_price').text(default_ring_price.text());
}
";
} else {
// line 566
echo " // 規格なし
var default_ring_price = \$('.ec-layoutRole__main').find('.price02-default_ring').first();
\$('.ring_price').text(default_ring_price.text());
";
}
// line 570
echo "
// 結婚指輪・婚約指輪以外の場合
if(category != 1 && category != 2) {
\$('#form_data_0_size').parent().css('display','none'); // サイズ不要
}
// Android firefox 対策
if (navigator.userAgent.indexOf('Android') > 0) {
let main = document.getElementsByTagName('main')[0];
main.classList.add('Android');
}
});
</script>
<script>
\$(function() {
function changePrice(category, change_class, classcategory_id1, classcategory_id2, size, product_id) {
var price = '';
price = \$('#price_' + classcategory_id1 + '_' + classcategory_id2).text();
price = price * 1; //number
if (category == 1) { // 結婚指輪の場合のみサイズによる加算あり
if (size) {
if(size >= 16.5) {
price = price + 22000; // 割り増し(税込)
} else if(size >= 12.5) {
price = price + 11000; // 割り増し(税込)
}
}
} else if(category == 2) { // 婚約指輪の C110、C112の場合のみサイズによる加算あり
if (product_id == 110 || product_id == 112) {
if (size) {
if(size >= 16) {
price = price + 22000; // 割り増し(税込)
}
}
}
}
price = String(price).replace(/(\\d)(?=(\\d\\d\\d)+(?!\\d))/g, '\$1,');
\$(change_class).text(\"¥\" + price);
}
\$('.form-select').on('change', function(event) {
var category=0;
";
// line 612
$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.', 612, $this->source); })()), "ProductCategories", [], "any", false, false, true, 612));
foreach ($context['_seq'] as $context["_key"] => $context["ProductCategory"]) {
// line 613
echo " ";
if ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["ProductCategory"], "Category", [], "any", false, false, true, 613), "id", [], "any", false, false, true, 613) == 1)) {
// line 614
echo " category = 1; // 結婚指輪
";
} elseif ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 615
$context["ProductCategory"], "Category", [], "any", false, false, true, 615), "id", [], "any", false, false, true, 615) == 2)) {
// line 616
echo " category = 2; // 婚約指輪
";
}
// line 618
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ProductCategory'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 619
echo "
";
// line 620
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.', 620, $this->source); })()), "hasProductClass", [], "any", false, false, true, 620)) {
// line 621
echo " if (\$(this).attr(\"id\") == 'form_data_0_classcategory_id1') {
if (category == 1) {
changePrice(category, \".ring_price\", \$(this).val(), '', \$('#form_data_0_size').val(), ";
// line 623
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 623, $this->source); })()), "id", [], "any", false, false, true, 623), 623, $this->source), "html", null, true);
echo ");
} else if (category == 2) {
// 規格2の最安値(class_category2 = 19)を表示
changePrice(category, \".ring_price\", \$(this).val(), 19, '', ";
// line 626
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 626, $this->source); })()), "id", [], "any", false, false, true, 626), 626, $this->source), "html", null, true);
echo ");
}
} else if (\$(this).attr(\"id\") == 'form_data_0_classcategory_id2') {
if (category == 1) {
changePrice(category, \".left_price\", 1, \$(this).val(), \$('#form_data_0_size').val(), ";
// line 630
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 630, $this->source); })()), "id", [], "any", false, false, true, 630), 630, $this->source), "html", null, true);
echo ");
} else if (category == 2) {
changePrice(category, \".ring_price\", \$('#form_data_0_classcategory_id1').val(), \$(this).val(), \$('#form_data_0_size').val(), ";
// line 632
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 632, $this->source); })()), "id", [], "any", false, false, true, 632), 632, $this->source), "html", null, true);
echo ");
}
} else if (\$(this).attr(\"id\") == 'form_data_1_classcategory_id2') {
if (category == 1) {
changePrice(category, \".right_price\", 2, \$(this).val(), \$('#form_data_1_size').val(), ";
// line 636
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 636, $this->source); })()), "id", [], "any", false, false, true, 636), 636, $this->source), "html", null, true);
echo ");
}
} else if (\$(this).attr(\"id\") == 'form_data_0_size') {
if (category == 1) {
changePrice(category,\".left_price\", 1, \$('#form_data_0_classcategory_id2').val(), \$(this).val(), ";
// line 640
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 640, $this->source); })()), "id", [], "any", false, false, true, 640), 640, $this->source), "html", null, true);
echo ");
} else if (category == 2) {
changePrice(category, \".ring_price\", \$('#form_data_0_classcategory_id1').val(), \$('#form_data_0_classcategory_id2').val(), \$(this).val(), ";
// line 642
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 642, $this->source); })()), "id", [], "any", false, false, true, 642), 642, $this->source), "html", null, true);
echo ");
}
} else if (\$(this).attr(\"id\") == 'form_data_1_size') {
if (category == 1) {
changePrice(category, \".right_price\", 2, \$('#form_data_1_classcategory_id2').val(), \$(this).val(), ";
// line 646
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 646, $this->source); })()), "id", [], "any", false, false, true, 646), 646, $this->source), "html", null, true);
echo ");
}
}
";
} else {
// line 650
echo " // 規格なし
if (\$(this).attr(\"id\") == 'form_data_0_size') {
changePrice(category, \".ring_price\", '', '', \$('#form_data_0_size').val(), ";
// line 652
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 652, $this->source); })()), "id", [], "any", false, false, true, 652), 652, $this->source), "html", null, true);
echo ");
}
";
}
// line 655
echo " })
});
</script>
<script>
\$(function() {
// 119 の場合
";
// line 661
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.', 661, $this->source); })()), "id", [], "any", false, false, true, 661) == 119)) {
// line 662
echo " \$('#form_data_0_classcategory_id1').val('27');
\$('#form_data_0_classcategory_id1').parent().css('display','none');
\$('#form_data_0_size').val('11');
\$('#form_data_0_size').parent().css('display','none');
// 規格2に選択肢を割り当てる。
function fnSetClassCategories(form, classcat_id2_selected) {
var \$form = \$(form);
var product_id = \$form.find('input[name=product_id]').val();
var \$sele1 = \$form.find('#form_data_0_classcategory_id1');
var \$sele2 = \$form.find('#form_data_0_classcategory_id2');
eccube.setClassCategories(\$form, product_id, \$sele1, \$sele2, classcat_id2_selected);
}
fnSetClassCategories(
\$('#form1'), ";
// line 676
echo json_encode($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, 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.', 676, $this->source); })()), "data", [], "any", false, false, true, 676), "vars", [], "any", false, false, true, 676), "prototype", [], "any", false, false, true, 676), "classcategory_id2", [], "any", false, false, true, 676), "vars", [], "any", false, false, true, 676), "value", [], "any", false, false, true, 676), 676, $this->source));
echo "
);
";
}
// line 679
echo " });
</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 683
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 684
echo " <div class=\"ec-productRole\">
<div class=\"ec-grid2\">
<div class=\"ec-grid2__cell\">
<div class=\"ec-sliderItemRole\">
<div class=\"item_visual\">
";
// line 690
$context["img"] = "";
// line 691
echo " ";
$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.', 691, $this->source); })()), "ProductImage", [], "any", false, false, true, 691));
$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 692
echo " ";
if (twig_get_attribute($this->env, $this->source, $context["loop"], "first", [], "any", false, false, true, 692)) {
$context["img"] = $context["ProductImage"];
}
// line 693
echo " <div class=\"slide-item\"><img src=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->sandbox->ensureToStringAllowed($context["ProductImage"], 693, $this->source), "save_image"), "html", null, true);
echo "\" alt=\"";
((twig_get_attribute($this->env, $this->source, $context["loop"], "first", [], "any", false, false, true, 693)) ? (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.', 693, $this->source); })()), "name", [], "any", false, false, true, 693), "html", null, true))) : (print ("")));
echo "\" width=\"550\" height=\"550\"";
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, true, 693) > 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 695
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, true, 695)) ? (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.', 695, $this->source); })()), "name", [], "any", false, false, true, 695), "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 697
echo " </div>
<div class=\"item_nav\">
";
// line 699
$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.', 699, $this->source); })()), "ProductImage", [], "any", false, false, true, 699));
$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 700
echo " <div class=\"slideThumb\" data-index=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["loop"], "index0", [], "any", false, false, true, 700), 700, $this->source), "html", null, true);
echo "\"><img src=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->sandbox->ensureToStringAllowed($context["ProductImage"], 700, $this->source), "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 702
echo " </div>
</div>
</div>
<div class=\"ec-grid2__cell\">
<div class=\"ec-productRole__profile\">
";
// line 708
echo " <div class=\"ec-productRole__title\">
<h2 class=\"ec-headingTitle\">";
// line 709
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 709, $this->source); })()), "name", [], "any", false, false, true, 709), 709, $this->source), "html", null, true);
echo "</h2>
</div>
";
// line 712
echo " <ul class=\"ec-productRole__tags\">
";
// line 713
$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.', 713, $this->source); })()), "Tags", [], "any", false, false, true, 713));
foreach ($context['_seq'] as $context["_key"] => $context["Tag"]) {
// line 714
echo " <li class=\"ec-productRole__tag tag_";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Tag"], "id", [], "any", false, false, true, 714), 714, $this->source), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed($context["Tag"], 714, $this->source), "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 716
echo " </ul>
";
// line 718
echo " ";
// line 736
echo "
";
// line 738
echo " ";
$context["category"] = 0;
// line 739
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.', 739, $this->source); })()), "ProductCategories", [], "any", false, false, true, 739))) {
// line 740
echo " ";
$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.', 740, $this->source); })()), "ProductCategories", [], "any", false, false, true, 740));
foreach ($context['_seq'] as $context["_key"] => $context["ProductCategory"]) {
// line 741
echo " ";
$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, true, 741), "path", [], "any", false, false, true, 741));
foreach ($context['_seq'] as $context["_key"] => $context["Category"]) {
// line 742
echo " ";
if ((twig_get_attribute($this->env, $this->source, $context["Category"], "id", [], "any", false, false, true, 742) == 1)) {
// line 743
echo " ";
$context["category"] = 1;
// line 744
echo " ";
} elseif ((twig_get_attribute($this->env, $this->source, $context["Category"], "id", [], "any", false, false, true, 744) == 2)) {
// line 745
echo " ";
$context["category"] = 2;
// line 746
echo " ";
}
// line 747
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Category'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 748
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ProductCategory'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 749
echo " ";
}
// line 750
echo "
";
// line 752
echo " <div id=\"calc_price\" class=\"d-none\">
";
// line 753
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.', 753, $this->source); })()), "hasProductClass", [], "any", false, false, true, 753)) {
// line 754
$context["ProductClass_info_all"] = twig_get_attribute($this->env, $this->source, $this->env->getFunction('repository')->getCallable()("Eccube\\Entity\\ProductClass"), "findBy", [0 => ["Product" => (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 754, $this->source); })())], 1 => ["ClassCategory1" => "asc", "ClassCategory2" => "asc"]], "method", false, false, true, 754);
// line 755
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["ProductClass_info_all"]) || array_key_exists("ProductClass_info_all", $context) ? $context["ProductClass_info_all"] : (function () { throw new RuntimeError('Variable "ProductClass_info_all" does not exist.', 755, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["ProductClass_info"]) {
// line 756
echo " <p id=\"price_";
((twig_get_attribute($this->env, $this->source, $context["ProductClass_info"], "ClassCategory1", [], "any", false, false, true, 756)) ? (print (twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["ProductClass_info"], "ClassCategory1", [], "any", false, false, true, 756), "id", [], "any", false, false, true, 756), "html", null, true))) : (print ("")));
echo "_";
((twig_get_attribute($this->env, $this->source, $context["ProductClass_info"], "ClassCategory2", [], "any", false, false, true, 756)) ? (print (twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["ProductClass_info"], "ClassCategory2", [], "any", false, false, true, 756), "id", [], "any", false, false, true, 756), "html", null, true))) : (print ("")));
echo "\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["ProductClass_info"], "price02_inc_tax", [], "any", false, false, true, 756), 756, $this->source), "html", null, true);
echo "</p>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ProductClass_info'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 758
echo " ";
} else {
// line 759
echo " <p id=\"price__\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 759, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, true, 759), 759, $this->source), "html", null, true);
echo "</p>
";
}
// line 761
echo " </div>
<div class=\"ec-productRole__price\">
";
// line 763
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.', 763, $this->source); })()), "hasProductClass", [], "any", false, false, true, 763)) {
// line 764
if (((isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 764, $this->source); })()) == 1)) {
// line 765
echo " ";
$context["ProductClass_left"] = twig_get_attribute($this->env, $this->source, $this->env->getFunction('repository')->getCallable()("Eccube\\Entity\\ProductClass"), "findBy", [0 => ["Product" => (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 765, $this->source); })()), "ClassCategory1" => 1], 1 => ["price02" => "asc"], 2 => 1], "method", false, false, true, 765);
// line 766
echo " ";
$context["ProductClass_right"] = twig_get_attribute($this->env, $this->source, $this->env->getFunction('repository')->getCallable()("Eccube\\Entity\\ProductClass"), "findBy", [0 => ["Product" => (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 766, $this->source); })()), "ClassCategory1" => 2], 1 => ["price02" => "asc"], 2 => 1], "method", false, false, true, 766);
// line 767
echo " <div class=\"ec-price\">
<span class=\"fs-4\">";
// line 768
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("左のリング"), "html", null, true);
echo "</span>
<span class=\"ec-price__price price02-default price02-default_left pe-0\">";
// line 769
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["ProductClass_left"]) || array_key_exists("ProductClass_left", $context) ? $context["ProductClass_left"] : (function () { throw new RuntimeError('Variable "ProductClass_left" does not exist.', 769, $this->source); })()), 0, [], "array", false, false, true, 769), "price02_inc_tax", [], "any", false, false, true, 769), 769, $this->source)), "html", null, true);
echo "</span>
<span class=\"ec-price__tax\">";
// line 770
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("(税込) ~"), "html", null, true);
echo "</span>
</div>
<div class=\"ec-price\">
<span class=\"fs-4\">";
// line 773
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("右のリング"), "html", null, true);
echo "</span>
<span class=\"ec-price__price price02-default price02-default_right pe-0\">";
// line 774
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["ProductClass_right"]) || array_key_exists("ProductClass_right", $context) ? $context["ProductClass_right"] : (function () { throw new RuntimeError('Variable "ProductClass_right" does not exist.', 774, $this->source); })()), 0, [], "array", false, false, true, 774), "price02_inc_tax", [], "any", false, false, true, 774), 774, $this->source)), "html", null, true);
echo "</span>
<span class=\"ec-price__tax\">";
// line 775
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("(税込) ~"), "html", null, true);
echo "</span>
</div>
";
} elseif (( // line 777
(isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 777, $this->source); })()) == 2)) {
// line 778
echo " <div class=\"ec-price\">
<span class=\"ec-price__price price02-default price02-default_ring pe-0\">";
// line 779
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 779, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, true, 779), 779, $this->source)), "html", null, true);
echo "</span>
<span class=\"ec-price__tax\">";
// line 780
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("(税込) ~"), "html", null, true);
echo "</span>
</div>
";
}
// line 783
echo " ";
} else {
// line 784
echo " <div class=\"ec-price\">
<span class=\"ec-price__price price02-default_ring pe-0\">";
// line 785
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 785, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, true, 785), 785, $this->source)), "html", null, true);
echo "</span>
<span class=\"ec-price__tax\">";
// line 786
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("(税込)"), "html", null, true);
echo "</span>
</div>
";
}
// line 789
echo " </div>
";
// line 791
echo " <div class=\"ec-productRole__description mt-5\">";
echo twig_nl2br($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 791, $this->source); })()), "description_detail", [], "any", false, false, true, 791), 791, $this->source));
echo "
</div>
";
// line 795
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.', 795, $this->source); })()), "code_min", [], "any", false, false, true, 795))) {
// line 796
echo " <div class=\"ec-productRole__code\">
";
// line 797
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, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 797, $this->source); })()), "code_min", [], "any", false, false, true, 797), 797, $this->source), "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.', 797, $this->source); })()), "code_min", [], "any", false, false, true, 797) != 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.', 797, $this->source); })()), "code_max", [], "any", false, false, true, 797))) {
echo " ~ ";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 797, $this->source); })()), "code_max", [], "any", false, false, true, 797), 797, $this->source), "html", null, true);
}
echo "</span>
</div>
";
}
// line 800
echo "
";
// line 802
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.', 802, $this->source); })()), "ProductCategories", [], "any", false, false, true, 802))) {
// line 803
echo " <div class=\"ec-productRole__category mb-3\">
<div>";
// line 804
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("関連カテゴリ"), "html", null, true);
echo "</div>
";
// line 805
$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.', 805, $this->source); })()), "ProductCategories", [], "any", false, false, true, 805));
foreach ($context['_seq'] as $context["_key"] => $context["ProductCategory"]) {
// line 806
echo " <ul>
<li>
";
// line 808
$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, true, 808), "path", [], "any", false, false, true, 808));
$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 809
echo " <a href=\"";
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
echo "?category_id=";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Category"], "id", [], "any", false, false, true, 809), 809, $this->source), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Category"], "name", [], "any", false, false, true, 809), 809, $this->source), "html", null, true);
echo "</a>";
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, true, 809) == false)) {
// line 810
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 812
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 815
echo " </div>
";
}
// line 817
echo "
";
// line 818
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.', 818, $this->source); })()), "id", [], "any", false, false, true, 818) == 38) || (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.', 818, $this->source); })()), "id", [], "any", false, false, true, 818) == 39)) || (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.', 818, $this->source); })()), "id", [], "any", false, false, true, 818) == 47))) {
// line 819
echo " <div class=\"text_brown lead mt-4 mb-3\">
男性用リングをお求めの場合は「左のリング」を、<br>
女性用リングをお求めの場合は「右のリング」をお選びください。
</div>
";
}
// line 824
echo "
<form action=\"";
// line 825
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_addmulti_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.', 825, $this->source); })()), "id", [], "any", false, false, true, 825), "type" => "no_type"]), "html", null, true);
echo "\" method=\"post\" id=\"form1\" name=\"form1\">
<div class=\"product-class-item\" data-prototype=\"";
// line 826
echo twig_escape_filter($this->env, $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(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.', 826, $this->source); })()), "data", [], "any", false, false, true, 826), "vars", [], "any", false, false, true, 826), "prototype", [], "any", false, false, true, 826), 826, $this->source), 'widget'), "html_attr");
echo "\" data-index=0></div>
";
// line 828
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.', 828, $this->source); })()), "stock_find", [], "any", false, false, true, 828)) {
// line 829
echo " ";
// line 849
echo "
<a href=\"#\" class=\"js_form_add d-none\">
<span class=\"fa fa-plus-circle\"></span>
Add Another
</a>
<!-- trigger modal -->
";
// line 856
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.', 856, $this->source); })()), "id", [], "any", false, false, true, 856) != 119) && ((isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 856, $this->source); })()) != 0))) {
// line 857
echo " <p role=\"button\" class=\"text-end pb-4 text-danger fw-bold\" data-bs-toggle=\"modal\" data-bs-target=\"#colorSample\">
素材サンプル画像はこちらをご覧ください
</p>
";
}
// line 861
echo "
<!-- Modal -->
<div class=\"modal fade\" id=\"colorSample\" tabindex=\"-1\" aria-labelledby=\"exampleModalLabel\" aria-hidden=\"true\">
<div class=\"modal-dialog modal-dialog-centered\">
<div class=\"modal-content\">
<div class=\"modal-body\">
<img src=\"";
// line 867
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/pages/material.jpg"), "html", null, true);
echo "\">
</div>
<div class=\"modal-footer\">
<button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Close</button>
</div>
</div>
</div>
</div>
";
// line 877
echo " ";
$context["delivery_duration"] = twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, 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.', 877, $this->source); })()), "ProductClasses", [], "any", false, false, true, 877), 0, [], "array", false, false, true, 877), "getDeliveryDuration", [], "method", false, false, true, 877);
// line 878
echo " ";
if ((isset($context["delivery_duration"]) || array_key_exists("delivery_duration", $context) ? $context["delivery_duration"] : (function () { throw new RuntimeError('Variable "delivery_duration" does not exist.', 878, $this->source); })())) {
// line 879
echo " <div id=\"delivery_duration\" class=\"mt-4\">
<p class=\"fw-bold\">
";
// line 881
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("納期のめやす:"), "html", null, true);
echo "<span class=\"ps-3 fs-4\">
";
// line 882
if ((twig_get_attribute($this->env, $this->source, (isset($context["delivery_duration"]) || array_key_exists("delivery_duration", $context) ? $context["delivery_duration"] : (function () { throw new RuntimeError('Variable "delivery_duration" does not exist.', 882, $this->source); })()), "getId", [], "method", false, false, true, 882) == 11)) {
// line 883
echo " ";
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_date_modify_filter($this->env, "now", "+105 day"), "n月d日"), "html", null, true);
echo "
";
} elseif ((twig_get_attribute($this->env, $this->source, // line 884
(isset($context["delivery_duration"]) || array_key_exists("delivery_duration", $context) ? $context["delivery_duration"] : (function () { throw new RuntimeError('Variable "delivery_duration" does not exist.', 884, $this->source); })()), "getId", [], "method", false, false, true, 884) == 10)) {
// line 885
echo " ";
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_date_modify_filter($this->env, "now", "+90 day"), "n月d日"), "html", null, true);
echo "
";
} elseif ((twig_get_attribute($this->env, $this->source, // line 886
(isset($context["delivery_duration"]) || array_key_exists("delivery_duration", $context) ? $context["delivery_duration"] : (function () { throw new RuntimeError('Variable "delivery_duration" does not exist.', 886, $this->source); })()), "getId", [], "method", false, false, true, 886) == 9)) {
// line 887
echo " ";
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_date_modify_filter($this->env, "now", "+60 day"), "n月d日"), "html", null, true);
echo "
";
} elseif ((twig_get_attribute($this->env, $this->source, // line 888
(isset($context["delivery_duration"]) || array_key_exists("delivery_duration", $context) ? $context["delivery_duration"] : (function () { throw new RuntimeError('Variable "delivery_duration" does not exist.', 888, $this->source); })()), "getId", [], "method", false, false, true, 888) == 8)) {
// line 889
echo " ";
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_date_modify_filter($this->env, "now", "+60 day"), "n月d日"), "html", null, true);
echo "
";
} elseif ((twig_get_attribute($this->env, $this->source, // line 890
(isset($context["delivery_duration"]) || array_key_exists("delivery_duration", $context) ? $context["delivery_duration"] : (function () { throw new RuntimeError('Variable "delivery_duration" does not exist.', 890, $this->source); })()), "getId", [], "method", false, false, true, 890) == 7)) {
// line 891
echo " ";
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_date_modify_filter($this->env, "now", "+30 day"), "n月d日"), "html", null, true);
echo "
";
} elseif ((twig_get_attribute($this->env, $this->source, // line 892
(isset($context["delivery_duration"]) || array_key_exists("delivery_duration", $context) ? $context["delivery_duration"] : (function () { throw new RuntimeError('Variable "delivery_duration" does not exist.', 892, $this->source); })()), "getId", [], "method", false, false, true, 892) == 6)) {
// line 893
echo " ";
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_date_modify_filter($this->env, "now", "+21 day"), "n月d日"), "html", null, true);
echo "
";
} elseif ((twig_get_attribute($this->env, $this->source, // line 894
(isset($context["delivery_duration"]) || array_key_exists("delivery_duration", $context) ? $context["delivery_duration"] : (function () { throw new RuntimeError('Variable "delivery_duration" does not exist.', 894, $this->source); })()), "getId", [], "method", false, false, true, 894) == 5)) {
// line 895
echo " ";
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_date_modify_filter($this->env, "now", "+14 day"), "n月d日"), "html", null, true);
echo "
";
} elseif ((twig_get_attribute($this->env, $this->source, // line 896
(isset($context["delivery_duration"]) || array_key_exists("delivery_duration", $context) ? $context["delivery_duration"] : (function () { throw new RuntimeError('Variable "delivery_duration" does not exist.', 896, $this->source); })()), "getId", [], "method", false, false, true, 896) == 4)) {
// line 897
echo " ";
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_date_modify_filter($this->env, "now", "+7 day"), "n月d日"), "html", null, true);
echo "
";
} elseif ((twig_get_attribute($this->env, $this->source, // line 898
(isset($context["delivery_duration"]) || array_key_exists("delivery_duration", $context) ? $context["delivery_duration"] : (function () { throw new RuntimeError('Variable "delivery_duration" does not exist.', 898, $this->source); })()), "getId", [], "method", false, false, true, 898) == 3)) {
// line 899
echo " ";
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_date_modify_filter($this->env, "now", "+3 day"), "n月d日"), "html", null, true);
echo "
";
}
// line 901
echo " </span> ";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("頃です。"), "html", null, true);
echo "
</p>
<p>短納期をご希望の方は購入手続き画面のお問い合わせ欄にご記入ください。<br>
事前にご相談されたい場合は下記のお問い合わせからお問い合わせ下さい。<br>
<a class=\"d-inline-block pt-2\" href=\"";
// line 905
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("contact");
echo "\">お問い合わせはこちら<i class=\"fas fa-angle-right ps-2\"></i></a></p>
</div>
";
}
// line 908
echo " ";
// line 909
echo "
<div class=\"row cartin_btn_area pt-3 gx-2\">
";
// line 911
if (((isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 911, $this->source); })()) == 1)) {
// line 912
echo " <div id=\"cartin_left\" class=\"/*ec-productRole__btn*/ col-6 mb-3\">
<button type=\"submit\" class=\"ec-blockBtn--action add-cart add-cart_left lh-sm text-wrap\">
";
// line 914
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("左のリングを"), "html", null, true);
echo "<span class=\"aks\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに入れる"), "html", null, true);
echo "</span>
</button>
</div>
<div id=\"cartin_right\" class=\"/*ec-productRole__btn*/ col-6 mb-3\">
<button type=\"submit\" class=\"ec-blockBtn--action add-cart add-cart_right lh-sm text-wrap\">
";
// line 919
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("右のリングを"), "html", null, true);
echo "<span class=\"aks\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに入れる"), "html", null, true);
echo "</span>
</button>
</div>
<div id=\"cartin_set\" class=\"/*ec-productRole__btn*/ col-12 lh-sm text-wrap\">
<button type=\"submit\" class=\"ec-blockBtn--action add-cart add-cart_set\">
";
// line 924
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("2本セットでカートに入れる"), "html", null, true);
echo "
</button>
</div>
";
} else {
// line 928
echo " <div id=\"cartin_no_type\" class=\"/*ec-productRole__btn*/ col-12\">
<button type=\"submit\" class=\"ec-blockBtn--action add-cart add-cart_no_type\">
";
// line 930
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに入れる"), "html", null, true);
echo "
</button>
</div>
";
}
// line 934
echo " </div>
";
} else {
// line 936
echo " <div class=\"ec-productRole__btn w-100\">
<button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
";
// line 938
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ただいま品切れ中です。"), "html", null, true);
echo "
</button>
</div>
";
}
// line 942
echo "
";
// line 943
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 943, $this->source); })()), 943, $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 948
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 949
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 mb-2\">";
// line 952
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お買い物を続ける"), "html", null, true);
echo "</span>
<a href=\"";
// line 953
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("cart");
echo "\" class=\"ec-inlineBtn--action mb-2\">";
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__btn w-100 mt-3 favorite_btn_area\">
";
// line 961
if (((isset($context["is_favorite"]) || array_key_exists("is_favorite", $context) ? $context["is_favorite"] : (function () { throw new RuntimeError('Variable "is_favorite" does not exist.', 961, $this->source); })()) == false)) {
// line 962
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.', 962, $this->source); })()), "hasProductClass", [], "any", false, false, true, 962)) {
// line 963
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.', 963, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, true, 963) == 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.', 963, $this->source); })()), "getPrice02IncTaxMax", [], "any", false, false, true, 963))) {
// line 964
echo " <button onclick=\"favo(";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 964, $this->source); })()), "id", [], "any", false, false, true, 964), 964, $this->source), "html", null, true);
echo ", '";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["img"]) || array_key_exists("img", $context) ? $context["img"] : (function () { throw new RuntimeError('Variable "img" does not exist.', 964, $this->source); })()), 964, $this->source), "html", null, true);
echo "', '";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 964, $this->source); })()), "name", [], "any", false, false, true, 964), 964, $this->source), "html", null, true);
echo "', '";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 964, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, true, 964), 964, $this->source)), "html", null, true);
echo "')\" id=\"favorite_local\" class=\"ec-blockBtn--cancel\">
";
// line 965
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お気に入りに追加"), "html", null, true);
echo "
</button>
";
} else {
// line 968
echo " <button onclick=\"favo(";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 968, $this->source); })()), "id", [], "any", false, false, true, 968), 968, $this->source), "html", null, true);
echo ", '";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["img"]) || array_key_exists("img", $context) ? $context["img"] : (function () { throw new RuntimeError('Variable "img" does not exist.', 968, $this->source); })()), 968, $this->source), "html", null, true);
echo "', '";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 968, $this->source); })()), "name", [], "any", false, false, true, 968), 968, $this->source), "html", null, true);
echo "', '";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 968, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, true, 968), 968, $this->source)), "html", null, true);
echo " ~ ";
echo "')\" id=\"favorite_local\" class=\"ec-blockBtn--cancel\">
";
// line 969
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お気に入りに追加"), "html", null, true);
echo "
</button>
";
}
// line 972
echo " ";
} else {
// line 973
echo " <button onclick=\"favo(";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 973, $this->source); })()), "id", [], "any", false, false, true, 973), 973, $this->source), "html", null, true);
echo ", '";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["img"]) || array_key_exists("img", $context) ? $context["img"] : (function () { throw new RuntimeError('Variable "img" does not exist.', 973, $this->source); })()), 973, $this->source), "html", null, true);
echo "', '";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 973, $this->source); })()), "name", [], "any", false, false, true, 973), 973, $this->source), "html", null, true);
echo "', '";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 973, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, true, 973), 973, $this->source)), "html", null, true);
echo "')\" id=\"favorite_local\" class=\"ec-blockBtn--cancel\">
";
// line 974
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お気に入りに追加"), "html", null, true);
echo "
</button>
";
}
// line 977
echo " ";
} else {
// line 978
echo " <button id=\"favorite_local\" class=\"ec-blockBtn--cancel\"
disabled=\"disabled\">";
// line 979
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お気に入りに追加済です。"), "html", null, true);
echo "
</button>
";
}
// line 982
echo " </div>
</div>
</div>
</div>
<!--div class=\"row\">
<div class=\"col-md-6 offset-md-3\">
<img src=\"";
// line 989
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/pages/material.jpg"), "html", null, true);
echo "\">
</div>
</div>-->
";
// line 992
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.', 992, $this->source); })()), "freearea", [], "any", false, false, true, 992)) {
// line 993
echo " <div class=\"ec-productRole__description\">
";
// line 994
echo $this->extensions['Eccube\Twig\Extension\IgnoreTwigSandboxErrorExtension']->twig_include($this->env, $context, twig_template_from_string($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 994, $this->source); })()), "freearea", [], "any", false, false, true, 994), 994, $this->source)), array(), true, false, true);
echo "
</div>
";
}
// line 997
echo " </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 ( 1853 => 997, 1847 => 994, 1844 => 993, 1842 => 992, 1836 => 989, 1827 => 982, 1821 => 979, 1818 => 978, 1815 => 977, 1809 => 974, 1798 => 973, 1795 => 972, 1789 => 969, 1777 => 968, 1771 => 965, 1760 => 964, 1758 => 963, 1755 => 962, 1753 => 961, 1740 => 953, 1736 => 952, 1730 => 949, 1726 => 948, 1718 => 943, 1715 => 942, 1708 => 938, 1704 => 936, 1700 => 934, 1693 => 930, 1689 => 928, 1682 => 924, 1672 => 919, 1662 => 914, 1658 => 912, 1656 => 911, 1652 => 909, 1650 => 908, 1644 => 905, 1636 => 901, 1630 => 899, 1628 => 898, 1623 => 897, 1621 => 896, 1616 => 895, 1614 => 894, 1609 => 893, 1607 => 892, 1602 => 891, 1600 => 890, 1595 => 889, 1593 => 888, 1588 => 887, 1586 => 886, 1581 => 885, 1579 => 884, 1574 => 883, 1572 => 882, 1568 => 881, 1564 => 879, 1561 => 878, 1558 => 877, 1546 => 867, 1538 => 861, 1532 => 857, 1530 => 856, 1521 => 849, 1519 => 829, 1517 => 828, 1512 => 826, 1508 => 825, 1505 => 824, 1498 => 819, 1496 => 818, 1493 => 817, 1489 => 815, 1481 => 812, 1466 => 810, 1457 => 809, 1440 => 808, 1436 => 806, 1432 => 805, 1428 => 804, 1425 => 803, 1422 => 802, 1419 => 800, 1407 => 797, 1404 => 796, 1401 => 795, 1394 => 791, 1391 => 789, 1385 => 786, 1381 => 785, 1378 => 784, 1375 => 783, 1369 => 780, 1365 => 779, 1362 => 778, 1360 => 777, 1355 => 775, 1351 => 774, 1347 => 773, 1341 => 770, 1337 => 769, 1333 => 768, 1330 => 767, 1327 => 766, 1324 => 765, 1322 => 764, 1320 => 763, 1316 => 761, 1310 => 759, 1307 => 758, 1294 => 756, 1289 => 755, 1287 => 754, 1285 => 753, 1282 => 752, 1279 => 750, 1276 => 749, 1270 => 748, 1264 => 747, 1261 => 746, 1258 => 745, 1255 => 744, 1252 => 743, 1249 => 742, 1244 => 741, 1239 => 740, 1236 => 739, 1233 => 738, 1230 => 736, 1228 => 718, 1225 => 716, 1214 => 714, 1210 => 713, 1207 => 712, 1202 => 709, 1199 => 708, 1192 => 702, 1173 => 700, 1156 => 699, 1152 => 697, 1141 => 695, 1119 => 693, 1114 => 692, 1095 => 691, 1093 => 690, 1085 => 684, 1075 => 683, 1063 => 679, 1057 => 676, 1041 => 662, 1039 => 661, 1031 => 655, 1025 => 652, 1021 => 650, 1014 => 646, 1007 => 642, 1002 => 640, 995 => 636, 988 => 632, 983 => 630, 976 => 626, 970 => 623, 966 => 621, 964 => 620, 961 => 619, 955 => 618, 951 => 616, 949 => 615, 946 => 614, 943 => 613, 939 => 612, 895 => 570, 889 => 566, 877 => 556, 875 => 555, 869 => 551, 861 => 549, 859 => 548, 854 => 546, 851 => 545, 849 => 544, 832 => 529, 825 => 524, 817 => 518, 815 => 517, 810 => 514, 802 => 512, 800 => 511, 795 => 509, 792 => 508, 790 => 507, 769 => 488, 761 => 486, 759 => 485, 754 => 483, 751 => 482, 749 => 481, 706 => 440, 702 => 438, 698 => 436, 696 => 435, 680 => 421, 674 => 420, 669 => 417, 667 => 416, 663 => 414, 660 => 413, 656 => 412, 638 => 397, 624 => 386, 620 => 385, 616 => 384, 612 => 383, 608 => 381, 602 => 379, 600 => 378, 595 => 377, 590 => 376, 587 => 375, 577 => 373, 563 => 371, 555 => 370, 537 => 369, 532 => 367, 509 => 347, 496 => 337, 465 => 309, 459 => 305, 450 => 299, 446 => 297, 444 => 296, 441 => 295, 432 => 289, 428 => 287, 426 => 286, 419 => 282, 414 => 280, 409 => 278, 394 => 266, 376 => 251, 357 => 235, 339 => 220, 331 => 214, 325 => 213, 320 => 210, 318 => 209, 314 => 207, 311 => 206, 307 => 205, 296 => 197, 282 => 186, 209 => 115, 201 => 113, 199 => 112, 194 => 110, 191 => 109, 189 => 108, 175 => 97, 172 => 96, 162 => 95, 75 => 16, 65 => 15, 54 => 11, 52 => 13, 39 => 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>
.slick-slider {
margin-bottom: 30px;
}
.slick-dots {
position: absolute;
bottom: -45px;
display: block;
width: 100%;
padding: 0;
list-style: none;
text-align: center;
}
.slick-dots li {
position: relative;
display: inline-block;
width: 20px;
height: 20px;
margin: 0 5px;
padding: 0;
cursor: pointer;
}
.slick-dots li button {
font-size: 0;
line-height: 0;
display: block;
width: 20px;
height: 20px;
padding: 5px;
cursor: pointer;
color: transparent;
border: 0;
outline: none;
background: transparent;
}
.slick-dots li button:hover,
.slick-dots li button:focus {
outline: none;
}
.slick-dots li button:hover:before,
.slick-dots li button:focus:before {
opacity: 1;
}
.slick-dots li button:before {
content: \" \";
line-height: 20px;
position: absolute;
top: 0;
left: 0;
width: 12px;
height: 12px;
text-align: center;
opacity: .25;
background-color: black;
border-radius: 50%;
}
.slick-dots li.slick-active button:before {
opacity: .75;
background-color: black;
}
.slick-dots li button.thumbnail img {
width: 0;
height: 0;
}
</style>
{% endblock %}
{% block javascript %}
<script>
eccube.classCategories = {{ class_categories_as_json(Product)|raw }};
// 規格2に選択肢を割り当てる。
function fnSetClassCategories(form, classcat_id2_selected) {
var \$form = \$(form);
var product_id = \$form.find('input[name=product_id]').val();
var \$sele1 = \$form.find('select[name=classcategory_id1]');
var \$sele2 = \$form.find('select[name=classcategory_id2]');
eccube.setClassCategories(\$form, product_id, \$sele1, \$sele2, classcat_id2_selected);
}
{% if form.classcategory_id2 is defined %}
fnSetClassCategories(
\$('#form1'), {{ form.classcategory_id2.vars.value|json_encode|raw }}
);
{% elseif form.classcategory_id1 is defined %}
eccube.checkStock(\$('#form1'), {{ Product.id }}, {{ form.classcategory_id1.vars.value|json_encode|raw }}, null);
{% endif %}
</script>
<script>
\$(function() {
// bfcache無効化
\$(window).bind('pageshow', function(event) {
if (event.originalEvent.persisted) {
location.reload(true);
}
});
// Core Web Vital の Cumulative Layout Shift(CLS)対策のため
// img タグに width, height が付与されている.
// 630px 未満の画面サイズでは縦横比が壊れるための対策
// see https://github.com/EC-CUBE/ec-cube/pull/5023
\$('.ec-grid2__cell').hide();
var removeSize = function () {
\$('.slide-item').height('');
\$('.slide-item img')
.removeAttr('width')
.removeAttr('height')
.removeAttr('style');
};
var slickInitial = function(slick) {
\$('.ec-grid2__cell').fadeIn(1500);
var baseHeight = \$(slick.target).height();
var baseWidth = \$(slick.target).width();
var rate = baseWidth / baseHeight;
\$('.slide-item').height(baseHeight * rate); // 余白を削除する
// transform を使用することでCLSの影響を受けないようにする
\$('.slide-item img')
.css(
{
'transform-origin': 'top left',
'transform': 'scaleY(' + rate + ')',
'transition': 'transform .1s'
}
);
// 正しいサイズに近くなったら属性を解除する
setTimeout(removeSize, 500);
};
\$('.item_visual').on('init', slickInitial);
// リサイズ時は CLS の影響を受けないため属性を解除する
\$(window).resize(removeSize);
\$('.item_visual').slick({
dots: false,
arrows: false,
responsive: [{
breakpoint: 768,
settings: {
dots: true
}
}]
});
\$('.slideThumb').on('click', function() {
var index = \$(this).attr('data-index');
\$('.item_visual').slick('slickGoTo', index, false);
})
});
</script>
<script>
\$(function() {
\$('.add-cart').on('click', function(event) {
// 入力チェックここから
if(\$(this).hasClass('add-cart_left') || \$(this).hasClass('add-cart_set') || \$(this).hasClass('add-cart_no_type')) {
var data_0_classcategory_id1 = document.getElementById(\"form_data_0_classcategory_id1\");
if (data_0_classcategory_id1 === null) {
} else {
// 規格1フォームの必須チェック
if (\$('#form_data_0_classcategory_id1').val() == '__unselected' || \$('#form_data_0_classcategory_id1').val() == '') {
\$('#form_data_0_classcategory_id1')[0].setCustomValidity('{{ '項目が選択されていません'|trans }}');
return true;
} else {
\$('#form_data_0_classcategory_id1')[0].setCustomValidity('');
}
}
var data_0_classcategory_id2 = document.getElementById(\"form_data_0_classcategory_id2\");
if (data_0_classcategory_id2 === null) {
} else {
// 規格2フォームの必須チェック
if (\$('#form_data_0_classcategory_id2').val() == '__unselected' || \$('#form_data_0_classcategory_id2').val() == '') {
\$('#form_data_0_classcategory_id2')[0].setCustomValidity('{{ '項目が選択されていません'|trans }}');
return true;
} else {
\$('#form_data_0_classcategory_id2')[0].setCustomValidity('');
}
}
// サイズの入力チェックは結婚指輪・婚約指輪の場合のみ
var category=0;
{% for ProductCategory in Product.ProductCategories %}
{% if ProductCategory.Category.id == 1 %}
// 結婚指輪
category = 1;
{% elseif ProductCategory.Category.id == 2 %}
// 婚約指輪
category = 2;
{% endif %}
{% endfor %}
if (category == 1 || category == 2) {
var form_data_0_size = document.getElementById(\"form_data_0_size\");
if (form_data_0_size === null) {
} else {
// サイズ フォームの必須チェック
if (\$('#form_data_0_size').val() == '__unselected' || \$('#form_data_0_size').val() == '') {
\$('#form_data_0_size')[0].setCustomValidity('{{ '項目が選択されていません'|trans }}');
return true;
} else {
\$('#form_data_0_size')[0].setCustomValidity('');
}
}
}
}
if(\$(this).hasClass('add-cart_right') || \$(this).hasClass('add-cart_set')) {
var data_1_classcategory_id1 = document.getElementById(\"form_data_1_classcategory_id1\");
if (data_1_classcategory_id1 === null) {
} else {
// 規格1フォームの必須チェック
if (\$('#form_data_1_classcategory_id1').val() == '__unselected' || \$('#form_data_1_classcategory_id1').val() == '') {
\$('#form_data_1_classcategory_id1')[0].setCustomValidity('{{ '項目が選択されていません'|trans }}');
if (\$(this).hasClass('add-cart_right')) {
\$('#form_data_0_classcategory_id1')[0].setCustomValidity('');
\$('#form_data_0_classcategory_id2')[0].setCustomValidity('');
\$('#form_data_0_size')[0].setCustomValidity('');
}
return true;
} else {
\$('#form_data_1_classcategory_id1')[0].setCustomValidity('');
}
}
var data_1_classcategory_id2 = document.getElementById(\"form_data_1_classcategory_id2\");
if (data_1_classcategory_id2 === null) {
} else {
// 規格2フォームの必須チェック
if (\$('#form_data_1_classcategory_id2').val() == '__unselected' || \$('#form_data_1_classcategory_id2').val() == '') {
\$('#form_data_1_classcategory_id2')[0].setCustomValidity('{{ '項目が選択されていません'|trans }}');
if (\$(this).hasClass('add-cart_right')) {
\$('#form_data_0_classcategory_id2')[0].setCustomValidity('');
\$('#form_data_0_size')[0].setCustomValidity('');
}
return true;
} else {
\$('#form_data_1_classcategory_id2')[0].setCustomValidity('');
}
}
var form_data_1_size = document.getElementById(\"form_data_1_size\");
if (form_data_1_size === null) {
} else {
// サイズ フォームの必須チェック
if (\$('#form_data_1_size').val() == '__unselected' || \$('#form_data_1_size').val() == '') {
\$('#form_data_1_size')[0].setCustomValidity('{{ '項目が選択されていません'|trans }}');
if (\$(this).hasClass('add-cart_right')) {
\$('#form_data_0_size')[0].setCustomValidity('');
}
return true;
} else {
\$('#form_data_1_size')[0].setCustomValidity('');
}
}
}
if(\$(this).hasClass('add-cart_left')) {
document.getElementById(\"form1\").action = \"{{ url('product_addmulti_cart', {id:Product.id, type:\"left\"}) }}\";
} else if(\$(this).hasClass('add-cart_right')) {
document.getElementById(\"form1\").action = \"{{ url('product_addmulti_cart', {id:Product.id, type:\"right\"}) }}\";
} else if(\$(this).hasClass('add-cart_set')) {
document.getElementById(\"form1\").action = \"{{ url('product_addmulti_cart', {id:Product.id, type:\"set\"}) }}\";
}
// 入力チェックここまで
{% if form.classcategory_id1 is defined %}
// 規格1フォームの必須チェック
if (\$('#classcategory_id1').val() == '__unselected' || \$('#classcategory_id1').val() == '') {
\$('#classcategory_id1')[0].setCustomValidity('{{ '項目が選択されていません'|trans }}');
return true;
} else {
\$('#classcategory_id1')[0].setCustomValidity('');
}
{% endif %}
{% if form.classcategory_id2 is defined %}
// 規格2フォームの必須チェック
if (\$('#classcategory_id2').val() == '__unselected' || \$('#classcategory_id2').val() == '') {
\$('#classcategory_id2')[0].setCustomValidity('{{ '項目が選択されていません'|trans }}');
return true;
} else {
\$('#classcategory_id2')[0].setCustomValidity('');
}
{% endif %}
// 個数フォームのチェック
/*
if (\$('#quantity').val() < 1) {
\$('#quantity')[0].setCustomValidity('{{ '1以上で入力してください。'|trans }}');
return true;
} else {
\$('#quantity')[0].setCustomValidity('');
}
*/
event.preventDefault();
\$form = \$('#form1');
\$.ajax({
url: \$form.attr('action'),
type: \$form.attr('method'),
data: \$form.serialize(),
dataType: 'json',
beforeSend: function(xhr, settings) {
// Buttonを無効にする
\$('.add-cart').prop('disabled', true);
}
}).done(function(data) {
// レスポンス内のメッセージをalertで表示
\$.each(data.messages, function() {
\$('#ec-modal-header').text(this);
});
\$('.ec-modal').show()
// カートブロックを更新する
\$.ajax({
url: \"{{ url('block_cart') }}\",
type: 'GET',
dataType: 'html'
}).done(function(html) {
\$('.ec-headerRole__cart').html(html);
});
}).fail(function(XMLHttpRequest, textStatus, errorThrown) {
console.log(\"XMLHttpRequest : \" + XMLHttpRequest.status);
console.log(\"textStatus : \" + textStatus);
console.log(\"errorThrown : \" + errorThrown.message);
alert('{{ 'カートへの追加に失敗しました。'|trans }}');
}).always(function(data) {
// Buttonを有効にする
\$('.add-cart').prop('disabled', false);
});
});
});
\$('.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()
});
</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_list 使わない 2024.10 \"description\": \"{{ Product.description_list | default(Product.description_detail) | replace({'\\n': '', '\\r': ''}) | slice(0,300) }}\",
\"description\": \"{{ 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>
<script>
var localfavo = localStorage.getItem('favo');
if(localfavo) {
var lsfavo = JSON.parse(localfavo);
if (lsfavo.length) {
console.log(lsfavo);
for (i=0;i<lsfavo.length;i++) {
if(lsfavo[i][0] == {{ Product.id }}) {
//\$(\"#favorite_local\").removeAttr(\"onclick\");
//\$(\"#favorite_local\").prop('disabled', true);
\$(\"#favorite_local\").addClass(\"registered\");
\$(\"#favorite_local\").html(\"お気に入りに追加済みです\");
}
}
}
}
</script>
<script>
\$(function() {
//\$('.js_form_add').on('click', function(e) {
//e.preventDefault
var category=0;
{% for ProductCategory in Product.ProductCategories %}
{% if ProductCategory.Category.id == 1 %}
// 結婚指輪
category = 1;
{% elseif ProductCategory.Category.id == 2 %}
// 婚約指輪
category = 2;
{% endif %}
{% endfor %}
// 結婚指輪は規格1がタイプ、規格2が素材
// 婚約指輪は規格1が素材、規格2がカラット数
for (let i = 0; i < 2; i++){
// Get the data-prototype explained earlier
var prototype = \$('.product-class-item').data('prototype');
// get the new index
var index = \$('.product-class-item').data('index');
// Replace '__name__' in the prototype's HTML to
// instead be a number based on how many items we have
var newForm = '';
if (index == 0) {
if(category == 1) {
newForm += '<div class=\"category1 left_option\"><p class=\"fw-bold\">左のリング:<span class=\"ps-3 fs-3 text-danger fw-normal left_price\"></span></p>';
} else if (category == 2) {
{% if Product.id == 119 %}
newForm += '<div class=\"category2\"><p class=\"mb-3\"><span class=\"fs-3 text-danger ring_price\"></p>';
{% else %}
newForm += '<div class=\"category2\"><p class=\"mb-3\"><span class=\"fs-3 text-danger ring_price\"></p><p>まず素材を選択してください。<br>素材を選択するとダイヤモンドの選択肢が表示されます。</p>';
{% endif %}
} else {
newForm += '<div class=\"category0\"><p class=\"mb-3\"><span class=\"fs-3 text-danger ring_price\"></p>';
}
} else {
if(category == 1) {
newForm += '<div class=\"category1 right_option\"><p class=\"fw-bold\">右のリング:<span class=\"ps-3 fs-3 text-danger fw-normal right_price\"></span></p>';
} else if (category == 2) {
newForm += '<div class=\"category2\">';
} else {
newForm += '<div class=\"category0\">';
}
}
newForm += prototype.replace(/__name__/g, index);
newForm += '</div>';
// increase the index with one for the next item
\$('.product-class-item').data('index', index + 1);
// Display the form in the page before the \"new\" link
//\$(this).before(newForm);
\$('.js_form_add').before(newForm);
}
if(category == 1) {
document.getElementById(\"form_data_0_classcategory_id1\").value = 1;
document.getElementById(\"form_data_1_classcategory_id1\").value = 2;
}
var data_0_classcategory_id1 = document.getElementById(\"form_data_0_classcategory_id1\");
if (data_0_classcategory_id1 === null) {
} else {
// 規格2に選択肢を割り当てる。
function fnSetClassCategories(form, classcat_id2_selected) {
var \$form = \$(form);
var product_id = \$form.find('input[name=product_id]').val();
var \$sele1 = \$form.find('#form_data_0_classcategory_id1');
var \$sele2 = \$form.find('#form_data_0_classcategory_id2');
eccube.setClassCategories(\$form, product_id, \$sele1, \$sele2, classcat_id2_selected);
}
var \$form = \$('#form1');
var \$sele2 = \$form.find('#form_data_0_classcategory_id2');
if (data_0_classcategory_id1 === null) {
} else {
{% if form.data.vars.prototype.classcategory_id2 is defined %}
fnSetClassCategories(
\$('#form1'), {{ form.data.vars.prototype.classcategory_id2.vars.value|json_encode|raw }}
);
{% elseif form.data.vars.prototype.classcategory_id1 is defined %}
eccube.checkStock(\$('#form1'), {{ Product.id }}, {{ form.data.vars.prototype.classcategory_id1.vars.value|json_encode|raw }}, null);
{% endif %}
}
}
var data_1_classcategory_id1 = document.getElementById(\"form_data_1_classcategory_id1\");
if (data_1_classcategory_id1 === null) {
} else {
// 規格2に選択肢を割り当てる。
function fnSetClassCategories(form, classcat_id2_selected) {
var \$form = \$(form);
var product_id = \$form.find('input[name=product_id]').val();
var \$sele1 = \$form.find('#form_data_1_classcategory_id1');
var \$sele2 = \$form.find('#form_data_1_classcategory_id2');
eccube.setClassCategories(\$form, product_id, \$sele1, \$sele2, classcat_id2_selected);
}
var \$form = \$('#form1');
var \$sele2 = \$form.find('#form_data_1_classcategory_id2');
if (data_0_classcategory_id1 === null) {
} else {
{% if form.data.vars.prototype.classcategory_id2 is defined %}
fnSetClassCategories(
\$('#form1'), {{ form.data.vars.prototype.classcategory_id2.vars.value|json_encode|raw }}
);
{% elseif form.data.vars.prototype.classcategory_id1 is defined %}
eccube.checkStock(\$('#form1'), {{ Product.id }}, {{ form.data.vars.prototype.classcategory_id1.vars.value|json_encode|raw }}, null);
{% endif %}
}
}
//});
{% if Product.hasProductClass %}
if(category == 2) {
// 婚約指輪は2本同時購入はない
const element = document.getElementById('form_data_1');
element.remove();
}
{% else %}
// 規格なし
\$('#form1').addClass('no_product_class');
const element = document.getElementById('form_data_1');
element.remove();
{% endif %}
// 婚約指輪で素材が選択されたとき
if (category == 2) {
\$('#form_data_0_classcategory_id1').change(function() {
// 規格2に選択肢を割り当てる。
function fnSetClassCategories(form, classcat_id2_selected) {
var \$form = \$(form);
var product_id = \$form.find('input[name=product_id]').val();
var \$sele1 = \$form.find('#form_data_0_classcategory_id1');
var \$sele2 = \$form.find('#form_data_0_classcategory_id2');
eccube.setClassCategories(\$form, product_id, \$sele1, \$sele2, classcat_id2_selected);
}
var \$form = \$('#form1');
var \$sele2 = \$form.find('#form_data_1_classcategory_id2');
{% if form.data.vars.prototype.classcategory_id2 is defined %}
fnSetClassCategories(
\$('#form1'), {{ form.data.vars.prototype.classcategory_id2.vars.value|json_encode|raw }}
);
{% elseif form.data.vars.prototype.classcategory_id1 is defined %}
eccube.checkStock(\$('#form1'), {{ Product.id }}, {{ form.data.vars.prototype.classcategory_id1.vars.value|json_encode|raw }}, null);
{% endif %}
});
}
// 選択肢と連動する価格の表示
{% if Product.hasProductClass %}
if(category == 1) {
var default_left_price = \$('.ec-layoutRole__main').find('.price02-default_left').first();
var default_right_price = \$('.ec-layoutRole__main').find('.price02-default_right').first();
\$('.left_price').text(default_left_price.text());
\$('.right_price').text(default_right_price.text());
} else if(category == 2) {
var default_ring_price = \$('.ec-layoutRole__main').find('.price02-default_ring').first();
\$('.ring_price').text(default_ring_price.text());
}
{% else %}
// 規格なし
var default_ring_price = \$('.ec-layoutRole__main').find('.price02-default_ring').first();
\$('.ring_price').text(default_ring_price.text());
{% endif %}
// 結婚指輪・婚約指輪以外の場合
if(category != 1 && category != 2) {
\$('#form_data_0_size').parent().css('display','none'); // サイズ不要
}
// Android firefox 対策
if (navigator.userAgent.indexOf('Android') > 0) {
let main = document.getElementsByTagName('main')[0];
main.classList.add('Android');
}
});
</script>
<script>
\$(function() {
function changePrice(category, change_class, classcategory_id1, classcategory_id2, size, product_id) {
var price = '';
price = \$('#price_' + classcategory_id1 + '_' + classcategory_id2).text();
price = price * 1; //number
if (category == 1) { // 結婚指輪の場合のみサイズによる加算あり
if (size) {
if(size >= 16.5) {
price = price + 22000; // 割り増し(税込)
} else if(size >= 12.5) {
price = price + 11000; // 割り増し(税込)
}
}
} else if(category == 2) { // 婚約指輪の C110、C112の場合のみサイズによる加算あり
if (product_id == 110 || product_id == 112) {
if (size) {
if(size >= 16) {
price = price + 22000; // 割り増し(税込)
}
}
}
}
price = String(price).replace(/(\\d)(?=(\\d\\d\\d)+(?!\\d))/g, '\$1,');
\$(change_class).text(\"¥\" + price);
}
\$('.form-select').on('change', function(event) {
var category=0;
{% for ProductCategory in Product.ProductCategories %}
{% if ProductCategory.Category.id == 1 %}
category = 1; // 結婚指輪
{% elseif ProductCategory.Category.id == 2 %}
category = 2; // 婚約指輪
{% endif %}
{% endfor %}
{% if Product.hasProductClass %}
if (\$(this).attr(\"id\") == 'form_data_0_classcategory_id1') {
if (category == 1) {
changePrice(category, \".ring_price\", \$(this).val(), '', \$('#form_data_0_size').val(), {{ Product.id}});
} else if (category == 2) {
// 規格2の最安値(class_category2 = 19)を表示
changePrice(category, \".ring_price\", \$(this).val(), 19, '', {{ Product.id}});
}
} else if (\$(this).attr(\"id\") == 'form_data_0_classcategory_id2') {
if (category == 1) {
changePrice(category, \".left_price\", 1, \$(this).val(), \$('#form_data_0_size').val(), {{ Product.id}});
} else if (category == 2) {
changePrice(category, \".ring_price\", \$('#form_data_0_classcategory_id1').val(), \$(this).val(), \$('#form_data_0_size').val(), {{ Product.id}});
}
} else if (\$(this).attr(\"id\") == 'form_data_1_classcategory_id2') {
if (category == 1) {
changePrice(category, \".right_price\", 2, \$(this).val(), \$('#form_data_1_size').val(), {{ Product.id}});
}
} else if (\$(this).attr(\"id\") == 'form_data_0_size') {
if (category == 1) {
changePrice(category,\".left_price\", 1, \$('#form_data_0_classcategory_id2').val(), \$(this).val(), {{ Product.id}});
} else if (category == 2) {
changePrice(category, \".ring_price\", \$('#form_data_0_classcategory_id1').val(), \$('#form_data_0_classcategory_id2').val(), \$(this).val(), {{ Product.id}});
}
} else if (\$(this).attr(\"id\") == 'form_data_1_size') {
if (category == 1) {
changePrice(category, \".right_price\", 2, \$('#form_data_1_classcategory_id2').val(), \$(this).val(), {{ Product.id}});
}
}
{% else %}
// 規格なし
if (\$(this).attr(\"id\") == 'form_data_0_size') {
changePrice(category, \".ring_price\", '', '', \$('#form_data_0_size').val(), {{ Product.id}});
}
{% endif %}
})
});
</script>
<script>
\$(function() {
// 119 の場合
{% if(Product.id == 119) %}
\$('#form_data_0_classcategory_id1').val('27');
\$('#form_data_0_classcategory_id1').parent().css('display','none');
\$('#form_data_0_size').val('11');
\$('#form_data_0_size').parent().css('display','none');
// 規格2に選択肢を割り当てる。
function fnSetClassCategories(form, classcat_id2_selected) {
var \$form = \$(form);
var product_id = \$form.find('input[name=product_id]').val();
var \$sele1 = \$form.find('#form_data_0_classcategory_id1');
var \$sele2 = \$form.find('#form_data_0_classcategory_id2');
eccube.setClassCategories(\$form, product_id, \$sele1, \$sele2, classcat_id2_selected);
}
fnSetClassCategories(
\$('#form1'), {{ form.data.vars.prototype.classcategory_id2.vars.value|json_encode|raw }}
);
{% endif %}
});
</script>
{% endblock %}
{% block main %}
<div class=\"ec-productRole\">
<div class=\"ec-grid2\">
<div class=\"ec-grid2__cell\">
<div class=\"ec-sliderItemRole\">
<div class=\"item_visual\">
{% set img =\"\" %}{# お気に入りリスト登録用 #}
{% for ProductImage in Product.ProductImage %}
{% if loop.first %}{% set img = ProductImage %}{% endif %}
<div class=\"slide-item\"><img src=\"{{ asset(ProductImage, 'save_image') }}\" alt=\"{{ loop.first ? Product.name : '' }}\" width=\"550\" height=\"550\"{% if loop.index > 1 %} loading=\"lazy\"{% endif %}></div>
{% else %}
<div class=\"slide-item\"><img src=\"{{ asset(''|no_image_product, 'save_image') }}\" alt=\"{{ loop.first ? Product.name : '' }}\" width=\"550\" height=\"550\"></div>
{% endfor %}
</div>
<div class=\"item_nav\">
{% for ProductImage in Product.ProductImage %}
<div class=\"slideThumb\" data-index=\"{{ loop.index0 }}\"><img src=\"{{ asset(ProductImage, 'save_image') }}\" alt=\"\" width=\"133\" height=\"133\" loading=\"lazy\"></div>
{% endfor %}
</div>
</div>
</div>
<div class=\"ec-grid2__cell\">
<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 %}
#}
{# カテゴリ判定用 1:結婚指輪 2:婚約指輪 #}
{% set category = 0 %}
{% if Product.ProductCategories is not empty %}
{% for ProductCategory in Product.ProductCategories %}
{% for Category in ProductCategory.Category.path %}
{% if Category.id == 1 %}
{% set category = 1 %}
{% elseif Category.id == 2 %}
{% set category = 2 %}
{% endif %}
{% endfor %}
{% endfor %}
{% endif %}
{# 販売価格 #}
<div id=\"calc_price\" class=\"d-none\">
{% if Product.hasProductClass -%}
{% set ProductClass_info_all = repository('Eccube\\\\Entity\\\\ProductClass').findBy({ Product: Product }, { ClassCategory1: 'asc', ClassCategory2: 'asc' }) %}
{% for ProductClass_info in ProductClass_info_all %}
<p id=\"price_{{ ProductClass_info.ClassCategory1 ? ProductClass_info.ClassCategory1.id }}_{{ ProductClass_info.ClassCategory2 ? ProductClass_info.ClassCategory2.id }}\">{{ ProductClass_info.price02_inc_tax }}</p>
{% endfor %}
{% else %}
<p id=\"price__\">{{ Product.getPrice02IncTaxMin }}</p>
{% endif %}
</div>
<div class=\"ec-productRole__price\">
{% if Product.hasProductClass -%}
{% if category == 1 %}
{% set ProductClass_left = repository('Eccube\\\\Entity\\\\ProductClass').findBy({ Product: Product, ClassCategory1: 1 }, { price02: 'asc' }, 1) %}
{% set ProductClass_right = repository('Eccube\\\\Entity\\\\ProductClass').findBy({ Product: Product, ClassCategory1: 2 }, { price02: 'asc' }, 1) %}
<div class=\"ec-price\">
<span class=\"fs-4\">{{ '左のリング'|trans }}</span>
<span class=\"ec-price__price price02-default price02-default_left pe-0\">{{ ProductClass_left[0].price02_inc_tax|price }}</span>
<span class=\"ec-price__tax\">{{ '(税込) ~'|trans }}</span>
</div>
<div class=\"ec-price\">
<span class=\"fs-4\">{{ '右のリング'|trans }}</span>
<span class=\"ec-price__price price02-default price02-default_right pe-0\">{{ ProductClass_right[0].price02_inc_tax|price }}</span>
<span class=\"ec-price__tax\">{{ '(税込) ~'|trans }}</span>
</div>
{% elseif category == 2 %}
<div class=\"ec-price\">
<span class=\"ec-price__price price02-default price02-default_ring pe-0\">{{ Product.getPrice02IncTaxMin|price }}</span>
<span class=\"ec-price__tax\">{{ '(税込) ~'|trans }}</span>
</div>
{% endif %}
{% else %}
<div class=\"ec-price\">
<span class=\"ec-price__price price02-default_ring pe-0\">{{ Product.getPrice02IncTaxMin|price }}</span>
<span class=\"ec-price__tax\">{{ '(税込)'|trans }}</span>
</div>
{% endif %}
</div>
{# 詳細説明 #}
<div class=\"ec-productRole__description mt-5\">{{ Product.description_detail|raw|nl2br }}
</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 Product.ProductCategories is not empty %}
<div class=\"ec-productRole__category mb-3\">
<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 %}
{% if Product.id == 38 or Product.id == 39 or Product.id == 47 %}
<div class=\"text_brown lead mt-4 mb-3\">
男性用リングをお求めの場合は「左のリング」を、<br>
女性用リングをお求めの場合は「右のリング」をお選びください。
</div>
{% endif %}
<form action=\"{{ url('product_addmulti_cart', {id:Product.id, type:\"no_type\"}) }}\" method=\"post\" id=\"form1\" name=\"form1\">
<div class=\"product-class-item\" data-prototype=\"{{ form_widget(form.data.vars.prototype)|e('html_attr') }}\" data-index=0></div>
{% if Product.stock_find %}
{#
<div class=\"ec-productRole__actions\">
{% if form.classcategory_id1 is defined %}
<div class=\"ec-select\">
{{ form_row(form.classcategory_id1) }}
{{ form_errors(form.classcategory_id1) }}
</div>
{% if form.classcategory_id2 is defined %}
<div class=\"ec-select\">
{{ form_row(form.classcategory_id2) }}
{{ form_errors(form.classcategory_id2) }}
</div>
{% endif %}
{% endif %}
<div class=\"ec-numberInput\"><span>{{ '数量'|trans }}</span>
{{ form_widget(form.quantity) }}
{{ form_errors(form.quantity) }}
</div>
</div>
#}
<a href=\"#\" class=\"js_form_add d-none\">
<span class=\"fa fa-plus-circle\"></span>
Add Another
</a>
<!-- trigger modal -->
{% if Product.id != 119 and category != 0 %}
<p role=\"button\" class=\"text-end pb-4 text-danger fw-bold\" data-bs-toggle=\"modal\" data-bs-target=\"#colorSample\">
素材サンプル画像はこちらをご覧ください
</p>
{% endif %}
<!-- Modal -->
<div class=\"modal fade\" id=\"colorSample\" tabindex=\"-1\" aria-labelledby=\"exampleModalLabel\" aria-hidden=\"true\">
<div class=\"modal-dialog modal-dialog-centered\">
<div class=\"modal-content\">
<div class=\"modal-body\">
<img src=\"{{ asset('assets/img/pages/material.jpg') }}\">
</div>
<div class=\"modal-footer\">
<button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Close</button>
</div>
</div>
</div>
</div>
{#{% if Product.hasProductClass %}#}
{% set delivery_duration = Product.ProductClasses[0].getDeliveryDuration() %}
{% if delivery_duration %}
<div id=\"delivery_duration\" class=\"mt-4\">
<p class=\"fw-bold\">
{{ '納期のめやす:'|trans }}<span class=\"ps-3 fs-4\">
{% if delivery_duration.getId() == 11 %}
{{ \"now\" |date_modify(\"+105 day\")|date(\"n月d日\") }}
{% elseif delivery_duration.getId() == 10 %}
{{ \"now\" |date_modify(\"+90 day\")|date(\"n月d日\") }}
{% elseif delivery_duration.getId() == 9 %}
{{ \"now\" |date_modify(\"+60 day\")|date(\"n月d日\") }}
{% elseif delivery_duration.getId() == 8 %}
{{ \"now\" |date_modify(\"+60 day\")|date(\"n月d日\") }}
{% elseif delivery_duration.getId() == 7 %}
{{ \"now\" |date_modify(\"+30 day\")|date(\"n月d日\") }}
{% elseif delivery_duration.getId() == 6 %}
{{ \"now\" |date_modify(\"+21 day\")|date(\"n月d日\") }}
{% elseif delivery_duration.getId() == 5 %}
{{ \"now\" |date_modify(\"+14 day\")|date(\"n月d日\") }}
{% elseif delivery_duration.getId() == 4 %}
{{ \"now\" |date_modify(\"+7 day\")|date(\"n月d日\") }}
{% elseif delivery_duration.getId() == 3 %}
{{ \"now\" |date_modify(\"+3 day\")|date(\"n月d日\") }}
{% endif %}
</span> {{ '頃です。'|trans }}
</p>
<p>短納期をご希望の方は購入手続き画面のお問い合わせ欄にご記入ください。<br>
事前にご相談されたい場合は下記のお問い合わせからお問い合わせ下さい。<br>
<a class=\"d-inline-block pt-2\" href=\"{{ url('contact') }}\">お問い合わせはこちら<i class=\"fas fa-angle-right ps-2\"></i></a></p>
</div>
{% endif %}
{#{% endif %}#}
<div class=\"row cartin_btn_area pt-3 gx-2\">
{% if category == 1 %}
<div id=\"cartin_left\" class=\"/*ec-productRole__btn*/ col-6 mb-3\">
<button type=\"submit\" class=\"ec-blockBtn--action add-cart add-cart_left lh-sm text-wrap\">
{{ '左のリングを'|trans }}<span class=\"aks\">{{ 'カートに入れる'|trans }}</span>
</button>
</div>
<div id=\"cartin_right\" class=\"/*ec-productRole__btn*/ col-6 mb-3\">
<button type=\"submit\" class=\"ec-blockBtn--action add-cart add-cart_right lh-sm text-wrap\">
{{ '右のリングを'|trans }}<span class=\"aks\">{{ 'カートに入れる'|trans }}</span>
</button>
</div>
<div id=\"cartin_set\" class=\"/*ec-productRole__btn*/ col-12 lh-sm text-wrap\">
<button type=\"submit\" class=\"ec-blockBtn--action add-cart add-cart_set\">
{{ '2本セットでカートに入れる'|trans }}
</button>
</div>
{% else %}
<div id=\"cartin_no_type\" class=\"/*ec-productRole__btn*/ col-12\">
<button type=\"submit\" class=\"ec-blockBtn--action add-cart add-cart_no_type\">
{{ 'カートに入れる'|trans }}
</button>
</div>
{% endif %}
</div>
{% else %}
<div class=\"ec-productRole__btn w-100\">
<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 mb-2\">{{ 'お買い物を続ける'|trans }}</span>
<a href=\"{{ url('cart') }}\" class=\"ec-inlineBtn--action mb-2\">{{ 'カートへ進む'|trans }}</a>
</div>
</div>
</div>
</div>
</div>
<div class=\"ec-productRole__btn w-100 mt-3 favorite_btn_area\">
{% if is_favorite == false %}
{% if Product.hasProductClass -%}
{% if Product.getPrice02IncTaxMin == Product.getPrice02IncTaxMax %}
<button onclick=\"favo({{ Product.id }}, '{{ img }}', '{{ Product.name }}', '{{ Product.getPrice02IncTaxMin|price }}')\" id=\"favorite_local\" class=\"ec-blockBtn--cancel\">
{{ 'お気に入りに追加'|trans }}
</button>
{% else %}
<button onclick=\"favo({{ Product.id }}, '{{ img }}', '{{ Product.name }}', '{{ Product.getPrice02IncTaxMin|price }} ~ {#{{ Product.getPrice02IncTaxMax|price }}#}')\" id=\"favorite_local\" class=\"ec-blockBtn--cancel\">
{{ 'お気に入りに追加'|trans }}
</button>
{% endif %}
{% else %}
<button onclick=\"favo({{ Product.id }}, '{{ img }}', '{{ Product.name }}', '{{ Product.getPrice02IncTaxMin|price }}')\" id=\"favorite_local\" class=\"ec-blockBtn--cancel\">
{{ 'お気に入りに追加'|trans }}
</button>
{% endif %}
{% else %}
<button id=\"favorite_local\" class=\"ec-blockBtn--cancel\"
disabled=\"disabled\">{{ 'お気に入りに追加済です。'|trans }}
</button>
{% endif %}
</div>
</div>
</div>
</div>
<!--div class=\"row\">
<div class=\"col-md-6 offset-md-3\">
<img src=\"{{ asset('assets/img/pages/material.jpg') }}\">
</div>
</div>-->
{% if Product.freearea %}
<div class=\"ec-productRole__description\">
{{ include(template_from_string(Product.freearea), sandboxed = true) }}
</div>
{% endif %}
</div>
{% endblock %}", "Product/detail.twig", "/home/apteq5/apteq5x.com/public_html/tanzoec/app/template/tanzo/Product/detail.twig");
}
public function checkSecurity()
{
static $tags = array("set" => 13, "if" => 108, "for" => 205);
static $filters = array("raw" => 97, "json_encode" => 110, "escape" => 113, "trans" => 186, "no_image_product" => 373, "slice" => 376, "replace" => 376, "default" => 376, "price" => 769, "nl2br" => 791, "e" => 826, "date" => 883, "date_modify" => 883);
static $functions = array("class_categories_as_json" => 97, "url" => 278, "asset" => 370, "repository" => 754, "form_widget" => 826, "form_rest" => 943, "include" => 994, "template_from_string" => 994);
try {
$this->sandbox->checkSecurity(
['set', 'if', 'for'],
['raw', 'json_encode', 'escape', 'trans', 'no_image_product', 'slice', 'replace', 'default', 'price', 'nl2br', 'e', 'date', 'date_modify'],
['class_categories_as_json', 'url', 'asset', 'repository', 'form_widget', 'form_rest', 'include', 'template_from_string']
);
} catch (SecurityError $e) {
$e->setSourceContext($this->source);
if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
$e->setTemplateLine($tags[$e->getTagName()]);
} elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
$e->setTemplateLine($filters[$e->getFilterName()]);
} elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
$e->setTemplateLine($functions[$e->getFunctionName()]);
}
throw $e;
}
}
}