app/template/default/Product/detail.twig line 1

Open in your IDE?
  1. {#
  2. This file is part of EC-CUBE
  3. Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  4. http://www.ec-cube.co.jp/
  5. For the full copyright and license information, please view the LICENSE
  6. file that was distributed with this source code.
  7. #}
  8. {% extends 'default_frame.twig' %}
  9. {% set body_class = 'product_page' %}
  10. {% block stylesheet %}
  11.     <style>
  12.         .slick-slider {
  13.             margin-bottom: 30px;
  14.         }
  15.         .slick-dots {
  16.             position: absolute;
  17.             bottom: -45px;
  18.             display: block;
  19.             width: 100%;
  20.             padding: 0;
  21.             list-style: none;
  22.             text-align: center;
  23.         }
  24.         .slick-dots li {
  25.             position: relative;
  26.             display: inline-block;
  27.             width: 20px;
  28.             height: 20px;
  29.             margin: 0 5px;
  30.             padding: 0;
  31.             cursor: pointer;
  32.         }
  33.         .slick-dots li button {
  34.             font-size: 0;
  35.             line-height: 0;
  36.             display: block;
  37.             width: 20px;
  38.             height: 20px;
  39.             padding: 5px;
  40.             cursor: pointer;
  41.             color: transparent;
  42.             border: 0;
  43.             outline: none;
  44.             background: transparent;
  45.         }
  46.         .slick-dots li button:hover,
  47.         .slick-dots li button:focus {
  48.             outline: none;
  49.         }
  50.         .slick-dots li button:hover:before,
  51.         .slick-dots li button:focus:before {
  52.             opacity: 1;
  53.         }
  54.         .slick-dots li button:before {
  55.             content: " ";
  56.             line-height: 20px;
  57.             position: absolute;
  58.             top: 0;
  59.             left: 0;
  60.             width: 12px;
  61.             height: 12px;
  62.             text-align: center;
  63.             opacity: .25;
  64.             background-color: black;
  65.             border-radius: 50%;
  66.         }
  67.         .slick-dots li.slick-active button:before {
  68.             opacity: .75;
  69.             background-color: black;
  70.         }
  71.         .slick-dots li button.thumbnail img {
  72.             width: 0;
  73.             height: 0;
  74.         }
  75.     </style>
  76. {% endblock %}
  77. {% block javascript %}
  78.     <script>
  79.         eccube.classCategories = {{ class_categories_as_json(Product)|raw }};
  80.         // 規格2に選択肢を割り当てる。
  81.         function fnSetClassCategories(form, classcat_id2_selected) {
  82.             var $form = $(form);
  83.             var product_id = $form.find('input[name=product_id]').val();
  84.             var $sele1 = $form.find('select[name=classcategory_id1]');
  85.             var $sele2 = $form.find('select[name=classcategory_id2]');
  86.             eccube.setClassCategories($form, product_id, $sele1, $sele2, classcat_id2_selected);
  87.         }
  88.         {% if form.classcategory_id2 is defined %}
  89.         fnSetClassCategories(
  90.             $('#form1'), {{ form.classcategory_id2.vars.value|json_encode|raw }}
  91.         );
  92.         {% elseif form.classcategory_id1 is defined %}
  93.         eccube.checkStock($('#form1'), {{ Product.id }}, {{ form.classcategory_id1.vars.value|json_encode|raw }}, null);
  94.         {% endif %}
  95.     </script>
  96.     <script>
  97.         $(function() {
  98.             // bfcache無効化
  99.             $(window).bind('pageshow', function(event) {
  100.                 if (event.originalEvent.persisted) {
  101.                     location.reload(true);
  102.                 }
  103.             });
  104.             // Core Web Vital の Cumulative Layout Shift(CLS)対策のため
  105.             // img タグに width, height が付与されている.
  106.             // 630px 未満の画面サイズでは縦横比が壊れるための対策
  107.             // see https://github.com/EC-CUBE/ec-cube/pull/5023
  108.             $('.ec-grid2__cell').hide();
  109.             var removeSize = function () {
  110.                 $('.slide-item').height('');
  111.                 $('.slide-item img')
  112.                     .removeAttr('width')
  113.                     .removeAttr('height')
  114.                     .removeAttr('style');
  115.             };
  116.             var slickInitial = function(slick) {
  117.                 $('.ec-grid2__cell').fadeIn(1500);
  118.                 var baseHeight = $(slick.target).height();
  119.                 var baseWidth = $(slick.target).width();
  120.                 var rate = baseWidth / baseHeight;
  121.                 $('.slide-item').height(baseHeight * rate); // 余白を削除する
  122.                 // transform を使用することでCLSの影響を受けないようにする
  123.                 $('.slide-item img')
  124.                     .css(
  125.                         {
  126.                             'transform-origin': 'top left',
  127.                             'transform': 'scaleY(' + rate + ')',
  128.                             'transition': 'transform .1s'
  129.                         }
  130.                     );
  131.                 // 正しいサイズに近くなったら属性を解除する
  132.                 setTimeout(removeSize, 500);
  133.             };
  134.             $('.item_visual').on('init', slickInitial);
  135.             // リサイズ時は CLS の影響を受けないため属性を解除する
  136.             $(window).resize(removeSize);
  137.             $('.item_visual').slick({
  138.                 dots: false,
  139.                 arrows: false,
  140.                 responsive: [{
  141.                     breakpoint: 768,
  142.                     settings: {
  143.                         adaptiveHeight: true,
  144.                         dots: true,
  145.                         arrows: true,
  146.                         prevArrow: `<button type="button" class="slick-prev tes"><img src="{{ asset('assets/icon/prev.png') }}" alt="pre"></button>`,
  147.                         nextArrow: `<button type="button" class="slick-next tess"><img src="{{ asset('assets/icon/next.png') }}" alt="next"></button>`,
  148.                     }
  149.                 }]
  150.             });
  151.             $('.slideThumb').on('click', function() {
  152.                 var index = $(this).attr('data-index');
  153.                 $('.item_visual').slick('slickGoTo', index, false);
  154.             })
  155.         });
  156.     </script>
  157.     <script>
  158.         $(function() {
  159.             $('.add-cart').on('click', function(event) {
  160.                 {% if form.classcategory_id1 is defined %}
  161.                 // 規格1フォームの必須チェック
  162.                 if ($('#classcategory_id1').val() == '__unselected' || $('#classcategory_id1').val() == '') {
  163.                     $('#classcategory_id1')[0].setCustomValidity('{{ '項目が選択されていません'|trans }}');
  164.                     return true;
  165.                 } else {
  166.                     $('#classcategory_id1')[0].setCustomValidity('');
  167.                 }
  168.                 {% endif %}
  169.                 {% if form.classcategory_id2 is defined %}
  170.                 // 規格2フォームの必須チェック
  171.                 if ($('#classcategory_id2').val() == '__unselected' || $('#classcategory_id2').val() == '') {
  172.                     $('#classcategory_id2')[0].setCustomValidity('{{ '項目が選択されていません'|trans }}');
  173.                     return true;
  174.                 } else {
  175.                     $('#classcategory_id2')[0].setCustomValidity('');
  176.                 }
  177.                 {% endif %}
  178.                 // 個数フォームのチェック
  179.                 if ($('#quantity').val() < 1) {
  180.                     $('#quantity')[0].setCustomValidity('{{ '1以上で入力してください。'|trans }}');
  181.                     return true;
  182.                 } else {
  183.                     $('#quantity')[0].setCustomValidity('');
  184.                 }
  185.                 event.preventDefault();
  186.                 $form = $('#form1');
  187.                 $.ajax({
  188.                     url: $form.attr('action'),
  189.                     type: $form.attr('method'),
  190.                     data: $form.serialize(),
  191.                     dataType: 'json',
  192.                     beforeSend: function(xhr, settings) {
  193.                         // Buttonを無効にする
  194.                         $('.add-cart').prop('disabled', true);
  195.                     }
  196.                 }).done(function(data) {
  197.                     // レスポンス内のメッセージをalertで表示
  198.                     $.each(data.messages, function() {
  199.                         $('#ec-modal-header').text(this);
  200.                     });
  201.                     $('.ec-modal').show()
  202.                     // カートブロックを更新する
  203.                     $.ajax({
  204.                         url: "{{ url('block_cart') }}",
  205.                         type: 'GET',
  206.                         dataType: 'html'
  207.                     }).done(function(html) {
  208.                         $('.ec-headerRole__cart').html(html);
  209.                     });
  210.                 }).fail(function(data) {
  211.                     alert('{{ 'カートへの追加に失敗しました。'|trans }}');
  212.                 }).always(function(data) {
  213.                     // Buttonを有効にする
  214.                     $('.add-cart').prop('disabled', false);
  215.                 });
  216.             });
  217.         });
  218.         $('.ec-modal-wrap').on('click', function(e) {
  219.             // モーダル内の処理は外側にバブリングさせない
  220.             e.stopPropagation();
  221.         });
  222.         $('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
  223.             $('.ec-modal').hide()
  224.         });
  225.         $('.show_modal').on('click', function() {
  226.             const scrollTop = $(window).scrollTop() + 12;
  227.             const imgSrc = $(this).find('.image').attr('src');
  228.             $('.ec-modal-box-image img').attr('src', imgSrc);
  229.             $('.ec-modal-box-image').css('top', scrollTop + 'px').show();
  230.             $('.ec-modal-box-image-overlay').show();
  231.         });
  232.         $('.show_modal__sub_image').on('click', function() {
  233.             const scrollTop = $(window).scrollTop() + 12;
  234.             const newSrc = $(this).data('src');
  235.             $('.ec-modal-box-image img').attr('src', newSrc);
  236.             $('.ec-modal-box-image').css('top', scrollTop + 'px').show();
  237.             $('.ec-modal-box-image-overlay').show();
  238.         });
  239.         $('.icon-close').on('click', function(){
  240.             $('.ec-modal-box-image').hide();
  241.             $('.ec-modal-box-image-overlay').hide();
  242.         });
  243.         $('.ec-modal-box-image-overlay').on('click', function(){
  244.             $('.ec-modal-box-image').hide();
  245.             $(this).hide();
  246.         });
  247.         const urlToShare = encodeURIComponent(window.location.href);
  248.         $('.mixi').on("click", function (event) {
  249.             event.preventDefault();
  250.             const mixiURL = `https://mixi.jp/share.pl?u=${urlToShare}`;
  251.             window.open(mixiURL, "mixiShareWindow", "width=600, height=400, scrollbars=yes, resizable=yes");
  252.         });
  253.         $('.twitter').on("click", function (event) {
  254.             event.preventDefault();
  255.             let productName = $('#product-name').data('value');
  256.             const twitterURL = `https://twitter.com/intent/tweet?text=${productName}`;
  257.             window.open(twitterURL, "twitterShareWindow", "width=600, height=400, scrollbars=yes, resizable=yes");
  258.         });
  259.         $('.btn-action').on("click", function() {
  260.             $(this).closest('.main-item').find('.item__active').slideToggle()
  261.             if ($(this).attr("src").includes("btn_minus.png")) {
  262.                 $(this).attr("src", "{{ asset('assets/img/common/btn_plus.png') }}");
  263.             } else {
  264.                 $(this).attr("src", "{{ asset('assets/img/common/btn_minus.png') }}");
  265.             }
  266.         });
  267.     </script>
  268.     <script type="application/ld+json">
  269.     {
  270.         "@context": "https://schema.org/",
  271.         "@type": "Product",
  272.         "name": "{{ BaseInfo.shop_name ~ ' / ' ~ Product.papc3 ~ Product.name ~ Product.papc4 }}",
  273.         "image": [
  274.             {% for img in Product.ProductImage %}
  275.                 "{{ app.request.schemeAndHttpHost }}{{ asset(img, 'save_image') }}"{% if not loop.last %},{% endif %}
  276.             {% else %}
  277.                 "{{ app.request.schemeAndHttpHost }}{{ asset(''|no_image_product, 'save_image') }}"
  278.             {% endfor %}
  279.         ],
  280.         "description": "{{ Product.description_list | default(Product.description_detail) | replace({'\n': '', '\r': ''}) | slice(0,300) }}",
  281.         {% if Product.code_min %}
  282.         "sku": "{{ Product.code_min }}",
  283.         {% endif %}
  284.         "offers": {
  285.             "@type": "Offer",
  286.             "url": "{{ url('product_detail', {'id': Product.id}) }}",
  287.             "priceCurrency": "{{ eccube_config.currency }}",
  288.             "price": {{ Product.getPrice02IncTaxMin ? Product.getPrice02IncTaxMin : 0}},
  289.             "availability": "{{ Product.stock_find ? "InStock" : "OutOfStock" }}"
  290.         }
  291.     }
  292.     </script>
  293. {% endblock %}
  294. {% set GroupRelatedProduct = get_group_parent_product_by_id(Product.id) %}
  295. {% block main %}
  296.     <div class="ec-productRole custom-productDetail">
  297.         {# breadcumb #}
  298.         {% if Product.ProductCategories is not empty %}
  299.             {% for ProductCategory in Product.ProductCategories %}
  300.             {% if Product.ProductCategories|length == 1 or ProductCategory.Category.path|length >= 2 %}
  301.                 <div class="ec-breadcrumb">
  302.                     <a href="{{ url('homepage') }}">Home</a>
  303.                     <span> ></span>
  304.                     {% for Category in ProductCategory.Category.path %}
  305.                         {% if Category.id == 1 %}
  306.                         <a href="/rock/">{{ Category.name }}</a> 
  307.                         {% else %}
  308.                         <a href="{{ url('product_list') }}?category_id={{ Category.id }}">{{ Category.name }}</a> 
  309.                         {% endif %}
  310.                         {%- if loop.last == false %}
  311.                             <span> ></span>
  312.                         {% endif -%}
  313.                     {% endfor %}
  314.                     {% if GroupRelatedProduct %}
  315.                     {% set GroupProduct = GroupRelatedProduct.Product %}
  316.                     <span> ></span> <a href="{{ url('product_list') }}?group_id={{ GroupProduct.id }}">{{ GroupProduct.name }}</a> 
  317.                     {% endif %}
  318.                 </div>
  319.             {% endif %}
  320.             {% endfor %}
  321.         {% else %}
  322.             <div class="ec-breadcrumb">
  323.                 <a href="{{ url('homepage') }}">Home</a>
  324.             </div>
  325.         {% endif %}
  326.         {# end breadcumb #}
  327.         <div class="guide_title bold" id="product-name" data-value="{{ Product.papc3 }} {{ Product.name }}{{ Product.papc4 }} {{ Product.code_min }}{% if Product.code_min != Product.code_max %} ~ {{ Product.code_max }}{% endif %}">
  328.             {{ Product.papc3 }} {{ Product.getFirstArtist().name ?? '' }}{% if Product.getFirstArtist() is not null %}/{% endif %}{{ Product.name }}{{ Product.papc4 }}
  329.         </div>
  330.         {% if Product.papc12 %}
  331.             <div class="center mB20 banner">
  332.                 <img src="{{ Product.papc12 }}" alt="{{ Product.papc13 }}" class="maxw950" />
  333.             </div>
  334.         {% endif %}
  335.         <div class="pro-details_area1">
  336.             {{ Product.description_list|raw }}
  337.         </div>
  338.         <div class="pro-details_line"></div>
  339.         <div class="ec-grid2">
  340.             <div class="ec-grid2__cell">
  341.                 <div class="ec-sliderItemRole">
  342.                     <div class="list-image">
  343.                         {% for i in 1..10 %}
  344.                             {% set image = attribute(Product, 'sub_image' ~ i) %}
  345.                             {% set largeImage = attribute(Product, 'sub_large_image' ~ i) %}
  346.                             {% if image %}
  347.                                 <div class="image__item show_modal__sub_image" data-src="{{ asset(largeImage ?: image, 'save_image') }}">
  348.                                     <img class="image" src="{{ asset(image, 'save_image') }}" alt="Image Item" loading="lazy">
  349.                                 </div>
  350.                             {% endif %}
  351.                         {% endfor %}
  352.                     </div>
  353.                     <div class="item_visual slide-mobile">
  354.                         {% for ProductImage in Product.ProductImage %}
  355.                             <div class="slide-item show_modal">
  356.                                 <img src="{{ asset('assets/img/common/btn_item_detail.png') }}" class="icon-detail" alt="Icon Detail">
  357.                                 <img src="{{ asset(ProductImage, 'save_image') }}" alt="{{ loop.first ? Product.name : '' }}" class="image" width="550" height="550"{% if loop.index > 1 %} loading="lazy"{% endif %}>
  358.                             </div>
  359.                         {% else %}
  360.                             <div class="slide-item show_modal">
  361.                                 <img src="{{ asset('assets/img/common/btn_item_detail.png') }}" class="icon-detail" alt="Icon Detail">
  362.                                 <img src="{{ asset(''|no_image_product, 'save_image') }}" alt="{{ loop.first ? Product.name : '' }}" class="image" width="550" height="550">
  363.                             </div>
  364.                         {% endfor %}
  365.                         {% for i in 1..10 %}
  366.                             {% set image = attribute(Product, 'sub_image' ~ i) %}
  367.                             {% set largeImage = attribute(Product, 'sub_large_image' ~ i) %}
  368.                             {% if image %}
  369.                                 <div class="slide-item show_modal only-mobile">
  370.                                     <img src="{{ asset(largeImage ?: image, 'save_image') }}" alt="{{ Product.name }}" class="image" width="550" height="550" loading="lazy">
  371.                                 </div>
  372.                             {% endif %}
  373.                         {% endfor %}
  374.                     </div>
  375.                     <div class="item_visual slide-pc">
  376.                         {% for ProductImage in Product.ProductImage %}
  377.                             <div class="slide-item show_modal">
  378.                                 <img src="{{ asset('assets/img/common/btn_item_detail.png') }}" class="icon-detail" alt="Icon Detail">
  379.                                 <img src="{{ asset(ProductImage, 'save_image') }}" alt="{{ loop.first ? Product.name : '' }}" class="image" width="550" height="550"{% if loop.index > 1 %} loading="lazy"{% endif %}>
  380.                             </div>
  381.                         {% else %}
  382.                             <div class="slide-item show_modal">
  383.                                 <img src="{{ asset('assets/img/common/btn_item_detail.png') }}" class="icon-detail" alt="Icon Detail">
  384.                                 <img src="{{ asset(''|no_image_product, 'save_image') }}" alt="{{ loop.first ? Product.name : '' }}" class="image" width="550" height="550">
  385.                             </div>
  386.                         {% endfor %}
  387.                     </div>
  388.                     <!-- <div class="item_nav">
  389.                         {% for ProductImage in Product.ProductImage %}
  390.                             <div class="slideThumb" data-index="{{ loop.index0 }}"><img src="{{ asset(ProductImage, 'save_image') }}" alt="" width="133" height="133" loading="lazy"></div>
  391.                         {% endfor %}
  392.                     </div> -->
  393.                 </div>
  394.             </div>
  395.             <div class="ec-grid2__cell">
  396.                 <div class="ec-productRole__profile">
  397.                     {# アーティスト #}
  398.                     {% if Product.getFirstArtist() is not null %}
  399.                         <span class="artist">
  400.                             <a href="{{ url('product_list') }}?artist_id={{Product.getFirstArtist().id}}">
  401.                             {{Product.getFirstArtist().name}}</a>
  402.                         </span>
  403.                     {% endif %}
  404.                     {# 商品名 #}
  405.                     <div class="ec-productRole__title">
  406.                         <h2 class="ec-headingTitle{% if Product.ProductStatusCusts|length <= 0 %} no-status-custs{% endif %}">{{ Product.name }}</h2>
  407.                     </div>
  408. {% set VisibleStatusItems = [] %}
  409. {% for StatusItem in Product.ProductStatusCusts %}
  410.     {% if StatusItem.Status.id != 13 %}
  411.         {% set VisibleStatusItems = VisibleStatusItems|merge([StatusItem]) %}
  412.     {% endif %}
  413. {% endfor %}
  414. {% if VisibleStatusItems|length > 0 %}
  415.     <ul class="ec-productRole__status">
  416.         {% for StatusItem in VisibleStatusItems %}
  417.             <li class="ec-productRole__status__item status_{{ StatusItem.Status.id }}">
  418.                 <span>
  419.                     {{ StatusItem.Status.name }}
  420.                 </span>
  421.             </li>
  422.         {% endfor %}
  423.     </ul>
  424. {% endif %}
  425.                     {# タグ #}
  426.                     {# <ul class="ec-productRole__tags">
  427.                         {% for Tag in Product.Tags %}
  428.                             <li class="ec-productRole__tag tag_{{ Tag.id }}">{{ Tag }}</li>
  429.                         {% endfor %}
  430.                     </ul> #}
  431.                     
  432.                     {# 商品形態 #}
  433.                     {% if Product.papc14 is not empty %}
  434.                     <div class="ec-productRole__jan">
  435.                         {{ '商品形態'|trans }} <span class="product-jan-default">{{ Product.papc14 }}</span>
  436.                     </div>
  437.                     {% endif %}
  438.                     {# 品番(商品コード) #}
  439.                     {% if Product.code_min is not empty %}
  440.                         <div class="ec-productRole__code">
  441.                             {{ '品番'|trans }} <span class="product-code-default">{{ Product.code_min }}{% if Product.code_min != Product.code_max %} ~ {{ Product.code_max }}{% endif %}</span>
  442.                         </div>
  443.                     {% endif %}
  444.                     {# JANコード #}
  445.                     {% if Product.comment1 is not empty %}
  446.                     <div class="ec-productRole__jan custom-ec-productRole__jan">
  447.                         {{ 'JANコード'|trans }} <span class="product-jan-default">{{ Product.comment1 }}</span>
  448.                     </div>
  449.                     {% endif %}
  450.                     {# 通常価格 #}
  451.                     {% if Product.hasProductClass -%}
  452.                         {% if Product.getPrice01Min is not null and Product.getPrice01IncTaxMin == Product.getPrice01IncTaxMax %}
  453.                             <div class="ec-productRole__priceRegular">
  454.                                 <span class="ec-productRole__priceRegularPrice"><span class="ec-productRole__price__label">{{ '通常価格'|trans }}</span><span class="price01-default product-jan-default1">{{ Product.getPrice01IncTaxMin|price|replace({' ': ''}) }}</span></span>
  455.                             </div>
  456.                         {% elseif Product.getPrice01Min is not null and Product.getPrice01Max is not null %}
  457.                             <div class="ec-productRole__priceRegular">
  458.                                 <span class="ec-productRole__priceRegularPrice"><span class="ec-productRole__price__label">{{ '通常価格'|trans }}</span><span class="price01-default product-jan-default1">{{ Product.getPrice01IncTaxMin|price|replace({' ': ''}) }}~ {{ Product.getPrice01IncTaxMax|price|replace({' ': ''}) }}</span></span>
  459.                             </div>
  460.                         {% endif %}
  461.                     {% else %}
  462.                         {% if Product.getPrice01Max is not null %}
  463.                             <span class="ec-productRole__priceRegularPrice"><span class="ec-productRole__price__label">{{ '通常価格'|trans }}</span><span class="price01-default product-jan-default1">{{ Product.getPrice01IncTaxMin|price|replace({' ': ''}) }}</span></span>
  464.                             <!-- <span class="ec-productRole__priceRegularTax">{{ '税込'|trans }}</span> -->
  465.                         {% endif %}
  466.                     {% endif %}
  467.                     {# 販売価格 #}
  468.                     {# {% if Product.ProductClasses.first().sale_type01 %}
  469.                         <div class="ec-productRole__jan">
  470.                             {{ '通常価格'|trans }} <span class="product-jan-default1">{{ Product.getPrice02IncTaxMin|number_format(0, '.', ',') }}円</span>
  471.                         </div>
  472.                         <div class="ec-productRole__price">
  473.                             <div class="ec-productRole__price__label">
  474.                                 価格
  475.                             </div>
  476.                             {% if Product.hasProductClass -%}
  477.                                 {% if Product.getPrice02IncTaxMin == Product.getPrice02IncTaxMax %}
  478.                                     {% set sale_price = Product.ProductClasses.first().sale_price + 0 %}
  479.                                     <div class="ec-price">
  480.                                         <span class="ec-price__price price02-default">
  481.                                             <s>{{ (sale_price * 1.1) | number_format(0, '.', ',') }}円</s>
  482.                                         </span>
  483.                                         <span class="ec-price__price price02-default tax-excluded-price1">
  484.                                             (税抜 {{ (sale_price) | number_format(0, '.', ',') }}円)
  485.                                         </span>
  486.                                     </div>
  487.                                 {% else %}
  488.                                     {% set sale_price = Product.ProductClasses.first().sale_price + 0 %}
  489.                                     <div class="ec-price">
  490.                                         <span class="ec-price__price price02-default">
  491.                                             <s>{{ (sale_price  * 1.1)}} ~ {{ (sale_price  * 1.1) | number_format(0, '.', ',') }}円</s>
  492.                                         </span>
  493.                                         <span class="ec-price__price price02-default tax-excluded-price1">
  494.                                             (税抜 {{ (sale_price)}} ~ {{ (sale_price) | number_format(0, '.', ',') }}円)
  495.                                         </span>
  496.                                     </div>
  497.                                 {% endif %}
  498.                             {% else %}
  499.                                 {% set sale_price = Product.ProductClasses.first().sale_price + 0 %}
  500.                                 <div class="ec-price">
  501.                                     <span class="ec-price__price">{{ (sale_price * 1.1) | number_format(0, '.', ',') }}円</span>
  502.                                     <span class="ec-price__price tax-excluded-price1">(税抜 {{ (sale_price) | number_format(0, '.', ',') }}円)</span>
  503.                                 </div>
  504.                             {% endif %}
  505.                         </div>
  506.                     {% else %} #}
  507.                         <div class="ec-productRole__price">
  508.                             <div class="ec-productRole__price__label">
  509.                                 価格
  510.                             </div>
  511.                             {% if Product.hasProductClass -%}
  512.                                 {% if Product.getPrice02IncTaxMin == Product.getPrice02IncTaxMax %}
  513.                                     <div class="ec-price">
  514.                                         <span class="ec-price__price price02-default">{{ Product.getPrice02IncTaxMin | number_format(0, '.', ',') }}円</span>
  515.                                         <span class="ec-price__price price02-default tax-excluded-price1">(税抜 {{ Product.getPrice02Min | number_format(0, '.', ',')}}円)</span>
  516.                                     </div>
  517.                                 {% else %}
  518.                                     <div class="ec-price">
  519.                                         <span class="ec-price__price price02-default">{{ Product.getPrice02IncTaxMin | number_format(0, '.', ',') }} ~ {{ Product.getPrice02IncTaxMax | number_format(0, '.', ',') }}円</span>
  520.                                         <span class="ec-price__price price02-default tax-excluded-price1">(税抜 {{ Product.getPrice02Min | number_format(0, '.', ',')}} ~ {{ Product.getPrice02Max | number_format(0, '.', ',')}}円)</span>
  521.                                     </div>
  522.                                 {% endif %}
  523.                             {% else %}
  524.                                 <div class="ec-price">
  525.                                     <span class="ec-price__price">{{ Product.getPrice02IncTaxMin | number_format(0, '.', ',')}}円</span>
  526.                                     <span class="ec-price__price tax-excluded-price1">(税抜 {{ Product.getPrice02Min | number_format(0, '.', ',')}}円)</span>
  527.                                 </div>
  528.                             {% endif %}
  529.                         </div>
  530.                     {# {% endif %} #}
  531.                     {# 関連カテゴリ #}
  532.                     {# {% if Product.ProductCategories is not empty %}
  533.                         <div class="ec-productRole__category">
  534.                             <div>{{ '関連カテゴリ'|trans }}</div>
  535.                             {% for ProductCategory in Product.ProductCategories %}
  536.                                 <ul>
  537.                                     <li>
  538.                                         {% for Category in ProductCategory.Category.path %}
  539.                                             <a href="{{ url('product_list') }}?category_id={{ Category.id }}">{{ Category.name }}</a> {%- if loop.last == false %}
  540.                                             <span>></span>{% endif -%}
  541.                                         {% endfor %}
  542.                                     </li>
  543.                                 </ul>
  544.                             {% endfor %}
  545.                         </div>
  546.                     {% endif %} #}
  547.                     <form action="{{ url('product_add_cart', {id:Product.id}) }}" method="post" id="form1" name="form1">
  548.                         {% if Product.stock_find %}
  549.                             <div class="ec-productRole__actions">
  550.                                 {% if form.classcategory_id1 is defined %}
  551.                                     <div class="ec-select">
  552.                                         {{ form_row(form.classcategory_id1) }}
  553.                                         {{ form_errors(form.classcategory_id1) }}
  554.                                     </div>
  555.                                     {% if form.classcategory_id2 is defined %}
  556.                                         <div class="ec-select">
  557.                                             {{ form_row(form.classcategory_id2) }}
  558.                                             {{ form_errors(form.classcategory_id2) }}
  559.                                         </div>
  560.                                     {% endif %}
  561.                                 {% endif %}
  562.                                 <div class="ec-numberInput"><span>{{ '数量'|trans }}</span>
  563.                                     {{ form_widget(form.quantity) }}
  564.                                     {{ form_errors(form.quantity) }}
  565.                                 </div>
  566.                             </div>
  567.                             <a class="guide" href="{{ url('guide_order') }}">※返品について必ずご確認ください</a>
  568.                             <div class="ec-productRole__btn">
  569.                                 <button type="submit" class="ec-blockBtn--action add-cart">
  570.                                     <!-- {{ 'カートに入れる'|trans }} -->
  571.                                     <img class="cart-pc" src="{{ asset('assets/img/common/btn_go_cart.jpg') }}"  alt="Btn Cart">
  572.                                     <div class="cart-mobile">
  573.                                         <img src="{{ asset('assets/img/common/btn--cart.png') }}"  alt="Cart">
  574.                                         カートへ入れる
  575.                                     </div>
  576.                                 </button>
  577.                             </div>
  578.                         {% else %}
  579.                             <a class="guide guide-sold-old" href="{{ url('guide_order') }}">※返品について必ずご確認ください</a>
  580.                             <div class="ec-productRole__btn">
  581.                                 <button type="button" class="ec-blockBtn--action disabled-button" disabled="disabled">
  582.                                     <!-- {{ 'ただいま品切れ中です。'|trans }} -->
  583.                                     <!-- <img src="{{ asset('assets/img/common/btn_go_cart.jpg') }}"  alt="Btn Cart"> -->
  584.                                     <span class="attention-empty">SOLD OUT</span>
  585.                                     <span class="attention-empty__mobile">申し訳ございませんが、只今品切れ中です。</span>
  586.                                 </button>
  587.                             </div>
  588.                         {% endif %}
  589.                         {{ form_rest(form) }}
  590.                     </form>
  591.                     <div class="ec-modal">
  592.                         <div class="ec-modal-overlay">
  593.                             <div class="ec-modal-wrap">
  594.                                 <span class="ec-modal-close"><span class="ec-icon"><img src="{{ asset('assets/icon/cross-dark.svg') }}" alt=""/></span></span>
  595.                                 <div id="ec-modal-header" class="text-center">{{ 'カートに追加しました。'|trans }}</div>
  596.                                 <div class="ec-modal-box">
  597.                                     <div class="ec-role">
  598.                                         <span class="ec-inlineBtn--cancel">{{ 'お買い物を続ける'|trans }}</span>
  599.                                         <a href="{{ url('cart') }}" class="ec-inlineBtn--action">{{ 'カートへ進む'|trans }}</a>
  600.                                     </div>
  601.                                 </div>
  602.                             </div>
  603.                         </div>
  604.                     </div>
  605.                     <!-- {% if BaseInfo.option_favorite_product %}
  606.                         <form action="{{ url('product_add_favorite', {id:Product.id}) }}" method="post">
  607.                             <div class="ec-productRole__btn">
  608.                                 {% if is_favorite == false %}
  609.                                     <button type="submit" id="favorite" class="ec-blockBtn--cancel">
  610.                                         {{ 'お気に入りに追加'|trans }}
  611.                                     </button>
  612.                                 {% else %}
  613.                                     <button type="submit" id="favorite" class="ec-blockBtn--cancel"
  614.                                             disabled="disabled">{{ 'お気に入りに追加済です。'|trans }}
  615.                                     </button>
  616.                                 {% endif %}
  617.                             </div>
  618.                         </form>
  619.                     {% endif %} -->
  620.                     <div class="share_social">
  621.                         <div class="twitter">
  622.                             <img src="{{ asset('assets/img/common/twitter-b.png') }}" alt="Icon Twitter">
  623.                         </div>
  624.                         <div class="facebook">
  625.                             <img src="{{ asset('assets/img/common/like.png') }}" alt="Icon Twitter">
  626.                             <span>いいね!0</span>
  627.                         </div>
  628.                         <div class="mixi">
  629.                             <img src="{{ asset('assets/img/common/icon-mixi.png') }}" alt="Icon Twitter">
  630.                         </div>
  631.                     </div>
  632.                 </div>
  633.             </div>
  634.         </div>
  635.         {# 別形態 #}
  636.         {% set GroupProductData = get_relared_product_by_id(Product.id) %}
  637.         {% if GroupProductData is not empty or Product.getFirstArtist() is not null %}
  638.             <div class="samegroup">
  639.                 {% if GroupProductData is not empty and GroupProductData['arrRecommendData']|length > 0 %}
  640.                     <div class="left-content">
  641.                         <div class="thumb">
  642.                             <img src="{{ asset(GroupProductData['group_main_list_image'], 'save_image') }}" class="image">
  643.                         </div>
  644.                         <div class="sametext">
  645.                             <p class="title__name">『{{ Product.name|e }}』別形態</p>
  646.                             <ul class="list-data">
  647.                                 {% for productItem in GroupProductData['arrRecommendData'] %}
  648.                                     <li>
  649.                                         <a href="{{ url('product_detail', {id: productItem.id}) }}">
  650.                                             {{ productItem.papc14 ? productItem.papc14|e : productItem.name }}
  651.                                     </a>
  652.                                     </li>
  653.                                 {% endfor %}
  654.                             </ul>
  655.                         </div>
  656.                     </div>
  657.                 {% endif %}
  658.                 {# 作品一覧 #}
  659.                 {% if Product.getFirstArtist() is not null %}
  660.                     <a class="right-content" href="{{ url('product_list') }}?artist_id={{Product.getFirstArtist().id}}">
  661.                         <div class="clickartist2"><b>{{Product.getFirstArtist().name}}</b> <span><br>作品一覧</span></div>
  662.                     </a>
  663.                 {% endif %}
  664.             </div>
  665.         {% endif %}
  666.         
  667.         <article class="s_title u_mar50 topmargin">
  668.             <section>
  669.                 <div class="u_mar50">
  670.                     <h4 class="s_title_left blue">
  671.                         商品説明 
  672.                         <span class="title">
  673.                             DETAIL
  674.                         </span>
  675.                     </h4>
  676.                     <!-- <div class="s_title_right gold"></div> -->
  677.                     <img src="{{ asset('assets/img/common/cat_line.jpg') }}" class="line_cart">
  678.                 </div>
  679.                 <div class="ec-productRole__description pro-deitals_subcomment content__mobile">
  680.                     {{ Product.description_detail|raw }}
  681.                 </div>
  682.             </section>
  683.         </article>
  684.         {% set lastIndex = null %}
  685.         {% for i in 1..10 if attribute(Product, 'sub_title_' ~ i)|trim is not empty or attribute(Product, 'sub_comment' ~ i)|trim is not empty %}
  686.             {% set lastIndex = i %}
  687.         {% endfor %}
  688.         {% for i in 1..10  %}
  689.             {% if attribute(Product, 'sub_title_' ~ i)|trim is not empty or attribute(Product, 'sub_comment' ~ i)|trim is not empty %}
  690.                 <div class="main-item">
  691.                     {% if i == lastIndex %}
  692.                         <div class="title__info">
  693.                             商品情報
  694.                             <img src="{{ asset('assets/img/common/btn_minus.png') }}" class="btn-action" alt="Btn Minus">
  695.                         </div>
  696.                     {% endif %}
  697.                     <div class="ec-productRole__description pro-deitals_subcomment item__active">
  698.                         <b>{{ attribute(Product, 'sub_title_' ~ i)|raw }}</b>
  699.                         {% if attribute(Product, 'sub_title_' ~ i)|trim is not empty %}
  700.                             <br>
  701.                         {% endif %}
  702.                         {{ attribute(Product, 'sub_comment' ~ i)|raw }}
  703.                     </div>
  704.                 </div>
  705.             {% endif %}
  706.         {% endfor %}
  707.         <div class="ec-modal-box-image-overlay"></div>
  708.         <div class="ec-modal-box-image">
  709.             <div class="icon-close">
  710.                 <i class="fa-solid fa-x"></i>
  711.             </div>
  712.             <div class="image-container">
  713.                 <img src="" alt="Image Detail">
  714.             </div>
  715.         </div>
  716.     </div>
  717. {% endblock %}