<?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_05021e6e93cc71b5285261c1644e075b 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 "\t<style>
\t.ec-price .ec-price__price {
margin-top: 0!important;
}
span.ec-productRole__priceRegularPrice {
text-decoration: line-through;
}
\t\t.slick-slider {
\t\t\tmargin-bottom: 30px;
\t\t}
\t\t.slick-dots {
\t\t\tposition: absolute;
\t\t\tbottom: -45px;
\t\t\tdisplay: block;
\t\t\twidth: 100%;
\t\t\tpadding: 0;
\t\t\tlist-style: none;
\t\t\ttext-align: center;
\t\t}
\t\t.slick-dots li {
\t\t\tposition: relative;
\t\t\tdisplay: inline-block;
\t\t\twidth: 20px;
\t\t\theight: 20px;
\t\t\tmargin: 0 5px;
\t\t\tpadding: 0;
\t\t\tcursor: pointer;
\t\t}
\t\t.slick-dots li button {
\t\t\tfont-size: 0;
\t\t\tline-height: 0;
\t\t\tdisplay: block;
\t\t\twidth: 20px;
\t\t\theight: 20px;
\t\t\tpadding: 5px;
\t\t\tcursor: pointer;
\t\t\tcolor: transparent;
\t\t\tborder: 0;
\t\t\toutline: none;
\t\t\tbackground: transparent;
\t\t}
\t\t.slick-dots li button:hover,
\t\t.slick-dots li button:focus {
\t\t\toutline: none;
\t\t}
\t\t.slick-dots li button:hover:before,
\t\t.slick-dots li button:focus:before {
\t\t\topacity: 1;
\t\t}
\t\t.slick-dots li button:before {
\t\t\tcontent: \" \";
\t\t\tline-height: 20px;
\t\t\tposition: absolute;
\t\t\ttop: 0;
\t\t\tleft: 0;
\t\t\twidth: 12px;
\t\t\theight: 12px;
\t\t\ttext-align: center;
\t\t\topacity: .25;
\t\t\tbackground-color: black;
\t\t\tborder-radius: 50%;
\t\t}
\t\t.slick-dots li.slick-active button:before {
\t\t\topacity: .75;
\t\t\tbackground-color: black;
\t\t}
\t\t.slick-dots li button.thumbnail img {
\t\t\twidth: 0;
\t\t\theight: 0;
\t\t}
\t</style>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 99
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"));
echo " <script>
\t\t\t eccube.classCategories = ";
// line 100
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.', 100, $this->source); })()), 100, $this->source));
echo ";
\t\t\t
\t\t\t // 規格2に選択肢を割り当てる。
\t\t\t function fnSetClassCategories(form, classcat_id2_selected) {
\t\t\t var \$form = \$(form);
\t\t\t var product_id = \$form.find('input[name=product_id]').val();
\t\t\t var \$sele1 = \$form.find('select[name=classcategory_id1]');
\t\t\t var \$sele2 = \$form.find('select[name=classcategory_id2]');
\t\t\t eccube.setClassCategories(\$form, product_id, \$sele1, \$sele2, classcat_id2_selected);
\t\t\t }
\t\t\t
\t\t\t ";
// line 111
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id2", [], "any", true, true, true, 111)) {
// line 112
echo "\t\t\t fnSetClassCategories(
\t\t\t \$('#form1'), ";
// line 113
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_id2", [], "any", false, false, true, 113), "vars", [], "any", false, false, true, 113), "value", [], "any", false, false, true, 113), 113, $this->source));
echo "
\t\t\t );
\t\t\t ";
} elseif (twig_get_attribute($this->env, $this->source, // line 115
($context["form"] ?? null), "classcategory_id1", [], "any", true, true, true, 115)) {
// line 116
echo "\t\t\t 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.', 116, $this->source); })()), "id", [], "any", false, false, true, 116), 116, $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.', 116, $this->source); })()), "classcategory_id1", [], "any", false, false, true, 116), "vars", [], "any", false, false, true, 116), "value", [], "any", false, false, true, 116), 116, $this->source));
echo ", null);
\t\t\t ";
}
// line 118
echo "\t\t\t </script>
\t <script>
\t\t\t \$(function() {
\t\t\t // bfcache無効化
\t\t\t \$(window).bind('pageshow', function(event) {
\t\t\t if (event.originalEvent.persisted) {
\t\t\t location.reload(true);
\t\t\t }
\t\t\t });
\t\t\t
\t\t\t // Core Web Vital の Cumulative Layout Shift(CLS)対策のため
\t\t\t // img タグに width, height が付与されている.
\t\t\t // 630px 未満の画面サイズでは縦横比が壊れるための対策
\t\t\t // see https://github.com/EC-CUBE/ec-cube/pull/5023
\t\t\t \$('.ec-grid2__cell').hide();
\t\t\t var removeSize = function () {
\t\t\t \$('.slide-item').height('');
\t\t\t \$('.slide-item img')
\t\t\t .removeAttr('width')
\t\t\t .removeAttr('height')
\t\t\t .removeAttr('style');
\t\t\t };
\t\t\t var slickInitial = function(slick) {
\t\t\t \$('.ec-grid2__cell').fadeIn(1500);
\t\t\t var baseHeight = \$(slick.target).height();
\t\t\t var baseWidth = \$(slick.target).width();
\t\t\t var rate = baseWidth / baseHeight;
\t\t\t
\t\t\t \$('.slide-item').height(baseHeight * rate); // 余白を削除する
\t\t\t // transform を使用することでCLSの影響を受けないようにする
\t\t\t \$('.slide-item img')
\t\t\t .css(
\t\t\t {
\t\t\t 'transform-origin': 'top left',
\t\t\t 'transform': 'scaleY(' + rate + ')',
\t\t\t 'transition': 'transform .1s'
\t\t\t }
\t\t\t );
\t\t\t // 正しいサイズに近くなったら属性を解除する
\t\t\t setTimeout(removeSize, 500);
\t\t\t };
\t\t\t \$('.item_visual').on('init', slickInitial);
\t\t\t // リサイズ時は CLS の影響を受けないため属性を解除する
\t\t\t \$(window).resize(removeSize);
\t\t\t \$('.item_visual').slick({
\t\t\t dots: false,
\t\t\t arrows: true,
\t adaptiveHeight: true,
\t\t\t prevArrow: '<img src=\"";
// line 166
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/icon-arrow-prev.png"), "html", null, true);
echo "\" class=\"slide-arrow prev-arrow detail-arrow\">',
\t\t\t nextArrow: '<img src=\"";
// line 167
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/icon-arrow-next.png"), "html", null, true);
echo "\" class=\"slide-arrow next-arrow detail-arrow\">',
\t\t
\t\t\t responsive: [{
\t\t\t breakpoint: 768,
\t\t\t settings: {
\t\t\t arrows: true,
\t\t\t }
\t\t\t }]
\t\t\t });
\t\t\t
\t\t\t \$('.slideThumb').on('click', function() {
\t\t\t var index = \$(this).attr('data-index');
\t\t\t \$('.item_visual').slick('slickGoTo', index, false);
\t\t\t })
\t\t\t });
\t\t\t </script>
\t <script>
\t\t\t \$(function() {
\t\t\t \$('.add-cart').on('click', function(event) {
\t\t\t ";
// line 186
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id1", [], "any", true, true, true, 186)) {
// line 187
echo "\t\t\t // 規格1フォームの必須チェック
\t\t\t if (\$('#classcategory_id1').val() == '__unselected' || \$('#classcategory_id1').val() == '') {
\t\t\t \$('#classcategory_id1')[0].setCustomValidity('";
// line 189
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("項目が選択されていません"), "html", null, true);
echo "');
\t\t\t return true;
\t\t\t } else {
\t\t\t \$('#classcategory_id1')[0].setCustomValidity('');
\t\t\t }
\t\t\t ";
}
// line 195
echo "\t\t\t
\t\t\t ";
// line 196
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id2", [], "any", true, true, true, 196)) {
// line 197
echo "\t\t\t // 規格2フォームの必須チェック
\t\t\t if (\$('#classcategory_id2').val() == '__unselected' || \$('#classcategory_id2').val() == '') {
\t\t\t \$('#classcategory_id2')[0].setCustomValidity('";
// line 199
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("項目が選択されていません"), "html", null, true);
echo "');
\t\t\t return true;
\t\t\t } else {
\t\t\t \$('#classcategory_id2')[0].setCustomValidity('');
\t\t\t }
\t\t\t ";
}
// line 205
echo "\t\t\t
\t\t\t // 個数フォームのチェック
\t\t\t if (\$('#quantity').val() < 1) {
\t\t\t \$('#quantity')[0].setCustomValidity('";
// line 208
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("1以上で入力してください。"), "html", null, true);
echo "');
\t\t\t return true;
\t\t\t } else {
\t\t\t \$('#quantity')[0].setCustomValidity('');
\t\t\t }
\t\t\t
\t\t\t event.preventDefault();
\t\t\t \$form = \$('#form1');
\t\t\t \$.ajax({
\t\t\t url: \$form.attr('action'),
\t\t\t type: \$form.attr('method'),
\t\t\t data: \$form.serialize(),
\t\t\t dataType: 'json',
\t\t\t beforeSend: function(xhr, settings) {
\t\t\t // Buttonを無効にする
\t\t\t \$('.add-cart').prop('disabled', true);
\t\t\t }
\t\t\t }).done(function(data) {
\t\t\t // レスポンス内のメッセージをalertで表示
\t\t\t \$.each(data.messages, function() {
\t\t\t \$('#ec-modal-header').text(this);
\t\t\t });
\t\t\t
\t\t\t \$('.ec-modal').show()
\t\t\t
\t\t\t // カートブロックを更新する
\t\t\t \$.ajax({
\t\t\t url: \"";
// line 235
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("block_cart");
echo "\",
\t\t\t type: 'GET',
\t\t\t dataType: 'html'
\t\t\t }).done(function(html) {
\t\t\t \$('.ec-headerRole__cart').html(html);
\t\t\t });
\t\t\t }).fail(function(data) {
\t\t\t alert('";
// line 242
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへの追加に失敗しました。"), "html", null, true);
echo "');
\t\t\t }).always(function(data) {
\t\t\t // Buttonを有効にする
\t\t\t \$('.add-cart').prop('disabled', false);
\t\t\t });
\t\t\t });
\t\t\t });
\t\t\t
\t\t\t \$('.ec-modal-wrap').on('click', function(e) {
\t\t\t // モーダル内の処理は外側にバブリングさせない
\t\t\t e.stopPropagation();
\t\t\t });
\t\t\t \$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
\t\t\t \$('.ec-modal').hide()
\t\t\t });
\t\t\t </script>
\t <script type=\"application/ld+json\">
\t\t\t {
\t\t\t \"@context\": \"https://schema.org/\",
\t\t\t \"@type\": \"Product\",
\t\t\t \"name\": \"";
// line 262
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.', 262, $this->source); })()), "name", [], "any", false, false, true, 262), 262, $this->source), "html", null, true);
echo "\",
\t\t\t \"image\": [
\t\t\t ";
// line 264
$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.', 264, $this->source); })()), "ProductImage", [], "any", false, false, true, 264));
$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 265
echo "\t\t\t \"";
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.', 265, $this->source); })()), "request", [], "any", false, false, true, 265), "schemeAndHttpHost", [], "any", false, false, true, 265), 265, $this->source), "html", null, true);
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->sandbox->ensureToStringAllowed($context["img"], 265, $this->source), "save_image"), "html", null, true);
echo "\"";
if ( !twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, true, 265)) {
echo ",";
}
// line 266
echo "\t\t\t
\t\t\t ";
$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 268
echo "\t\t\t \"";
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.', 268, $this->source); })()), "request", [], "any", false, false, true, 268), "schemeAndHttpHost", [], "any", false, false, true, 268), 268, $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 "\"
\t\t\t ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['img'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 270
echo "\t\t\t ],
\t\t\t \"description\": \"";
// line 271
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, 271)) ? (_twig_default_filter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, ($context["Product"] ?? null), "description_list", [], "any", false, false, true, 271), 271, $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.', 271, $this->source); })()), "description_detail", [], "any", false, false, true, 271), 271, $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.', 271, $this->source); })()), "description_detail", [], "any", false, false, true, 271))), ["
" => "", "
" => ""]), 0, 300), "html", null, true);
echo "\",
\t\t\t ";
// line 272
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.', 272, $this->source); })()), "code_min", [], "any", false, false, true, 272)) {
// line 273
echo "\t\t\t \"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.', 273, $this->source); })()), "code_min", [], "any", false, false, true, 273), 273, $this->source), "html", null, true);
echo "\",
\t\t\t ";
}
// line 275
echo "\t\t\t \"offers\": {
\t\t\t \"@type\": \"Offer\",
\t\t\t \"url\": \"";
// line 277
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.', 277, $this->source); })()), "id", [], "any", false, false, true, 277)]), "html", null, true);
echo "\",
\t\t\t \"priceCurrency\": \"";
// line 278
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.', 278, $this->source); })()), "currency", [], "any", false, false, true, 278), 278, $this->source), "html", null, true);
echo "\",
\t\t\t \"price\": ";
// line 279
((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.', 279, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, true, 279)) ? (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.', 279, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, true, 279), "html", null, true))) : (print (0)));
echo ",
\t\t\t \"availability\": \"";
// line 280
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.', 280, $this->source); })()), "stock_find", [], "any", false, false, true, 280)) ? ("InStock") : ("OutOfStock"));
echo "\"
\t\t\t }
\t\t\t }
\t\t\t </script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 286
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 287
echo "\t<div class=\"ec-productRole\">
\t\t<ol class=\"breadcrumb\" itemscope itemtype=\"https://schema.org/BreadcrumbList\">
\t\t\t<li itemprop=\"itemListElement\" itemscope itemtype=\"https://schema.org/ListItem\">
\t\t\t\t<a itemprop=\"item\" href=\"/\">
\t\t\t\t\t<span itemprop=\"name\">TOP</span>
\t\t\t\t</a>
\t\t\t\t<meta itemprop=\"position\" content=\"1\"/>
\t\t\t</li>
\t\t\t<li itemprop=\"itemListElement\" itemscope itemtype=\"https://schema.org/ListItem\">
\t\t\t\t\t\t";
// line 297
echo "\t\t\t\t<a itemprop=\"item\" 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, 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.', 297, $this->source); })()), "ProductCategories", [], "any", false, false, true, 297), 0, [], "array", false, false, true, 297), "Category", [], "any", false, false, true, 297), "id", [], "any", false, false, true, 297), 297, $this->source), "html", null, true);
echo "\">
\t\t\t\t\t<span itemprop=\"name\">";
// line 298
echo twig_escape_filter($this->env, $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, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 298, $this->source); })()), "ProductCategories", [], "any", false, false, true, 298), 0, [], "array", false, false, true, 298), "Category", [], "any", false, false, true, 298), "name", [], "any", false, false, true, 298), 298, $this->source), "html", null, true);
echo "</span>
\t\t\t\t</a>
\t\t\t\t<meta itemprop=\"position\" content=\"2\"/>
\t\t\t</li>
\t\t\t<li itemprop=\"itemListElement\" itemscope itemtype=\"https://schema.org/ListItem\">
\t\t\t\t";
// line 304
echo "\t\t\t\t\t<span itemprop=\"name\">";
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.', 304, $this->source); })()), "name", [], "any", false, false, true, 304), 304, $this->source), "html", null, true);
echo "</span>
\t\t\t\t";
// line 306
echo "\t\t\t\t<meta itemprop=\"position\" content=\"3\"/>
\t\t\t</li>
\t\t\t";
// line 314
echo "\t\t</ol>
\t\t<div class=\"ec-grid2\">
\t\t\t<div class=\"ec-grid2__cell\">
\t\t\t\t<div class=\"ec-sliderItemRole\">
\t\t\t\t\t<div class=\"item_visual\">
\t\t\t\t\t\t";
// line 320
$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.', 320, $this->source); })()), "ProductImage", [], "any", false, false, true, 320));
$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 321
echo "\t\t\t\t\t\t\t<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"], 321, $this->source), "save_image"), "html", null, true);
echo "\" alt=\"";
((twig_get_attribute($this->env, $this->source, $context["loop"], "first", [], "any", false, false, true, 321)) ? (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.', 321, $this->source); })()), "name", [], "any", false, false, true, 321), "html", null, true))) : (print ("")));
echo "\" width=\"550\" height=\"550\" ";
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, true, 321) > 1)) {
echo " loading=\"lazy\" ";
}
echo "></div>
\t\t\t\t\t\t";
$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 323
echo "\t\t\t\t\t\t\t<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, 323)) ? (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.', 323, $this->source); })()), "name", [], "any", false, false, true, 323), "html", null, true))) : (print ("")));
echo "\" width=\"550\" height=\"550\"></div>
\t\t\t\t\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ProductImage'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 325
echo "\t\t\t\t\t</div>
\t\t\t\t\t<div class=\"item_nav\">
\t\t\t\t\t\t";
// line 327
$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.', 327, $this->source); })()), "ProductImage", [], "any", false, false, true, 327));
$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 328
echo "\t\t\t\t\t\t\t<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, 328), 328, $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"], 328, $this->source), "save_image"), "html", null, true);
echo "\" alt=\"\" width=\"133\" height=\"133\" loading=\"lazy\"></div>
\t\t\t\t\t\t";
++$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 330
echo "\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t</div>
\t\t\t<div class=\"ec-grid2__cell\">
\t\t\t\t<div
\t\t\t\t\tclass=\"ec-productRole__profile ec-productRole__btn-relative\">
\t\t\t\t\t";
// line 337
echo "\t\t\t\t\t";
if (twig_get_attribute($this->env, $this->source, (isset($context["BaseInfo"]) || array_key_exists("BaseInfo", $context) ? $context["BaseInfo"] : (function () { throw new RuntimeError('Variable "BaseInfo" does not exist.', 337, $this->source); })()), "option_favorite_product", [], "any", false, false, true, 337)) {
// line 338
echo "\t\t\t\t\t\t<div class=\"ec-productRole__btn-wrapper\">
\t\t\t\t\t\t\t<form action=\"";
// line 339
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_add_favorite", ["id" => twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 339, $this->source); })()), "id", [], "any", false, false, true, 339)]), "html", null, true);
echo "\" method=\"post\">
\t\t\t\t\t\t\t\t<div class=\"ec-productRole__btn favorite-btn-wrapper\">
\t\t\t\t\t\t\t\t\t";
// line 341
if (((isset($context["is_favorite"]) || array_key_exists("is_favorite", $context) ? $context["is_favorite"] : (function () { throw new RuntimeError('Variable "is_favorite" does not exist.', 341, $this->source); })()) == false)) {
// line 342
echo "\t\t\t\t\t\t\t\t\t\t<button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--favorite\">
\t\t\t\t\t\t\t\t\t\t\t <img src=\"";
// line 343
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/Icon-heart.svg"), "html", null, true);
echo "\" alt=\"お気に入りに追加\">
\t\t\t\t\t\t\t\t\t\t</button>
\t\t\t\t\t\t\t\t\t";
} else {
// line 346
echo "\t\t\t\t\t\t\t\t\t\t<button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--favorite\" disabled=\"disabled\">
\t\t\t\t\t\t\t\t\t\t\t <img src=\"";
// line 347
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/Icon-heart-remove.svg"), "html", null, true);
echo "\" alt=\"お気に入りから削除\">
\t\t\t\t\t\t\t\t\t\t</button>
\t\t\t\t\t\t\t\t\t";
}
// line 350
echo "\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t</form>
\t\t\t\t\t\t</div>
\t\t\t\t\t";
}
// line 354
echo "\t\t\t\t\t";
// line 355
echo "\t\t\t\t\t<div class=\"ec-productRole__title\">
\t\t\t\t\t\t<h2 class=\"ec-headingTitle\">";
// line 356
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.', 356, $this->source); })()), "name", [], "any", false, false, true, 356), 356, $this->source), "html", null, true);
echo "</h2>
\t\t\t\t\t</div>
\t\t\t\t\t";
// line 359
echo "\t\t\t\t\t<ul class=\"ec-productRole__tags\">
\t\t\t\t\t\t";
// line 360
$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.', 360, $this->source); })()), "Tags", [], "any", false, false, true, 360));
foreach ($context['_seq'] as $context["_key"] => $context["Tag"]) {
// line 361
echo "\t\t\t\t\t\t\t<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, 361), 361, $this->source), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed($context["Tag"], 361, $this->source), "html", null, true);
echo "</li>
\t\t\t\t\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Tag'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 363
echo "\t\t\t\t\t</ul>
\t\t\t\t\t";
// line 365
echo "\t\t\t\t\t";
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.', 365, $this->source); })()), "hasProductClass", [], "any", false, false, true, 365)) {
// line 366
echo "<div class=\"ec-productRole__priceRegular\">
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ";
// line 367
if (( !(null === 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); })()), "getPrice01Min", [], "any", false, false, true, 367)) && (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); })()), "getPrice01IncTaxMin", [], "any", false, false, true, 367) == 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); })()), "getPrice01IncTaxMax", [], "any", false, false, true, 367)))) {
// line 368
echo "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <span class=\"ec-productRole__priceRegularPrice\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("通常価格"), "html", null, true);
echo ":<span class=\"price01-default\">";
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.', 368, $this->source); })()), "getPrice01IncTaxMin", [], "any", false, false, true, 368), 368, $this->source)), "html", null, true);
echo "</span></span>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <span class=\"ec-productRole__priceRegularTax\">(";
// line 369
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html", null, true);
echo ")</span>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ";
} elseif (( !(null === twig_get_attribute($this->env, $this->source, // line 370
(isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 370, $this->source); })()), "getPrice01Min", [], "any", false, false, true, 370)) && !(null === 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.', 370, $this->source); })()), "getPrice01Max", [], "any", false, false, true, 370)))) {
// line 371
echo "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <span class=\"ec-productRole__priceRegularPrice\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("通常価格"), "html", null, true);
echo ":<span class=\"price01-default\">";
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.', 371, $this->source); })()), "getPrice01IncTaxMin", [], "any", false, false, true, 371), 371, $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.', 371, $this->source); })()), "getPrice01IncTaxMax", [], "any", false, false, true, 371), 371, $this->source)), "html", null, true);
echo "</span></span>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <span class=\"ec-productRole__priceRegularTax\">(";
// line 372
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html", null, true);
echo ")</span>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ";
}
// line 374
echo "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t </div>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ";
} else {
// line 376
echo "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ";
if ( !(null === 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); })()), "getPrice01Max", [], "any", false, false, true, 376))) {
// line 377
echo "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <span class=\"ec-productRole__priceRegularPrice\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("通常価格"), "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.', 377, $this->source); })()), "getPrice01IncTaxMin", [], "any", false, false, true, 377), 377, $this->source)), "html", null, true);
echo "</span>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <span class=\"ec-productRole__priceRegularTax\">(";
// line 378
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html", null, true);
echo ")</span>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ";
}
// line 380
echo "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ";
}
// line 381
echo "\t\t\t\t\t";
// line 382
echo "\t\t\t\t\t\t<div class=\"ec-productRole__price\"> ";
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.', 382, $this->source); })()), "hasProductClass", [], "any", false, false, true, 382)) {
// line 383
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.', 383, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, true, 383) == 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); })()), "getPrice02IncTaxMax", [], "any", false, false, true, 383))) {
// line 384
echo "\t\t\t\t\t\t\t\t<div class=\"ec-price\">
\t\t\t\t\t\t\t\t\t<span class=\"ec-price__price price02-default\">";
// line 385
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.', 385, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, true, 385), 385, $this->source)), "html", null, true);
echo "</span>
\t\t\t\t\t\t\t\t\t<span class=\"ec-price__tax\">(";
// line 386
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html", null, true);
echo ")</span>
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t";
} else {
// line 389
echo "\t\t\t\t\t\t\t\t<div class=\"ec-price\">
\t\t\t\t\t\t\t\t\t<span class=\"ec-price__price price02-default\">";
// line 390
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.', 390, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, true, 390), 390, $this->source)), "html", null, true);
echo "
\t\t\t\t\t\t\t\t\t\t~
\t\t\t\t\t\t\t\t\t\t";
// line 392
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.', 392, $this->source); })()), "getPrice02IncTaxMax", [], "any", false, false, true, 392), 392, $this->source)), "html", null, true);
echo "</span>
\t\t\t\t\t\t\t\t\t<span class=\"ec-price__tax\">(";
// line 393
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html", null, true);
echo ")</span>
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t";
}
// line 396
echo "\t\t\t\t\t\t";
} else {
// line 397
echo "\t\t\t\t\t\t\t<div class=\"ec-price\">
\t\t\t\t\t\t\t\t<span class=\"ec-price__price\">";
// line 398
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.', 398, $this->source); })()), "getPrice02IncTaxMin", [], "any", false, false, true, 398), 398, $this->source)), "html", null, true);
echo "</span>
\t\t\t\t\t\t\t\t<span class=\"ec-price__tax\">(";
// line 399
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html", null, true);
echo ")</span>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t";
}
// line 402
echo "\t\t\t\t\t</div>
\t\t\t\t\t";
// line 404
echo "\t\t\t\t\t";
// line 409
echo "\t\t\t\t\t";
// line 410
echo "\t\t\t\t\t";
// line 425
echo "\t\t\t\t\t\t<form action=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_add_cart", ["id" => twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 425, $this->source); })()), "id", [], "any", false, false, true, 425)]), "html", null, true);
echo "\" method=\"post\" id=\"form1\" name=\"form1\"> ";
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.', 425, $this->source); })()), "stock_find", [], "any", false, false, true, 425)) {
// line 426
echo "\t\t\t\t\t\t\t<div class=\"ec-productRole__actions\">
\t\t\t\t\t\t\t\t";
// line 427
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id1", [], "any", true, true, true, 427)) {
// line 428
echo "\t\t\t\t\t\t\t\t\t<div class=\"ec-select\">
\t\t\t\t\t\t\t\t\t\t";
// line 429
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(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.', 429, $this->source); })()), "classcategory_id1", [], "any", false, false, true, 429), 429, $this->source), 'row');
echo "
\t\t\t\t\t\t\t\t\t\t";
// line 430
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(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.', 430, $this->source); })()), "classcategory_id1", [], "any", false, false, true, 430), 430, $this->source), 'errors');
echo "
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t";
// line 432
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id2", [], "any", true, true, true, 432)) {
// line 433
echo "\t\t\t\t\t\t\t\t\t\t<div class=\"ec-select\">
\t\t\t\t\t\t\t\t\t\t\t";
// line 434
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(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.', 434, $this->source); })()), "classcategory_id2", [], "any", false, false, true, 434), 434, $this->source), 'row');
echo "
\t\t\t\t\t\t\t\t\t\t\t";
// line 435
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(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.', 435, $this->source); })()), "classcategory_id2", [], "any", false, false, true, 435), 435, $this->source), 'errors');
echo "
\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t";
}
// line 438
echo "\t\t\t\t\t\t\t\t";
}
// line 439
echo "\t\t\t\t\t\t\t\t<div class=\"ec-numberInput\">
\t\t\t\t\t\t\t\t\t<span>";
// line 440
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("数量"), "html", null, true);
echo "</span>
\t\t\t\t\t\t\t\t\t";
// line 441
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(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.', 441, $this->source); })()), "quantity", [], "any", false, false, true, 441), 441, $this->source), 'widget');
echo "
\t\t\t\t\t\t\t\t\t";
// line 442
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(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.', 442, $this->source); })()), "quantity", [], "any", false, false, true, 442), 442, $this->source), 'errors');
echo "
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t<div class=\"ec-productRole__btn\">
\t\t\t\t\t\t\t\t<button type=\"submit\" class=\"ec-blockBtn--action add-cart\">
\t\t\t\t\t\t\t\t\t";
// line 447
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに入れる"), "html", null, true);
echo "
\t\t\t\t\t\t\t\t</button>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t";
} else {
// line 451
echo "\t\t\t\t\t\t\t<div class=\"ec-productRole__btn\">
\t\t\t\t\t\t\t\t<button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
\t\t\t\t\t\t\t\t\t";
// line 453
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ただいま品切れ中です。"), "html", null, true);
echo "
\t\t\t\t\t\t\t\t</button>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t";
}
// line 457
echo "\t\t\t\t\t\t";
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.', 457, $this->source); })()), 457, $this->source), 'rest');
echo "
\t\t\t\t\t</form>
\t\t\t\t\t<div class=\"ec-modal\">
\t\t\t\t\t\t<div class=\"ec-modal-overlay\">
\t\t\t\t\t\t\t<div class=\"ec-modal-wrap\">
\t\t\t\t\t\t\t\t<span class=\"ec-modal-close\">
\t\t\t\t\t\t\t\t\t<span class=\"ec-icon\"><img src=\"";
// line 463
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>
\t\t\t\t\t\t\t\t</span>
\t\t\t\t\t\t\t\t<div id=\"ec-modal-header\" class=\"text-center\">";
// line 465
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに追加しました。"), "html", null, true);
echo "</div>
\t\t\t\t\t\t\t\t<div class=\"ec-modal-box\">
\t\t\t\t\t\t\t\t\t<div class=\"ec-role\">
\t\t\t\t\t\t\t\t\t\t<span class=\"ec-inlineBtn--cancel\">";
// line 468
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お買い物を続ける"), "html", null, true);
echo "</span>
\t\t\t\t\t\t\t\t\t\t<a href=\"";
// line 469
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("cart");
echo "\" class=\"ec-inlineBtn--action\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへ進む"), "html", null, true);
echo "</a>
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t\t";
// line 490
echo "\t\t\t\t\t<div class=\"ec-productRole__description\">";
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.', 490, $this->source); })()), "description_detail", [], "any", false, false, true, 490), 490, $this->source));
echo "
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t</div>
\t\t</div>
\t\t";
// line 495
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.', 495, $this->source); })()), "freearea", [], "any", false, false, true, 495)) {
// line 496
echo "\t\t\t<div class=\"ec-productRole__description\">
\t\t\t\t";
// line 497
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.', 497, $this->source); })()), "freearea", [], "any", false, false, true, 497), 497, $this->source)), array(), true, false, true);
echo "
\t\t\t</div>
\t\t";
}
// line 500
echo "\t</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 ( 964 => 500, 958 => 497, 955 => 496, 953 => 495, 944 => 490, 933 => 469, 929 => 468, 923 => 465, 918 => 463, 908 => 457, 901 => 453, 897 => 451, 890 => 447, 882 => 442, 878 => 441, 874 => 440, 871 => 439, 868 => 438, 862 => 435, 858 => 434, 855 => 433, 853 => 432, 848 => 430, 844 => 429, 841 => 428, 839 => 427, 836 => 426, 831 => 425, 829 => 410, 827 => 409, 825 => 404, 822 => 402, 816 => 399, 812 => 398, 809 => 397, 806 => 396, 800 => 393, 796 => 392, 791 => 390, 788 => 389, 782 => 386, 778 => 385, 775 => 384, 773 => 383, 770 => 382, 768 => 381, 765 => 380, 760 => 378, 753 => 377, 750 => 376, 746 => 374, 741 => 372, 732 => 371, 730 => 370, 726 => 369, 719 => 368, 717 => 367, 714 => 366, 711 => 365, 708 => 363, 697 => 361, 693 => 360, 690 => 359, 685 => 356, 682 => 355, 680 => 354, 674 => 350, 668 => 347, 665 => 346, 659 => 343, 656 => 342, 654 => 341, 649 => 339, 646 => 338, 643 => 337, 635 => 330, 616 => 328, 599 => 327, 595 => 325, 584 => 323, 562 => 321, 544 => 320, 536 => 314, 532 => 306, 527 => 304, 519 => 298, 512 => 297, 501 => 287, 491 => 286, 476 => 280, 472 => 279, 468 => 278, 464 => 277, 460 => 275, 454 => 273, 452 => 272, 447 => 271, 444 => 270, 434 => 268, 420 => 266, 412 => 265, 394 => 264, 389 => 262, 366 => 242, 356 => 235, 326 => 208, 321 => 205, 312 => 199, 308 => 197, 306 => 196, 303 => 195, 294 => 189, 290 => 187, 288 => 186, 266 => 167, 262 => 166, 212 => 118, 204 => 116, 202 => 115, 197 => 113, 194 => 112, 192 => 111, 178 => 100, 166 => 99, 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 %}
\t<style>
\t.ec-price .ec-price__price {
margin-top: 0!important;
}
span.ec-productRole__priceRegularPrice {
text-decoration: line-through;
}
\t\t.slick-slider {
\t\t\tmargin-bottom: 30px;
\t\t}
\t\t.slick-dots {
\t\t\tposition: absolute;
\t\t\tbottom: -45px;
\t\t\tdisplay: block;
\t\t\twidth: 100%;
\t\t\tpadding: 0;
\t\t\tlist-style: none;
\t\t\ttext-align: center;
\t\t}
\t\t.slick-dots li {
\t\t\tposition: relative;
\t\t\tdisplay: inline-block;
\t\t\twidth: 20px;
\t\t\theight: 20px;
\t\t\tmargin: 0 5px;
\t\t\tpadding: 0;
\t\t\tcursor: pointer;
\t\t}
\t\t.slick-dots li button {
\t\t\tfont-size: 0;
\t\t\tline-height: 0;
\t\t\tdisplay: block;
\t\t\twidth: 20px;
\t\t\theight: 20px;
\t\t\tpadding: 5px;
\t\t\tcursor: pointer;
\t\t\tcolor: transparent;
\t\t\tborder: 0;
\t\t\toutline: none;
\t\t\tbackground: transparent;
\t\t}
\t\t.slick-dots li button:hover,
\t\t.slick-dots li button:focus {
\t\t\toutline: none;
\t\t}
\t\t.slick-dots li button:hover:before,
\t\t.slick-dots li button:focus:before {
\t\t\topacity: 1;
\t\t}
\t\t.slick-dots li button:before {
\t\t\tcontent: \" \";
\t\t\tline-height: 20px;
\t\t\tposition: absolute;
\t\t\ttop: 0;
\t\t\tleft: 0;
\t\t\twidth: 12px;
\t\t\theight: 12px;
\t\t\ttext-align: center;
\t\t\topacity: .25;
\t\t\tbackground-color: black;
\t\t\tborder-radius: 50%;
\t\t}
\t\t.slick-dots li.slick-active button:before {
\t\t\topacity: .75;
\t\t\tbackground-color: black;
\t\t}
\t\t.slick-dots li button.thumbnail img {
\t\t\twidth: 0;
\t\t\theight: 0;
\t\t}
\t</style>
{% endblock %}
{% block javascript %} <script>
\t\t\t eccube.classCategories = {{ class_categories_as_json(Product)|raw }};
\t\t\t
\t\t\t // 規格2に選択肢を割り当てる。
\t\t\t function fnSetClassCategories(form, classcat_id2_selected) {
\t\t\t var \$form = \$(form);
\t\t\t var product_id = \$form.find('input[name=product_id]').val();
\t\t\t var \$sele1 = \$form.find('select[name=classcategory_id1]');
\t\t\t var \$sele2 = \$form.find('select[name=classcategory_id2]');
\t\t\t eccube.setClassCategories(\$form, product_id, \$sele1, \$sele2, classcat_id2_selected);
\t\t\t }
\t\t\t
\t\t\t {% if form.classcategory_id2 is defined %}
\t\t\t fnSetClassCategories(
\t\t\t \$('#form1'), {{ form.classcategory_id2.vars.value|json_encode|raw }}
\t\t\t );
\t\t\t {% elseif form.classcategory_id1 is defined %}
\t\t\t eccube.checkStock(\$('#form1'), {{ Product.id }}, {{ form.classcategory_id1.vars.value|json_encode|raw }}, null);
\t\t\t {% endif %}
\t\t\t </script>
\t <script>
\t\t\t \$(function() {
\t\t\t // bfcache無効化
\t\t\t \$(window).bind('pageshow', function(event) {
\t\t\t if (event.originalEvent.persisted) {
\t\t\t location.reload(true);
\t\t\t }
\t\t\t });
\t\t\t
\t\t\t // Core Web Vital の Cumulative Layout Shift(CLS)対策のため
\t\t\t // img タグに width, height が付与されている.
\t\t\t // 630px 未満の画面サイズでは縦横比が壊れるための対策
\t\t\t // see https://github.com/EC-CUBE/ec-cube/pull/5023
\t\t\t \$('.ec-grid2__cell').hide();
\t\t\t var removeSize = function () {
\t\t\t \$('.slide-item').height('');
\t\t\t \$('.slide-item img')
\t\t\t .removeAttr('width')
\t\t\t .removeAttr('height')
\t\t\t .removeAttr('style');
\t\t\t };
\t\t\t var slickInitial = function(slick) {
\t\t\t \$('.ec-grid2__cell').fadeIn(1500);
\t\t\t var baseHeight = \$(slick.target).height();
\t\t\t var baseWidth = \$(slick.target).width();
\t\t\t var rate = baseWidth / baseHeight;
\t\t\t
\t\t\t \$('.slide-item').height(baseHeight * rate); // 余白を削除する
\t\t\t // transform を使用することでCLSの影響を受けないようにする
\t\t\t \$('.slide-item img')
\t\t\t .css(
\t\t\t {
\t\t\t 'transform-origin': 'top left',
\t\t\t 'transform': 'scaleY(' + rate + ')',
\t\t\t 'transition': 'transform .1s'
\t\t\t }
\t\t\t );
\t\t\t // 正しいサイズに近くなったら属性を解除する
\t\t\t setTimeout(removeSize, 500);
\t\t\t };
\t\t\t \$('.item_visual').on('init', slickInitial);
\t\t\t // リサイズ時は CLS の影響を受けないため属性を解除する
\t\t\t \$(window).resize(removeSize);
\t\t\t \$('.item_visual').slick({
\t\t\t dots: false,
\t\t\t arrows: true,
\t adaptiveHeight: true,
\t\t\t prevArrow: '<img src=\"{{ asset('assets/img/icon-arrow-prev.png') }}\" class=\"slide-arrow prev-arrow detail-arrow\">',
\t\t\t nextArrow: '<img src=\"{{ asset('assets/img/icon-arrow-next.png') }}\" class=\"slide-arrow next-arrow detail-arrow\">',
\t\t
\t\t\t responsive: [{
\t\t\t breakpoint: 768,
\t\t\t settings: {
\t\t\t arrows: true,
\t\t\t }
\t\t\t }]
\t\t\t });
\t\t\t
\t\t\t \$('.slideThumb').on('click', function() {
\t\t\t var index = \$(this).attr('data-index');
\t\t\t \$('.item_visual').slick('slickGoTo', index, false);
\t\t\t })
\t\t\t });
\t\t\t </script>
\t <script>
\t\t\t \$(function() {
\t\t\t \$('.add-cart').on('click', function(event) {
\t\t\t {% if form.classcategory_id1 is defined %}
\t\t\t // 規格1フォームの必須チェック
\t\t\t if (\$('#classcategory_id1').val() == '__unselected' || \$('#classcategory_id1').val() == '') {
\t\t\t \$('#classcategory_id1')[0].setCustomValidity('{{ '項目が選択されていません'|trans }}');
\t\t\t return true;
\t\t\t } else {
\t\t\t \$('#classcategory_id1')[0].setCustomValidity('');
\t\t\t }
\t\t\t {% endif %}
\t\t\t
\t\t\t {% if form.classcategory_id2 is defined %}
\t\t\t // 規格2フォームの必須チェック
\t\t\t if (\$('#classcategory_id2').val() == '__unselected' || \$('#classcategory_id2').val() == '') {
\t\t\t \$('#classcategory_id2')[0].setCustomValidity('{{ '項目が選択されていません'|trans }}');
\t\t\t return true;
\t\t\t } else {
\t\t\t \$('#classcategory_id2')[0].setCustomValidity('');
\t\t\t }
\t\t\t {% endif %}
\t\t\t
\t\t\t // 個数フォームのチェック
\t\t\t if (\$('#quantity').val() < 1) {
\t\t\t \$('#quantity')[0].setCustomValidity('{{ '1以上で入力してください。'|trans }}');
\t\t\t return true;
\t\t\t } else {
\t\t\t \$('#quantity')[0].setCustomValidity('');
\t\t\t }
\t\t\t
\t\t\t event.preventDefault();
\t\t\t \$form = \$('#form1');
\t\t\t \$.ajax({
\t\t\t url: \$form.attr('action'),
\t\t\t type: \$form.attr('method'),
\t\t\t data: \$form.serialize(),
\t\t\t dataType: 'json',
\t\t\t beforeSend: function(xhr, settings) {
\t\t\t // Buttonを無効にする
\t\t\t \$('.add-cart').prop('disabled', true);
\t\t\t }
\t\t\t }).done(function(data) {
\t\t\t // レスポンス内のメッセージをalertで表示
\t\t\t \$.each(data.messages, function() {
\t\t\t \$('#ec-modal-header').text(this);
\t\t\t });
\t\t\t
\t\t\t \$('.ec-modal').show()
\t\t\t
\t\t\t // カートブロックを更新する
\t\t\t \$.ajax({
\t\t\t url: \"{{ url('block_cart') }}\",
\t\t\t type: 'GET',
\t\t\t dataType: 'html'
\t\t\t }).done(function(html) {
\t\t\t \$('.ec-headerRole__cart').html(html);
\t\t\t });
\t\t\t }).fail(function(data) {
\t\t\t alert('{{ 'カートへの追加に失敗しました。'|trans }}');
\t\t\t }).always(function(data) {
\t\t\t // Buttonを有効にする
\t\t\t \$('.add-cart').prop('disabled', false);
\t\t\t });
\t\t\t });
\t\t\t });
\t\t\t
\t\t\t \$('.ec-modal-wrap').on('click', function(e) {
\t\t\t // モーダル内の処理は外側にバブリングさせない
\t\t\t e.stopPropagation();
\t\t\t });
\t\t\t \$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
\t\t\t \$('.ec-modal').hide()
\t\t\t });
\t\t\t </script>
\t <script type=\"application/ld+json\">
\t\t\t {
\t\t\t \"@context\": \"https://schema.org/\",
\t\t\t \"@type\": \"Product\",
\t\t\t \"name\": \"{{ Product.name }}\",
\t\t\t \"image\": [
\t\t\t {% for img in Product.ProductImage %}
\t\t\t \"{{ app.request.schemeAndHttpHost }}{{ asset(img, 'save_image') }}\"{% if not loop.last %},{% endif %}
\t\t\t
\t\t\t {% else %}
\t\t\t \"{{ app.request.schemeAndHttpHost }}{{ asset(''|no_image_product, 'save_image') }}\"
\t\t\t {% endfor %}
\t\t\t ],
\t\t\t \"description\": \"{{ Product.description_list | default(Product.description_detail) | replace({'\\n': '', '\\r': ''}) | slice(0,300) }}\",
\t\t\t {% if Product.code_min %}
\t\t\t \"sku\": \"{{ Product.code_min }}\",
\t\t\t {% endif %}
\t\t\t \"offers\": {
\t\t\t \"@type\": \"Offer\",
\t\t\t \"url\": \"{{ url('product_detail', {'id': Product.id}) }}\",
\t\t\t \"priceCurrency\": \"{{ eccube_config.currency }}\",
\t\t\t \"price\": {{ Product.getPrice02IncTaxMin ? Product.getPrice02IncTaxMin : 0}},
\t\t\t \"availability\": \"{{ Product.stock_find ? \"InStock\" : \"OutOfStock\" }}\"
\t\t\t }
\t\t\t }
\t\t\t </script>
{% endblock %}
{% block main %}
\t<div class=\"ec-productRole\">
\t\t<ol class=\"breadcrumb\" itemscope itemtype=\"https://schema.org/BreadcrumbList\">
\t\t\t<li itemprop=\"itemListElement\" itemscope itemtype=\"https://schema.org/ListItem\">
\t\t\t\t<a itemprop=\"item\" href=\"/\">
\t\t\t\t\t<span itemprop=\"name\">TOP</span>
\t\t\t\t</a>
\t\t\t\t<meta itemprop=\"position\" content=\"1\"/>
\t\t\t</li>
\t\t\t<li itemprop=\"itemListElement\" itemscope itemtype=\"https://schema.org/ListItem\">
\t\t\t\t\t\t{# パンくずリストの中でカテゴリーのURLを表示 #}
\t\t\t\t<a itemprop=\"item\" href=\"{{ url('product_list') }}?category_id={{ Product.ProductCategories[0].Category.id }}\">
\t\t\t\t\t<span itemprop=\"name\">{{ Product.ProductCategories[0].Category.name }}</span>
\t\t\t\t</a>
\t\t\t\t<meta itemprop=\"position\" content=\"2\"/>
\t\t\t</li>
\t\t\t<li itemprop=\"itemListElement\" itemscope itemtype=\"https://schema.org/ListItem\">
\t\t\t\t{# <a itemprop=\"item\" href=\"{{ url('product_list') }}?category_id={{ Product.ProductCategories[0].Category.id }}\"> #}
\t\t\t\t\t<span itemprop=\"name\">{{ Product.name }}</span>
\t\t\t\t{# </a> #}
\t\t\t\t<meta itemprop=\"position\" content=\"3\"/>
\t\t\t</li>
\t\t\t{# <li itemprop=\"itemListElement\" itemscope itemtype=\"https://schema.org/ListItem\">
\t\t\t\t\t\t\t\t\t <a itemprop=\"item\" href=\"カテゴリー2のURL\">
\t\t\t\t\t\t\t\t\t <span itemprop=\"name\">商品詳細</span>
\t\t\t\t\t\t\t\t\t </a>
\t\t\t\t\t\t\t\t\t <meta itemprop=\"position\" content=\"3\" />
\t\t\t\t\t\t\t\t\t </li> #}
\t\t</ol>
\t\t<div class=\"ec-grid2\">
\t\t\t<div class=\"ec-grid2__cell\">
\t\t\t\t<div class=\"ec-sliderItemRole\">
\t\t\t\t\t<div class=\"item_visual\">
\t\t\t\t\t\t{% for ProductImage in Product.ProductImage %}
\t\t\t\t\t\t\t<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>
\t\t\t\t\t\t{% else %}
\t\t\t\t\t\t\t<div class=\"slide-item\"><img src=\"{{ asset(''|no_image_product, 'save_image') }}\" alt=\"{{ loop.first ? Product.name : '' }}\" width=\"550\" height=\"550\"></div>
\t\t\t\t\t\t{% endfor %}
\t\t\t\t\t</div>
\t\t\t\t\t<div class=\"item_nav\">
\t\t\t\t\t\t{% for ProductImage in Product.ProductImage %}
\t\t\t\t\t\t\t<div class=\"slideThumb\" data-index=\"{{ loop.index0 }}\"><img src=\"{{ asset(ProductImage, 'save_image') }}\" alt=\"\" width=\"133\" height=\"133\" loading=\"lazy\"></div>
\t\t\t\t\t\t{% endfor %}
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t</div>
\t\t\t<div class=\"ec-grid2__cell\">
\t\t\t\t<div
\t\t\t\t\tclass=\"ec-productRole__profile ec-productRole__btn-relative\">
\t\t\t\t\t{# お気に入りボタン #}
\t\t\t\t\t{% if BaseInfo.option_favorite_product %}
\t\t\t\t\t\t<div class=\"ec-productRole__btn-wrapper\">
\t\t\t\t\t\t\t<form action=\"{{ url('product_add_favorite', {id:Product.id}) }}\" method=\"post\">
\t\t\t\t\t\t\t\t<div class=\"ec-productRole__btn favorite-btn-wrapper\">
\t\t\t\t\t\t\t\t\t{% if is_favorite == false %}
\t\t\t\t\t\t\t\t\t\t<button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--favorite\">
\t\t\t\t\t\t\t\t\t\t\t <img src=\"{{ asset('assets/img/Icon-heart.svg') }}\" alt=\"お気に入りに追加\">
\t\t\t\t\t\t\t\t\t\t</button>
\t\t\t\t\t\t\t\t\t{% else %}
\t\t\t\t\t\t\t\t\t\t<button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--favorite\" disabled=\"disabled\">
\t\t\t\t\t\t\t\t\t\t\t <img src=\"{{ asset('assets/img/Icon-heart-remove.svg') }}\" alt=\"お気に入りから削除\">
\t\t\t\t\t\t\t\t\t\t</button>
\t\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t</form>
\t\t\t\t\t\t</div>
\t\t\t\t\t{% endif %}
\t\t\t\t\t{# 商品名 #}
\t\t\t\t\t<div class=\"ec-productRole__title\">
\t\t\t\t\t\t<h2 class=\"ec-headingTitle\">{{ Product.name }}</h2>
\t\t\t\t\t</div>
\t\t\t\t\t{# タグ #}
\t\t\t\t\t<ul class=\"ec-productRole__tags\">
\t\t\t\t\t\t{% for Tag in Product.Tags %}
\t\t\t\t\t\t\t<li class=\"ec-productRole__tag tag_{{ Tag.id }}\">{{ Tag }}</li>
\t\t\t\t\t\t{% endfor %}
\t\t\t\t\t</ul>
\t\t\t\t\t{# 通常価格 #}
\t\t\t\t\t{% if Product.hasProductClass -%}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <div class=\"ec-productRole__priceRegular\">
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t {% if Product.getPrice01Min is not null and Product.getPrice01IncTaxMin == Product.getPrice01IncTaxMax %}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <span class=\"ec-productRole__priceRegularPrice\">{{ '通常価格'|trans }}:<span class=\"price01-default\">{{ Product.getPrice01IncTaxMin|price }}</span></span>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <span class=\"ec-productRole__priceRegularTax\">({{ '税込'|trans }})</span>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t {% elseif Product.getPrice01Min is not null and Product.getPrice01Max is not null %}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <span class=\"ec-productRole__priceRegularPrice\">{{ '通常価格'|trans }}:<span class=\"price01-default\">{{ Product.getPrice01IncTaxMin|price }}~ {{ Product.getPrice01IncTaxMax|price }}</span></span>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <span class=\"ec-productRole__priceRegularTax\">({{ '税込'|trans }})</span>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t {% endif %}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t </div>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t {% else %}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t {% if Product.getPrice01Max is not null %}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <span class=\"ec-productRole__priceRegularPrice\">{{ '通常価格'|trans }}:{{ Product.getPrice01IncTaxMin|price }}</span>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <span class=\"ec-productRole__priceRegularTax\">({{ '税込'|trans }})</span>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t {% endif %}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t {% endif %}
\t\t\t\t\t{# 販売価格 #}
\t\t\t\t\t\t<div class=\"ec-productRole__price\"> {% if Product.hasProductClass -%}
\t\t\t\t\t\t\t{% if Product.getPrice02IncTaxMin == Product.getPrice02IncTaxMax %}
\t\t\t\t\t\t\t\t<div class=\"ec-price\">
\t\t\t\t\t\t\t\t\t<span class=\"ec-price__price price02-default\">{{ Product.getPrice02IncTaxMin|price }}</span>
\t\t\t\t\t\t\t\t\t<span class=\"ec-price__tax\">({{ '税込'|trans }})</span>
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t{% else %}
\t\t\t\t\t\t\t\t<div class=\"ec-price\">
\t\t\t\t\t\t\t\t\t<span class=\"ec-price__price price02-default\">{{ Product.getPrice02IncTaxMin|price }}
\t\t\t\t\t\t\t\t\t\t~
\t\t\t\t\t\t\t\t\t\t{{ Product.getPrice02IncTaxMax|price }}</span>
\t\t\t\t\t\t\t\t\t<span class=\"ec-price__tax\">({{ '税込'|trans }})</span>
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t{% else %}
\t\t\t\t\t\t\t<div class=\"ec-price\">
\t\t\t\t\t\t\t\t<span class=\"ec-price__price\">{{ Product.getPrice02IncTaxMin|price }}</span>
\t\t\t\t\t\t\t\t<span class=\"ec-price__tax\">({{ '税込'|trans }})</span>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t{% endif %}
\t\t\t\t\t</div>
\t\t\t\t\t{# 商品コード #}
\t\t\t\t\t{#{% if Product.code_min is not empty %}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <div class=\"ec-productRole__code\">
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t {{ '商品コード'|trans }}: <span class=\"product-code-default\">{{ Product.code_min }}{% if Product.code_min != Product.code_max %} ~ {{ Product.code_max }}{% endif %}</span>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t </div>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t {% endif %}#}
\t\t\t\t\t{# 関連カテゴリ #}
\t\t\t\t\t{#{% if Product.ProductCategories is not empty %}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <div class=\"ec-productRole__category\">
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <div>{{ '関連カテゴリ'|trans }}</div>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t {% for ProductCategory in Product.ProductCategories %}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <ul>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <li>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t {% for Category in ProductCategory.Category.path %}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <a href=\"{{ url('product_list') }}?category_id={{ Category.id }}\">{{ Category.name }}</a> {%- if loop.last == false %}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <span>></span>{% endif -%}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t {% endfor %}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t </li>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t </ul>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t {% endfor %}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t </div>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t {% endif %}#}
\t\t\t\t\t\t<form action=\"{{ url('product_add_cart', {id:Product.id}) }}\" method=\"post\" id=\"form1\" name=\"form1\"> {% if Product.stock_find %}
\t\t\t\t\t\t\t<div class=\"ec-productRole__actions\">
\t\t\t\t\t\t\t\t{% if form.classcategory_id1 is defined %}
\t\t\t\t\t\t\t\t\t<div class=\"ec-select\">
\t\t\t\t\t\t\t\t\t\t{{ form_row(form.classcategory_id1) }}
\t\t\t\t\t\t\t\t\t\t{{ form_errors(form.classcategory_id1) }}
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t{% if form.classcategory_id2 is defined %}
\t\t\t\t\t\t\t\t\t\t<div class=\"ec-select\">
\t\t\t\t\t\t\t\t\t\t\t{{ form_row(form.classcategory_id2) }}
\t\t\t\t\t\t\t\t\t\t\t{{ form_errors(form.classcategory_id2) }}
\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t<div class=\"ec-numberInput\">
\t\t\t\t\t\t\t\t\t<span>{{ '数量'|trans }}</span>
\t\t\t\t\t\t\t\t\t{{ form_widget(form.quantity) }}
\t\t\t\t\t\t\t\t\t{{ form_errors(form.quantity) }}
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t<div class=\"ec-productRole__btn\">
\t\t\t\t\t\t\t\t<button type=\"submit\" class=\"ec-blockBtn--action add-cart\">
\t\t\t\t\t\t\t\t\t{{ 'カートに入れる'|trans }}
\t\t\t\t\t\t\t\t</button>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t{% else %}
\t\t\t\t\t\t\t<div class=\"ec-productRole__btn\">
\t\t\t\t\t\t\t\t<button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
\t\t\t\t\t\t\t\t\t{{ 'ただいま品切れ中です。'|trans }}
\t\t\t\t\t\t\t\t</button>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t{{ form_rest(form) }}
\t\t\t\t\t</form>
\t\t\t\t\t<div class=\"ec-modal\">
\t\t\t\t\t\t<div class=\"ec-modal-overlay\">
\t\t\t\t\t\t\t<div class=\"ec-modal-wrap\">
\t\t\t\t\t\t\t\t<span class=\"ec-modal-close\">
\t\t\t\t\t\t\t\t\t<span class=\"ec-icon\"><img src=\"{{ asset('assets/icon/cross-dark.svg') }}\" alt=\"\"/></span>
\t\t\t\t\t\t\t\t</span>
\t\t\t\t\t\t\t\t<div id=\"ec-modal-header\" class=\"text-center\">{{ 'カートに追加しました。'|trans }}</div>
\t\t\t\t\t\t\t\t<div class=\"ec-modal-box\">
\t\t\t\t\t\t\t\t\t<div class=\"ec-role\">
\t\t\t\t\t\t\t\t\t\t<span class=\"ec-inlineBtn--cancel\">{{ 'お買い物を続ける'|trans }}</span>
\t\t\t\t\t\t\t\t\t\t<a href=\"{{ url('cart') }}\" class=\"ec-inlineBtn--action\">{{ 'カートへ進む'|trans }}</a>
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t\t{#{% if BaseInfo.option_favorite_product %}
\t\t\t\t\t <form action=\"{{ url('product_add_favorite', {id:Product.id}) }}\" method=\"post\">
\t\t\t\t\t <div class=\"ec-productRole__btn\">
\t\t\t\t\t {% if is_favorite == false %}
\t\t\t\t\t <button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel\">
\t\t\t\t\t {{ 'お気に入りに追加'|trans }}
\t\t\t\t\t </button>
\t\t\t\t\t {% else %}
\t\t\t\t\t <button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel\"
\t\t\t\t\t disabled=\"disabled\">{{ 'お気に入りに追加済です。'|trans }}
\t\t\t\t\t </button>
\t\t\t\t\t {% endif %}
\t\t\t\t\t </div>
\t\t\t\t\t </form>
\t\t\t\t\t {% endif %}#}
\t\t\t\t\t<div class=\"ec-productRole__description\">{{ Product.description_detail|raw|nl2br }}
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t</div>
\t\t</div>
\t\t{% if Product.freearea %}
\t\t\t<div class=\"ec-productRole__description\">
\t\t\t\t{{ include(template_from_string(Product.freearea), sandboxed = true) }}
\t\t\t</div>
\t\t{% endif %}
\t</div>
{% endblock %}", "Product/detail.twig", "/home/c9635817/public_html/attrait-shop.com/app/template/default/Product/detail.twig");
}
public function checkSecurity()
{
static $tags = array("set" => 13, "if" => 111, "for" => 264);
static $filters = array("raw" => 100, "json_encode" => 113, "escape" => 116, "trans" => 189, "no_image_product" => 268, "slice" => 271, "replace" => 271, "default" => 271, "price" => 368, "nl2br" => 490);
static $functions = array("class_categories_as_json" => 100, "asset" => 166, "url" => 235, "form_row" => 429, "form_errors" => 430, "form_widget" => 441, "form_rest" => 457, "include" => 497, "template_from_string" => 497);
try {
$this->sandbox->checkSecurity(
['set', 'if', 'for'],
['raw', 'json_encode', 'escape', 'trans', 'no_image_product', 'slice', 'replace', 'default', 'price', 'nl2br'],
['class_categories_as_json', 'asset', 'url', 'form_row', 'form_errors', 'form_widget', 'form_rest', 'include', 'template_from_string'],
$this->source
);
} 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;
}
}
}