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.         .ec-modal {
  13.             display: none;
  14.             position: fixed;
  15.             top: 0;
  16.             left: 0;
  17.             z-index: 99999;
  18.             width: 100%;
  19.             height: 100%;
  20.         }
  21.         .ec-modal.small {
  22.             width: 30%;
  23.         }
  24.         .ec-modal.full {
  25.             width: 100%;
  26.             height: 100%;
  27.         }
  28.         .ec-modal .ec-modal-overlay {
  29.             display: flex;
  30.             justify-content: center;
  31.             align-items: center;
  32.             background-color: rgba(0, 0, 0, 0.3);
  33.             width: 100%;
  34.             height: 100%;
  35.         }
  36.         .ec-modal .ec-modal-wrap {
  37.             position: relative;
  38.             border-radius: 6px;
  39.             border: 0px;
  40.             background-color: #fff;
  41.             width: 50%;
  42.             margin: 20px;
  43.             padding: 40px 5px;
  44.         }
  45.         .ec-modal .ec-modal-close {
  46.             cursor: pointer;
  47.             position: absolute;
  48.             right: 20px;
  49.             top: 10px;
  50.             font-size: 20px;
  51.             height: 30px;
  52.             width: 20px;
  53.         }
  54.         .ec-modal .ec-modal-close:hover {
  55.             color: #4b5361;
  56.         }
  57.         .ec-modal .ec-modal-box {
  58.             text-align: center;
  59.         }
  60.         .ec-modal .ec-role {
  61.             margin-top: 20px;
  62.         }
  63.         
  64.    
  65.         .slick-slider {
  66.             margin-bottom: 30px;
  67.         }
  68.         .slick-dots {
  69.             position: absolute;
  70.             bottom: -45px;
  71.             display: block;
  72.             width: 100%;
  73.             padding: 0;
  74.             list-style: none;
  75.             text-align: center;
  76.         }
  77.         .slick-dots li {
  78.             position: relative;
  79.             display: inline-block;
  80.             width: 20px;
  81.             height: 20px;
  82.             margin: 0 5px;
  83.             padding: 0;
  84.             cursor: pointer;
  85.         }
  86.         .slick-dots li button {
  87.             font-size: 0;
  88.             line-height: 0;
  89.             display: block;
  90.             width: 20px;
  91.             height: 20px;
  92.             padding: 5px;
  93.             cursor: pointer;
  94.             color: transparent;
  95.             border: 0;
  96.             outline: none;
  97.             background: transparent;
  98.         }
  99.         .slick-dots li button:hover,
  100.         .slick-dots li button:focus {
  101.             outline: none;
  102.         }
  103.         .slick-dots li button:hover:before,
  104.         .slick-dots li button:focus:before {
  105.             opacity: 1;
  106.         }
  107.         .slick-dots li button:before {
  108.             content: " ";
  109.             line-height: 20px;
  110.             position: absolute;
  111.             top: 0;
  112.             left: 0;
  113.             width: 12px;
  114.             height: 12px;
  115.             text-align: center;
  116.             opacity: .25;
  117.             background-color: black;
  118.             border-radius: 50%;
  119.         }
  120.         .slick-dots li.slick-active button:before {
  121.             opacity: .75;
  122.             background-color: black;
  123.         }
  124.         .slick-dots li button.thumbnail img {
  125.             width: 0;
  126.             height: 0;
  127.         }
  128.         .ec-numberInput {
  129.             display: none;
  130.         }
  131.        
  132.         .ec-blockBtn--cancel {
  133.             display: inline-block;
  134.             margin-bottom: 0;
  135.             font-weight: bold;
  136.             text-align: center;
  137.             vertical-align: middle;
  138.             touch-action: manipulation;
  139.             cursor: pointer;
  140.             background-image: none;
  141.             border: 1px solid transparent;
  142.             white-space: nowrap;
  143.             padding: 6px 12px;
  144.             font-size: 0.875rem;
  145.             border-radius: 1.42857142;
  146.             -webkit-user-select: none;
  147.             -moz-user-select: none;
  148.             -ms-user-select: none;
  149.             user-select: none;
  150.             padding: 10px 16px;
  151.             text-decoration: none;
  152.             color: #fff;
  153.             background-color: #F8C4CF;
  154.             border-color: #F8C4CF;
  155.             display: block;
  156.             width: 330px;
  157.             height: 56px;
  158.             line-height: 56px;
  159.             padding-top: 0;
  160.             padding-bottom: 0;
  161.             border-radius: 6px;
  162.         }
  163.         .ec-blockBtn--cancel:hover {
  164.             opacity: 0.7;
  165.             background-color: #F8C4CF;
  166.             border-color: #F8C4CF;
  167.         }
  168.         .ec-blockBtn--action-detail {
  169.             display: inline-block;
  170.             margin-bottom: 0;
  171.             font-weight: bold;
  172.             text-align: center;
  173.             vertical-align: middle;
  174.             touch-action: manipulation;
  175.             cursor: pointer;
  176.             background-image: none;
  177.             border: 1px solid transparent;
  178.             white-space: nowrap;
  179.             padding: 6px 12px;
  180.             font-size: 0.875rem;
  181.             border-radius: 1.42857142;
  182.             -webkit-user-select: none;
  183.             -moz-user-select: none;
  184.             -ms-user-select: none;
  185.             user-select: none;
  186.             padding: 10px 16px;
  187.             text-decoration: none;
  188.             color: #fff;
  189.             background-color: #d5a770;
  190.             border-color: #d5a770;
  191.             display: block;
  192.             width: 330px;
  193.             height: 56px;
  194.             line-height: 56px;
  195.             padding-top: 0;
  196.             padding-bottom: 0;
  197.             border-radius: 6px;
  198.         }
  199.         .ec-blockBtn--action-detail:hover {
  200.             background-color: #d5a770;
  201.             border-color: #d5a770;
  202.             opacity: 0.7;
  203.         }
  204.         .ec-blockBtn--action {
  205.             display: inline-block;
  206.             margin-bottom: 0;
  207.             font-weight: bold;
  208.             text-align: center;
  209.             vertical-align: middle;
  210.             touch-action: manipulation;
  211.             cursor: pointer;
  212.             background-image: none;
  213.             border: 1px solid transparent;
  214.             white-space: nowrap;
  215.             padding: 6px 12px;
  216.             font-size: 0.875rem;
  217.             border-radius: 1.42857142;
  218.             -webkit-user-select: none;
  219.             -moz-user-select: none;
  220.             -ms-user-select: none;
  221.             user-select: none;
  222.             padding: 10px 16px;
  223.             text-decoration: none;
  224.             color: #fff;
  225.             background-color: #F8C4CF;
  226.             border-color: #F8C4CF;
  227.             display: block;
  228.             width: 330px;
  229.             height: 56px;
  230.             line-height: 56px;
  231.             padding-top: 0;
  232.             padding-bottom: 0;
  233.             border-radius: 6px;
  234.         }
  235.         .ec-productRole__description_icon_car {
  236.             margin-top: 7%;
  237.             padding-top: 7%;
  238.             border-top: 1px dotted #ccc;
  239.             display: flex;
  240.         }
  241.         .ec-productRole__description_icon_present {
  242.             margin-top: 7%;
  243.             display: flex;
  244.         }
  245.         .item_desc_icon {
  246.             width: 25%;
  247.         }
  248.         .item_desc {
  249.             width: 75%;
  250.             padding-top: 0.5%;
  251.             font-weight: bold;
  252.         }
  253.         .item_desc_present {
  254.             width: 75%;
  255.             padding-top: 4%;
  256.             font-weight: bold;
  257.         }
  258.         .product-detail-artist-icon {
  259.             display: flex;
  260.         }
  261.         .box26 {
  262.             position: relative;
  263.             margin: 2em 0;
  264.             padding: 0.5em 1em;
  265.             border: solid 3px #d5a770;
  266.             border-radius: 8px;
  267.         }
  268.         .box26 .box-title {
  269.             position: absolute;
  270.             display: inline-block;
  271.             top: -13px;
  272.             left: 10px;
  273.             padding: 0 9px;
  274.             line-height: 1;
  275.             font-size: 19px;
  276.             background: #FFF;
  277.             color: #d5a770;
  278.             font-weight: bold;
  279.         }
  280.         .box26 h3 {
  281.             margin: 0; 
  282.             padding: 0;
  283.         }
  284.         .product-detail-artist-icon {
  285.             margin-left: -15px;
  286.         }
  287.         .mr-10 {
  288.             margin-right: 10px;
  289.         }
  290.         a.btn-sns {
  291.             font-size: 25px;
  292.             line-height: 40px;
  293.             width: 40px;
  294.             height: 40px;
  295.             padding: 1px 2px;
  296.             margin-left: 30px;
  297.             letter-spacing: 0;
  298.             color: #fff;
  299.             border-radius: 50%;
  300.         }
  301.         a.btn-sns:hover {
  302.             color: #fff;
  303.         }
  304.         a.btn-sns--twitter {
  305.             background: #1da1f2;
  306.         }
  307.         .product-detail-artist-link{
  308.             padding-top: 20px;
  309.         }
  310.         .product-detail-artist-link a:hover{
  311.             color: #d5a770;
  312.             border-bottom: 1px solid #d5a770;
  313.         }
  314.         .product-detail-artist-link a {
  315.             color: black;
  316.             border-bottom: 1px solid black;
  317.             font-weight: bold;
  318.             font-size: 15px;
  319.         }
  320.         /* 768以下の時 */
  321.         @media screen and (max-width: 767px) {  
  322.             .ec-productRole__description {
  323.                 display: none;
  324.             }
  325.             .product-detail-artist-photo {
  326.                 visibility:hidden
  327.             }
  328.             .artist-name-size {
  329.                 width: 500px;
  330.             }
  331.             .ec-grid2__cell_introduce {
  332.                 margin: 10% 15% 0;
  333.                 width: auto;
  334.             }
  335.             .ec-productRole__profile {
  336.                 width: auto;
  337.                 padding: 5%;
  338.                 text-align: center;
  339.             }
  340.             .ec-blockBtn--action {
  341.                 display: inline-block;
  342.                 margin-bottom: 0;
  343.                 font-weight: bold;
  344.                 text-align: center;
  345.                 vertical-align: middle;
  346.                 touch-action: manipulation;
  347.                 cursor: pointer;
  348.                 background-image: none;
  349.                 border: 1px solid transparent;
  350.                 white-space: nowrap;
  351.                 padding: 6px 12px;
  352.                 font-size: 0.875rem;
  353.                 border-radius: 1.42857142;
  354.                 -webkit-user-select: none;
  355.                 -moz-user-select: none;
  356.                 -ms-user-select: none;
  357.                 user-select: none;
  358.                 padding: 10px 16px;
  359.                 text-decoration: none;
  360.                 color: #fff;
  361.                 background-color: #d5a770;
  362.                 border-color: #d5a770;
  363.                 display: block;
  364.                 width: 230px;
  365.                 height: 56px;
  366.                 line-height: 56px;
  367.                 padding-top: 0;
  368.                 padding-bottom: 0;
  369.             }
  370.             .ec-blockBtn--action-detail {
  371.                 display: inline-block;
  372.                 margin-bottom: 0;
  373.                 font-weight: bold;
  374.                 text-align: center;
  375.                 vertical-align: middle;
  376.                 touch-action: manipulation;
  377.                 cursor: pointer;
  378.                 background-image: none;
  379.                 border: 1px solid transparent;
  380.                 white-space: nowrap;
  381.                 padding: 6px 12px;
  382.                 font-size: 0.875rem;
  383.                 border-radius: 1.42857142;
  384.                 -webkit-user-select: none;
  385.                 -moz-user-select: none;
  386.                 -ms-user-select: none;
  387.                 user-select: none;
  388.                 padding: 10px 16px;
  389.                 text-decoration: none;
  390.                 color: #fff;
  391.                 background-color: #d5a770;
  392.                 border-color: #d5a770;
  393.                 display: block;
  394.                 width: 230px;
  395.                 height: 56px;
  396.                 line-height: 56px;
  397.                 padding-top: 0;
  398.                 padding-bottom: 0;
  399.             }
  400.             .ec-blockBtn--cancel {
  401.                 display: inline-block;
  402.                 margin-bottom: 0;
  403.                 font-weight: bold;
  404.                 text-align: center;
  405.                 vertical-align: middle;
  406.                 touch-action: manipulation;
  407.                 cursor: pointer;
  408.                 background-image: none;
  409.                 border: 1px solid transparent;
  410.                 white-space: nowrap;
  411.                 padding: 6px 12px;
  412.                 font-size: 0.875rem;
  413.                 border-radius: 1.42857142;
  414.                 -webkit-user-select: none;
  415.                 -moz-user-select: none;
  416.                 -ms-user-select: none;
  417.                 user-select: none;
  418.                 padding: 10px 16px;
  419.                 text-decoration: none;
  420.                 color: #fff;
  421.                 background-color: #525263;
  422.                 border-color: #525263;
  423.                 display: block;
  424.                 width: 230px;
  425.                 height: 56px;
  426.                 line-height: 56px;
  427.                 padding-top: 0;
  428.                 padding-bottom: 0;
  429.             }
  430.             .ec-blockBtn--cancel:hover {
  431.                 opacity: 0.7;
  432.                 background-color: #525263;
  433.                 border-color: #525263;
  434.             }
  435.             .social-media-title {
  436.                 display: none;
  437.             }
  438.         }
  439.         /* 570以下の時 */
  440.         @media screen and (max-width: 570px) {  
  441.             .ec-grid2__cell_introduce {
  442.                 margin: 10% 5% 0;
  443.                 width: auto;
  444.             }
  445.         }
  446.     </style>
  447. {% endblock %}
  448. {% block javascript %}
  449.     <script>
  450.     $(function () {
  451.         $('#js-slider-4').slick({
  452.             arrows: true, // 前・次のボタンを表示する
  453.             speed: 500, // スライドさせるスピード(ミリ秒)
  454.             slidesToShow: 4, // 表示させるスライド数
  455.             centerMode: true, // slidesToShowが奇数のとき、現在のスライドを中央に表示する
  456.             variableWidth: true, // スライド幅の自動計算を無効化
  457.         });
  458.     });
  459.     </script>
  460.     <script>
  461.         eccube.classCategories = {{ class_categories_as_json(Product)|raw }};
  462.         // 規格2に選択肢を割り当てる。
  463.         function fnSetClassCategories(form, classcat_id2_selected) {
  464.             var $form = $(form);
  465.             var product_id = $form.find('input[name=product_id]').val();
  466.             var $sele1 = $form.find('select[name=classcategory_id1]');
  467.             var $sele2 = $form.find('select[name=classcategory_id2]');
  468.             eccube.setClassCategories($form, product_id, $sele1, $sele2, classcat_id2_selected);
  469.         }
  470.         {% if form.classcategory_id2 is defined %}
  471.         fnSetClassCategories(
  472.             $('#form1'), {{ form.classcategory_id2.vars.value|json_encode|raw }}
  473.         );
  474.         {% elseif form.classcategory_id1 is defined %}
  475.         eccube.checkStock($('#form1'), {{ Product.id }}, {{ form.classcategory_id1.vars.value|json_encode|raw }}, null);
  476.         {% endif %}
  477.     </script>
  478.     <script>
  479.         $(function() {
  480.             // bfcache無効化
  481.             $(window).bind('pageshow', function(event) {
  482.                 if (event.originalEvent.persisted) {
  483.                     location.reload(true);
  484.                 }
  485.             });
  486.             // Core Web Vital の Cumulative Layout Shift(CLS)対策のため
  487.             // img タグに width, height が付与されている.
  488.             // 630px 未満の画面サイズでは縦横比が壊れるための対策
  489.             // see https://github.com/EC-CUBE/ec-cube/pull/5023
  490.             $('.ec-grid2__cell').hide();
  491.             var removeSize = function () {
  492.                 $('.slide-item').height('');
  493.                 $('.slide-item img')
  494.                     .removeAttr('width')
  495.                     .removeAttr('height')
  496.                     .removeAttr('style');
  497.             };
  498.             var slickInitial = function(slick) {
  499.                 $('.ec-grid2__cell').fadeIn(1500);
  500.                 var baseHeight = $(slick.target).height();
  501.                 var baseWidth = $(slick.target).width();
  502.                 var rate = baseWidth / baseHeight;
  503.                 $('.slide-item').height(baseHeight * rate); // 余白を削除する
  504.                 // transform を使用することでCLSの影響を受けないようにする
  505.                 $('.slide-item img')
  506.                     .css(
  507.                         {
  508.                             'transform-origin': 'top left',
  509.                             'transform': 'scaleY(' + rate + ')',
  510.                             'transition': 'transform .1s'
  511.                         }
  512.                     );
  513.                 // 正しいサイズに近くなったら属性を解除する
  514.                 setTimeout(removeSize, 500);
  515.             };
  516.             $('.item_visual').on('init', slickInitial);
  517.             // リサイズ時は CLS の影響を受けないため属性を解除する
  518.             $(window).resize(removeSize);
  519.             $('.item_visual').slick({
  520.                 dots: false,
  521.                 arrows: false,
  522.                 responsive: [{
  523.                     breakpoint: 768,
  524.                     settings: {
  525.                         dots: true
  526.                     }
  527.                 }]
  528.             });
  529.             $('.slideThumb').on('click', function() {
  530.                 var index = $(this).attr('data-index');
  531.                 $('.item_visual').slick('slickGoTo', index, false);
  532.             })
  533.         });
  534.     </script>
  535.     <script>
  536.         $(function() {
  537.             $('.add-cart').on('click', function(event) {
  538.                 {% if form.classcategory_id1 is defined %}
  539.                 // 規格1フォームの必須チェック
  540.                 if ($('#classcategory_id1').val() == '__unselected' || $('#classcategory_id1').val() == '') {
  541.                     $('#classcategory_id1')[0].setCustomValidity('{{ '項目が選択されていません'|trans }}');
  542.                     return true;
  543.                 } else {
  544.                     $('#classcategory_id1')[0].setCustomValidity('');
  545.                 }
  546.                 {% endif %}
  547.                 {% if form.classcategory_id2 is defined %}
  548.                 // 規格2フォームの必須チェック
  549.                 if ($('#classcategory_id2').val() == '__unselected' || $('#classcategory_id2').val() == '') {
  550.                     $('#classcategory_id2')[0].setCustomValidity('{{ '項目が選択されていません'|trans }}');
  551.                     return true;
  552.                 } else {
  553.                     $('#classcategory_id2')[0].setCustomValidity('');
  554.                 }
  555.                 {% endif %}
  556.                 // 個数フォームのチェック
  557.                 if ($('#quantity').val() < 1) {
  558.                     $('#quantity')[0].setCustomValidity('{{ '1以上で入力してください。'|trans }}');
  559.                     return true;
  560.                 } else {
  561.                     $('#quantity')[0].setCustomValidity('');
  562.                 }
  563.                 event.preventDefault();
  564.                 $form = $('#form1');
  565.                 $.ajax({
  566.                     url: $form.attr('action'),
  567.                     type: $form.attr('method'),
  568.                     data: $form.serialize(),
  569.                     dataType: 'json',
  570.                     beforeSend: function(xhr, settings) {
  571.                         // Buttonを無効にする
  572.                         $('.add-cart').prop('disabled', true);
  573.                     }
  574.                 }).done(function(data) {
  575.                     // レスポンス内のメッセージをalertで表示
  576.                     $.each(data.messages, function() {
  577.                         $('#ec-modal-header').html(this);
  578.                     });
  579.                     $('.ec-modal').show()
  580.                     // カートブロックを更新する
  581.                     $.ajax({
  582.                         url: "{{ url('block_cart') }}",
  583.                         type: 'GET',
  584.                         dataType: 'html'
  585.                     }).done(function(html) {
  586.                         $('.ec-headerRole__cart').html(html);
  587.                     });
  588.                 }).fail(function(data) {
  589.                     alert('{{ 'カートへの追加に失敗しました。'|trans }}');
  590.                 }).always(function(data) {
  591.                     // Buttonを有効にする
  592.                     $('.add-cart').prop('disabled', false);
  593.                 });
  594.             });
  595.         });
  596.         $('.ec-modal-wrap').on('click', function(e) {
  597.             // モーダル内の処理は外側にバブリングさせない
  598.             e.stopPropagation();
  599.         });
  600.         $('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
  601.             $('.ec-modal').hide()
  602.         });
  603.     </script>
  604.     <script type="application/ld+json">
  605.     {
  606.         "@context": "https://schema.org/",
  607.         "@type": "Product",
  608.         "name": "{{ Product.name }}",
  609.         "image": [
  610.             {% for img in Product.ProductImage %}
  611.                 "{{ app.request.schemeAndHttpHost }}{{ asset(img, 'save_image') }}"{% if not loop.last %},{% endif %}
  612.             {% else %}
  613.                 "{{ app.request.schemeAndHttpHost }}{{ asset(''|no_image_product, 'save_image') }}"
  614.             {% endfor %}
  615.         ],
  616.         "description": "{{ Product.description_list | default(Product.description_detail) | replace({'\n': '', '\r': ''}) | slice(0,300) }}",
  617.         {% if Product.code_min %}
  618.         "sku": "{{ Product.code_min }}",
  619.         {% endif %}
  620.         "offers": {
  621.             "@type": "Offer",
  622.             "url": "{{ url('product_detail', {'id': Product.id}) }}",
  623.             "priceCurrency": "{{ eccube_config.currency }}",
  624.             "price": {{ Product.getPrice02IncTaxMin ? Product.getPrice02IncTaxMin : 0}},
  625.             "availability": "{{ Product.stock_find ? "InStock" : "OutOfStock" }}"
  626.         }
  627.     }
  628.     </script>
  629. {% endblock %}
  630. {% block main %}
  631.     <div class="ec-productRole">
  632.         <div class="ec-grid2">
  633.             <div class="ec-grid2__cell">
  634.                 <div class="ec-sliderItemRole">
  635.                     <div class="item_visual">
  636.                         {% for ProductImage in Product.ProductImage %}
  637.                             <div class="slide-item"><img src="{{ asset(ProductImage, 'save_image') }}" alt="{{ loop.first ? Product.name : '' }}" height="550"{% if loop.index > 1 %} loading="lazy"{% endif %}></div>
  638.                         {% else %}
  639.                             <div class="slide-item"><img src="{{ asset(''|no_image_product, 'save_image') }}" alt="{{ loop.first ? Product.name : '' }}" width="550" height="550"></div>
  640.                         {% endfor %}
  641.                     </div>
  642.                     <div class="item_nav">
  643.                         {% for ProductImage in Product.ProductImage %}
  644.                             <div class="slideThumb" data-index="{{ loop.index0 }}"><img src="{{ asset(ProductImage, 'save_image') }}" alt="" width="133" height="133" loading="lazy"></div>
  645.                         {% endfor %}
  646.                     </div>
  647.                 </div>
  648.                 <div class="product-detail-artDetail">
  649.                     <div class="flex">
  650.                         <i class="fa-solid fa-palette fa-2x fontawesome-size"></i><h2 class="fontweight-bold">作品紹介<h2>
  651.                     </div>
  652.                     <div class="product-detail-title-description">
  653.                         {% if Product.getDescriptionDetail %}
  654.                             <p>{{ Product.getDescriptionDetail }}</p>
  655.                         {% endif %}
  656.                     </div>
  657.                 </div>
  658.                 <div class="hr-bold"></div>
  659.                 {% for artist in artists %}
  660.                 {% if Product.getArtistId == artist.id %}
  661.                 <div class="product-detail-artist">
  662.                     <div class="product-detail-artist-description">
  663.                         <div class="flex">
  664.                             <i class="fa-solid fa-pen-nib fa-2x fontawesome-size"></i>
  665.                             <h2 class="fontweight-bold artist-name-size">{{ artist.name }}</h2>
  666.                             <div class="product-detail-artist-photo">
  667.                                 <img src="{{ asset(artist.image |no_image_product, 'user_data') }}" alt=artist.name class='hidden'>
  668.                             </div>
  669.                         </div>
  670.                         <div class="product-detail-artist-desc">
  671.                             <p>« {{ artist.getDescription }} »</p>
  672.                         </div>
  673.                         <div class="hr"></div>
  674.                         {% if artist.twitter != null %}
  675.                         <h3 class="fontweight-bold social-media-title">アーティストのソーシャルメディア<h3>
  676.                         <div class="product-detail-artist-icon">
  677.                             <div>
  678.                                 <a href='{{artist.twitter}}' class="btn btn-sns btn-sns--twitter"><i class="fa-brands fa-twitter" style="color: white;" onMouseOver="this.style.color='#d5a770'" onMouseOut="this.style.color='white'"></i></a>
  679.                             </div>
  680.                         </div>
  681.                         {% endif %}
  682.                         <div class="product-detail-artist-link">
  683.                             <a href="/artists/detail/{{ artist.id }}">{{ artist.name }}の作品を閲覧</a>
  684.                         </div>
  685.                     </div>
  686.                 </div>
  687.                 {% endif %}
  688.                 {% endfor %}
  689.             </div>
  690.             <div class="ec-grid2__cell_introduce">
  691.                 <div class="ec-productRole__profile">
  692.                     {# 商品名 #}
  693.                     <div class="ec-productRole__title">
  694.                         <h2 class="ec-headingTitle">{{ Product.name }}</h2>
  695.                     </div>
  696.                     {# アーティスト名とリンク #}
  697.                     <div class="ec-productRole__title_flex">
  698.                        {% for artist in artists %}
  699.                             {% if Product.getArtistId == artist.id %}
  700.                             <div><a href="/artists/detail/{{ artist.id }}">{{ artist.name }}, </a></div>
  701.                             <div class="ml-5">
  702.                                 {# アーティストの出身地 #}
  703.                                 {% if Product.getArtistId == artist.id %}
  704.                                     <p>{{ artist.address }}</p>
  705.                                 {% endif %}
  706.                             </div>
  707.                             {% endif %}
  708.                         {% endfor %}
  709.                     </div>
  710.                     {# 絵が何で描かれたか #}
  711.                     {% if Product.getProductionTechnique is not null %}
  712.                     <div class="ec-productRole__title mt-10">
  713.                         <p>{{ Product.getProductionTechnique }}</p>
  714.                     </div>
  715.                     {% endif %}
  716.                     {# 絵のサイズ #}
  717.                     {% if Product.getProductionSizeVertical is not null %}
  718.                     <div class="ec-productRole__title">
  719.                         <div><p>{{ Product.getProductionSizeVertical }} x {{ Product.getProductionSizeWidth}} cm</p></div>
  720.                     </div>
  721.                     {% endif %}
  722.                     {# タグ #}
  723.                     <ul class="ec-productRole__tags">
  724.                         {% for Tag in Product.Tags %}
  725.                             <li class="ec-productRole__tag tag_{{ Tag.id }}">{{ Tag }}</li>
  726.                         {% endfor %}
  727.                     </ul>
  728.                     {# 通常価格 #}
  729.                     {# {% if Product.hasProductClass -%}
  730.                         <div class="ec-productRole__priceRegular">
  731.                             {% if Product.getPrice01Min is not null and Product.getPrice01IncTaxMin == Product.getPrice01IncTaxMax %}
  732.                                 <span class="ec-productRole__priceRegularPrice">{{ '通常価格'|trans }}:<span class="price01-default">{{ Product.getPrice01IncTaxMin|price }}</span></span>
  733.                                 <span class="ec-productRole__priceRegularTax">{{ '税込'|trans }}</span>
  734.                             {% elseif Product.getPrice01Min is not null and Product.getPrice01Max is not null %}
  735.                                 <span class="ec-productRole__priceRegularPrice">{{ '通常価格'|trans }}:<span class="price01-default">{{ Product.getPrice01IncTaxMin|price }}~ {{ Product.getPrice01IncTaxMax|price }}</span></span>
  736.                                 <span class="ec-productRole__priceRegularTax">{{ '税込'|trans }}</span>
  737.                             {% endif %}
  738.                         </div>
  739.                     {% else %}
  740.                         {% if Product.getPrice01Max is not null %}
  741.                             <span class="ec-productRole__priceRegularPrice">{{ '通常価格'|trans }}:{{ Product.getPrice01IncTaxMin|price }}</span>
  742.                             <span class="ec-productRole__priceRegularTax">{{ '税込'|trans }}</span>
  743.                         {% endif %}
  744.                     {% endif %} #}
  745.                     {# 販売価格 #}
  746.                     <div class="ec-productRole__price">
  747.                         {% if Product.hasProductClass -%}
  748.                             {% if Product.getPrice02IncTaxMin == Product.getPrice02IncTaxMax %}
  749.                                 <div class="ec-price">
  750.                                     <span class="ec-productRole__priceRegularPrice">{{ '価格'|trans }}</span>
  751.                                     <span class="ec-price__price price02-default">{{ Product.getPrice02IncTaxMin|price }}</span>
  752.                                     <span class="ec-price__tax">{{ '税込'|trans }}</span>
  753.                                 </div>
  754.                             {% else %}
  755.                                 <div class="ec-price">
  756.                                     <span class="ec-productRole__priceRegularPrice">{{ '価格'|trans }}</span>
  757.                                     <span class="ec-price__price price02-default">{{ Product.getPrice02IncTaxMin|price }} ~ {{ Product.getPrice02IncTaxMax|price }}</span>
  758.                                     <span class="ec-price__tax">{{ '税込'|trans }}</span>
  759.                                 </div>
  760.                             {% endif %}
  761.                         {% else %}
  762.                             <div class="ec-price">
  763.                                 <span class="ec-productRole__priceRegularPrice">{{ '価格'|trans }}</span>
  764.                                 <span class="ec-price__price">{{ Product.getPrice02IncTaxMin|price }}</span>
  765.                                 <span class="ec-price__tax">{{ '税込'|trans }}</span>
  766.                             </div>
  767.                         {% endif %}
  768.                     </div>
  769.                     {# メーカー #}
  770.                     {% if maker_id is defined %}
  771.                         <div class="ec-productRole__code">
  772.                             {{ '店舗'|trans }}: <span>{{ maker[maker_id - 1].name }}</span>
  773.                         </div>
  774.                     {% endif %}
  775.                     {# 商品コード #}
  776.                     {% if Product.code_min is not empty %}
  777.                         <div class="ec-productRole__code">
  778.                             {{ '商品コード'|trans }}: <span class="product-code-default">{{ Product.code_min }}{% if Product.code_min != Product.code_max %} ~ {{ Product.code_max }}{% endif %}</span>
  779.                         </div>
  780.                     {% endif %}
  781.                     {# 関連カテゴリ #}
  782.                     {% if Product.ProductCategories is not empty %}
  783.                         <div class="ec-productRole__category">
  784.                             <div class="fontWeightBold">{{ '関連カテゴリ'|trans }}</div>
  785.                             {% for ProductCategory in Product.ProductCategories %}
  786.                                 <ul>
  787.                                     <li>
  788.                                         {% for Category in ProductCategory.Category.path %}
  789.                                             <a href="{{ url('product_list') }}?category_id={{ Category.id }}">{{ Category.name }}</a> {%- if loop.last == false %}
  790.                                             <span></span>{% endif -%}
  791.                                         {% endfor %}
  792.                                     </li>
  793.                                 </ul>
  794.                             {% endfor %}
  795.                         </div>
  796.                     {% endif %}
  797.                     <form action="{{ url('product_add_cart', {id:Product.id}) }}" method="post" id="form1" name="form1">
  798.                         {% if Product.stock_find %}
  799.                             <div class="ec-productRole__actions">
  800.                                 {% if form.classcategory_id1 is defined %}
  801.                                     <div class="ec-select">
  802.                                         {{ form_row(form.classcategory_id1) }}
  803.                                         {{ form_errors(form.classcategory_id1) }}
  804.                                     </div>
  805.                                     {% if form.classcategory_id2 is defined %}
  806.                                         <div class="ec-select">
  807.                                             {{ form_row(form.classcategory_id2) }}
  808.                                             {{ form_errors(form.classcategory_id2) }}
  809.                                         </div>
  810.                                     {% endif %}
  811.                                 {% endif %}
  812.                                 <div class="ec-numberInput"><span>{{ '数量'|trans }}</span>
  813.                                     {{ form_widget(form.quantity) }}
  814.                                     {{ form_errors(form.quantity) }}
  815.                                 </div>
  816.                                 <div class="ec-numberInput"><span>{{ 'メーカーID'|trans }}</span>
  817.                                     {{ form_widget(form.maker_id) }}
  818.                                     {{ form_errors(form.maker_id) }}
  819.                                 </div>
  820.                                 {% if maker_id is defined %}
  821.                                 <div class="ec-numberInput"><span>{{ 'メーカーID'|trans }}</span>
  822.                                     <input type="number" id="maker_id" name="maker_id" required="required" value="{{ maker_id }}" class="form-control">
  823.                                 </div>
  824.                                 {% else  %}
  825.                                 <div class="ec-numberInput"><span>{{ 'メーカーID'|trans }}</span>
  826.                                 {% for cookie in productHistory %}
  827.                                     <input type="number" id="maker_id" name="maker_id" required="required" value="{{ cookie.id }}" class="form-control">
  828.                                 {% endfor %}
  829.                                 </div>
  830.                                 {% endif %}
  831.                             </div>
  832.                             <div class="ec-productRole__btn">
  833.                                 <button type="submit" class="ec-blockBtn--action-detail add-cart">
  834.                                     {{ 'カートに入れる'|trans }}
  835.                                 </button>
  836.                             </div>
  837.                         {% else %}
  838.                             <div class="ec-productRole__btn">
  839.                                 <button type="button" class="ec-blockBtn--action" disabled="disabled">
  840.                                     {{ 'ただいま品切れ中です。'|trans }}
  841.                                 </button>
  842.                             </div>
  843.                         {% endif %}
  844.                         {{ form_rest(form) }}
  845.                     </form>
  846.                     <div class="ec-modal">
  847.                         <div class="ec-modal-overlay">
  848.                             <div class="ec-modal-wrap">
  849.                                 <span class="ec-modal-close"><span class="ec-icon"><img src="{{ asset('assets/icon/cross-dark.svg') }}" alt=""/></span></span>
  850.                                 <div id="ec-modal-header" class="text-center">{{ 'カートに追加しました。'|trans }}</div>
  851.                                 <div class="ec-modal-box">
  852.                                     <div class="ec-role">
  853.                                         <span class="ec-inlineBtn--cancel">{{ 'お買い物を続ける'|trans }}</span>
  854.                                         <a href="{{ url('cart') }}" class="ec-inlineBtn--action mt-5per">{{ 'カートへ進む'|trans }}</a>
  855.                                     </div>
  856.                                 </div>
  857.                             </div>
  858.                         </div>
  859.                     </div>
  860.                     {% if BaseInfo.option_favorite_product %}
  861.                         <form action="{{ url('product_add_favorite', {id:Product.id}) }}" method="post">
  862.                             <div class="ec-productRole__btn">
  863.                                 {% if is_favorite == false %}
  864.                                     <button type="submit" id="favorite" class="ec-blockBtn--cancel">
  865.                                         <i class="ec-headerNav__itemIcon fas fa-heart fa-fw"></i>{{ 'お気に入りに追加'|trans }}
  866.                                     </button>
  867.                                 {% else %}
  868.                                     <button type="submit" id="favorite" class="ec-blockBtn--cancel"
  869.                                             disabled="disabled">{{ 'お気に入りに追加済です。'|trans }}
  870.                                     </button>
  871.                                 {% endif %}
  872.                             </div>
  873.                         </form>
  874.                     {% endif %}
  875.                     <div class="ec-productRole__description">
  876.                         {{ Product.description_detail|raw|nl2br }}
  877.                     </div>
  878.                     <div class="ec-productRole__description_icon_car">
  879.                         <div class='item_desc_icon'><i class="fa-solid fa-truck fa-3x" style="color: #d5a770;"></i></div>
  880.                         <div class='item_desc'>お届けの目安は<br />ご購入から7日前後</div>
  881.                     </div>
  882.                     <div class="ec-productRole__description_icon_present">
  883.                         <div class='item_desc_icon'><i class="fa-solid fa-gift fa-3x" style="color: #d5a770;"></i></div>
  884.                         <div class='item_desc_present'>返品無料</div>
  885.                     </div>
  886.                 </div>
  887.             </div>
  888.         </div>
  889.         {% if Product.freearea %}
  890.              <div class="ec-productRole__description">
  891.                  {{ include(template_from_string(Product.freearea)) }}
  892.             </div>
  893.         {% endif %}
  894.     </div>
  895.     {# <ul class="slider-2" id="js-slider-4">
  896.         {% for product in products %}
  897.             {% for artist in artists %}
  898.                 {% if product.getArtistId == artist.id %}
  899.                 {% if product.getArtistId == artist.id %}
  900.                 <li>
  901.                     <div class="ec-newItemRole__listItem">
  902.                         <a href="{{ url('product_detail', {'id': product.id}) }}" class="text-decoration">
  903.                             {% for productImage in product.ProductImage %}
  904.                                 <div class="slide-item"><img src="{{ asset(productImage, 'save_image') }}" /></div>
  905.                             {% endfor %}
  906.                             <p class="ec-newItemRole__listItemTitle fontWeightBold">{{ product.name|trans }}</p>
  907.                             <p class="ec-newItemRole__listItemPrice fontWeightBold">¥{{ product.getPrice02IncTaxMax|trans }}(税込)</p>
  908.                         </a>
  909.                     </div>
  910.                 </li>
  911.                 {% endif %}
  912.                 {% endif %}
  913.             {% endfor %}
  914.         {% endfor %}
  915.     </ul> #}
  916. {% endblock %}