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: 10px;
  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.         @media only screen and (min-width: 768px) {
  76.             .ec-sliderItemRole {
  77.                 margin-bottom: 3rem ;
  78.             }
  79.         }
  80.         .ec-sliderItemRole .slideThumb {
  81.             width: 10%;
  82.         }
  83.         .ec-sliderItemRole .slideThumb img {
  84.             width: 90%;
  85.         }
  86.         /* ///////////////////詳細情報1/////////////////// */
  87.         .ec-productRole__movie {
  88.             width: 100%;
  89.             display: grid;
  90.             grid-template-columns: 1fr;
  91.             gap: 20px;
  92.         }
  93.         @media only screen and (min-width: 768px) {
  94.             .ec-productRole__movie {
  95.                 grid-template-columns: repeat(3, 1fr);
  96.             }
  97.         }
  98.         .ec-productRole__movie iframe {
  99.             width: 100%;
  100.             aspect-ratio: 16 / 9;
  101.         }
  102.         .movie-caption {
  103.             font-size: 16px;
  104.         }
  105.         /* 住所 */
  106.         @media only screen and (min-width: 768px) {
  107.             .ec-productRole__kofun-address {
  108.                 font-size: 28px;
  109.                 font-weight: bold;
  110.                 padding: 1rem 0;
  111.                 border-bottom: 1px dotted #ccc;
  112.             }
  113.         }
  114.         /* 価格 */
  115.         .ec-productRole .ec-productRole__price {
  116.             color:var(--e-global-color-global_color_5);
  117.             padding-top:0px;
  118.             font-size: 30px;
  119.         }
  120.         /* 説明テキスト */
  121.         .ec-productRole .ec-productRole__description {
  122.             margin-top: 20px;
  123.         }
  124.         /* 購入ボタン */
  125.         @media only screen and (min-width: 768px) {
  126.             .ec-productRole .ec-productRole__btn {
  127.                 text-align: center;
  128.                 min-width: 350px;
  129.                 width: 40%;
  130.                 margin:0 auto;
  131.             }
  132.         }
  133.         .blueprint-image {
  134.             width: 100%;
  135.             max-width: 768px;
  136.             margin: 15px auto;
  137.         }
  138.         .ec-grid3__cell.product-image {
  139.             margin: 5px 15px;
  140.         }
  141.         .detail-top-image {
  142.             width: 100%;
  143.             max-width: 1080px;
  144.             margin: 15px auto;
  145.         }
  146. /* ///////////////////詳細情報2/////////////////// */
  147. /* 見出し_下グリーンライン */
  148.         .ec-productRole__kofun-content h2 {
  149.             font-size: 20px;
  150.             font-weight: bold;
  151.             color: var(--e-global-color-global_color_4);
  152.             margin-top: 4rem;
  153.             margin-bottom: 1rem;
  154.             padding-bottom: 0.5rem;
  155.             background: linear-gradient(to right,
  156.                 var(--e-global-color-global_color_1) 0%,
  157.                 var(--e-global-color-global_color_1) 20%,
  158.                 #ddd 20%,
  159.                 #ddd 100%);
  160.             background-size: 100% 3px;
  161.             background-repeat: no-repeat;
  162.             background-position: bottom;
  163.         }
  164.         @media only screen and (min-width: 768px) {
  165.             .ec-productRole__kofun-content h2 {
  166.                 font-size: 26px;
  167.             }
  168.         }
  169. /* 見出し_左横グリーンライン */
  170.         .ec-productRole__kofun-content h3 {
  171.             font-size: 20px;
  172.             font-weight: bold;
  173.             color: var(--e-global-color-global_color_4);
  174.             margin-top: 4rem;
  175.             margin-bottom: 1rem;
  176.             padding-left: 0.5rem;
  177.             border-left: 10px solid var(--e-global-color-global_color_1);
  178.             line-height: 1.8;
  179.         }
  180. /* おすすめポイント */
  181.         .ec-productRole__kofun-appeal-points .title {
  182.             font-size: 18px;
  183.             font-weight: bold;
  184.             color: var(--e-global-color-global_color_9);
  185.             background-color: var(--e-global-color-global_color_1);
  186.             padding: 0.5rem 4rem 0.5rem 1rem;
  187.             margin: 2rem 1rem 0 1rem;
  188.             width: fit-content;
  189.             border-radius: 6px 6px 0 0;  /* 上側の角だけを丸く */
  190.         }
  191.         .ec-productRole__kofun-appeal-points .content {
  192.             margin: 0 1rem;
  193.             padding: 1rem;
  194.             background-color: var(--e-global-color-global_color_7);
  195.             border-radius: 4px;
  196.         }
  197.         .ec-productRole__kofun-content {
  198.             padding-bottom: 20px;
  199.             margin-bottom: 20px;
  200.         }
  201.         .ec-productRole__kofun-content .content {
  202.             display: flex;
  203.             align-items: flex-start;
  204.         }
  205.         .ec-productRole__kofun-content.basicline .content {
  206.             padding: 0.5rem 0;
  207.             border-bottom: 1px dotted #ccc;
  208.         }
  209.         .tab-content.active .content {
  210.             padding: 0.5rem 0;
  211.             border-bottom: 1px dotted #ccc;
  212.         }
  213.         .ec-productRole__kofun-content.buy_process .content {
  214.             line-height:1.8;
  215.             padding-left:0.5rem;
  216.         }
  217.         .ec-productRole__kofun-content .content-group {
  218.             margin-top: 1rem;
  219.         }
  220.         .ec-productRole__kofun-content .content span.label {
  221.             display: inline-block;
  222.             width: 120px;  /* 項目名の幅を固定 */
  223.             color: var(--e-global-color-global_color_5);
  224.             font-weight: bold;
  225.             flex-shrink: 0;
  226.         }
  227.         .ec-productRole__kofun-content.base-info .label::before {
  228.             content: "【";
  229.         }
  230.         .ec-productRole__kofun-content.base-info .label::after {
  231.             content: "】";
  232.         }
  233.         .ec-productRole__kofun-content.basicline a {
  234.             color: #333 !important;
  235.             text-decoration: underline !important;
  236.         }
  237.         .ec-productRole__kofun-content.basicline a:hover {
  238.             color: var(--e-global-color-global_color_2) !important;
  239.         }
  240.         .ec-productRole__kofun-content .content span.label2 {
  241.             display: inline-block;
  242.             width: 120px;  /* 項目名の幅を固定 */
  243.             color: var(--e-global-color-global_color_1);
  244.             font-weight: bold;
  245.             flex-shrink: 0;
  246.         }
  247.         .ec-productRole__kofun-content .content.note {
  248.             margin-top: 1rem;
  249.             font-size: 0.9em;
  250.             line-height:1.5;
  251.         }
  252.         .ec-productRole__kofun-content .content.sub {
  253.             padding-left: 1.5rem;
  254.             margin-bottom: 1rem;
  255.             font-size: 0.9em;
  256.             line-height:1.5;
  257.         }
  258.         .ec-productRole__kofun-content .content.link {
  259.             margin-top: 1rem;
  260.         }
  261.         .warning {
  262.             color: red;
  263.         }
  264.         .value {
  265.             display: flex;
  266.             flex-direction: column;
  267.         }
  268.         .ec-productRole__kofun-content.description-detail {
  269.             margin-top: 50px;
  270.         }
  271.         .ec-productRole__kofun-content.description-detail strong {
  272.             font-size: 30px;
  273.             color: var(--e-global-color-global_color_2);
  274.         }
  275. /* 価格表 */
  276.         .ec-productRole__kofun-content.price-table .header {
  277.             display: flex;
  278.             align-items: flex-start;
  279.             font-weight: bold;
  280.             padding: 0.8rem;
  281.             border-bottom: 1px dashed var(--e-global-color-global_color_2);
  282.         }
  283.         .ec-productRole__kofun-content.price-table .content {
  284.             padding: 0.8em;
  285.             border-bottom: 1px dashed var(--e-global-color-global_color_2);
  286.         }
  287.         .ec-productRole__kofun-content.price-table span.label {
  288.             width: 30%;
  289.         }
  290.         @media only screen and (min-width: 768px) {
  291.             .ec-productRole__kofun-content.price-table span.label {
  292.                 width: 320px;
  293.             }
  294.         }
  295.         .ec-productRole__kofun-content.price-table .note {
  296.             padding-top: 1rem;
  297.             font-size: 0.9em;
  298.         }
  299. /* タブ切り替え用のスタイル追加 */
  300.         .tab-container {
  301.             margin: 2rem 0;
  302.         }
  303.         .tab-buttons {
  304.             display: flex;
  305.             position: relative;
  306.             z-index: 1;
  307.         }
  308.         .tab-button {
  309.             padding: 1rem 2rem;
  310.             background: #ffffff;
  311.             border: none;
  312.             border-bottom: 1px solid var(--e-global-color-global_color_2);
  313.             cursor: pointer;
  314.             font-size: 16px;
  315.             font-weight: bold;
  316.             margin-right: 4px;
  317.             margin-bottom: -1px;
  318.             position: relative;
  319.         }
  320.         .tab-button.active {
  321.             background: #ECF2D3;
  322.             border: 1px solid var(--e-global-color-global_color_2);
  323.             border-bottom: none;
  324.         }
  325.         .tab-content {
  326.             display: none;
  327.             padding: 2rem;
  328.             background: #ECF2D3;
  329.             border: 1px solid var(--e-global-color-global_color_2);
  330.         }
  331.         .tab-content.active {
  332.             display: block;
  333.         }
  334.         .fee-note {
  335.             margin-top: 1rem;
  336.             font-size: 0.9em;
  337.             color: #666;
  338.         }
  339.         .ec-productRole__kofun-content.scroll-to-checkout {
  340.             text-align: center;
  341.             margin-top: 50px;
  342.         }
  343.         .ec-productRole__kofun-content.scroll-to-checkout a span {
  344.             text-decoration: inherit;
  345.             display: inline-block;
  346.         }
  347.         .ec-productRole__kofun-content.scroll-to-checkout a {
  348.             margin: 0 auto;
  349.             display: flex;
  350.             align-items: center;
  351.             justify-content: center;
  352.             line-height: 1;
  353.             font-weight: bold;
  354.             border-radius: 3px;
  355.             color: #ffffff;
  356.             fill: #ffffff;
  357.             text-align: center;
  358.             transition: all .3s;
  359.             background-color: #000000;
  360.             padding: 20px;
  361.             width: 300px;
  362.             height: 45px;
  363.         }
  364.         @media only screen and (max-width: 768px) {
  365.             .ec-productRole__kofun-content.scroll-to-checkout a {
  366.                 font-size: 17px;
  367.                 padding: 20px 22px;
  368.             }
  369.         }
  370.         .ec-productRole__stock {
  371.             display: none;
  372.         }
  373.         .ec-productRole__kofun-content.visit-reservation {
  374.             text-align: center;
  375.             margin-top: 50px;
  376.         }
  377.         .ec-productRole__kofun-content.visit-reservation a {
  378.             margin: 0 auto;
  379.             display: flex;
  380.             align-items: center;
  381.             justify-content: center;
  382.             line-height: 1;
  383.             font-weight: bold;
  384.             border-radius: 3px;
  385.             color: #ffffff;
  386.             fill: #ffffff;
  387.             text-align: center;
  388.             transition: all .3s;
  389.             background-color: #000000;
  390.             padding: 20px;
  391.             width: 300px;
  392.             height: 45px;
  393.             text-decoration: none;
  394.         }
  395.         @media only screen and (max-width: 768px) {
  396.             .ec-productRole__kofun-content.visit-reservation a {
  397.                 font-size: 17px;
  398.                 padding: 20px 22px;
  399.             }
  400.         }
  401.     </style>
  402. {% endblock %}
  403. {% block javascript %}
  404.     <script>
  405.         eccube.classCategories = {{ get_extended_class_categories_as_json(Product)|raw }};
  406.         // 規格2に選択肢を割り当てる。
  407.         function fnSetClassCategories(form, classcat_id2_selected) {
  408.             var $form = $(form);
  409.             var product_id = $form.find('input[name=product_id]').val();
  410.             var $sele1 = $form.find('select[name=classcategory_id1]');
  411.             var $sele2 = $form.find('select[name=classcategory_id2]');
  412.             eccube.setClassCategories($form, product_id, $sele1, $sele2, classcat_id2_selected);
  413.         }
  414.         {% if form.classcategory_id2 is defined %}
  415.         fnSetClassCategories(
  416.             $('#form1'), {{ form.classcategory_id2.vars.value|json_encode|raw }}
  417.         );
  418.         {% elseif form.classcategory_id1 is defined %}
  419.         eccube.checkStock($('#form1'), {{ Product.id }}, {{ form.classcategory_id1.vars.value|json_encode|raw }}, null);
  420.         {% endif %}
  421.     </script>
  422.     <script>
  423.         $(function() {
  424.             // bfcache無効化
  425.             $(window).bind('pageshow', function(event) {
  426.                 if (event.originalEvent.persisted) {
  427.                     location.reload(true);
  428.                 }
  429.             });
  430.             // Core Web Vital の Cumulative Layout Shift(CLS)対策のため
  431.             // img タグに width, height が付与されている.
  432.             // 630px 未満の画面サイズでは縦横比が壊れるための対策
  433.             // see https://github.com/EC-CUBE/ec-cube/pull/5023
  434.             $('.ec-grid2__cell').hide();
  435.             var removeSize = function () {
  436.                 $('.slide-item').height('');
  437.                 $('.slide-item img')
  438.                     .removeAttr('width')
  439.                     .removeAttr('height')
  440.                     .removeAttr('style');
  441.             };
  442.             var slickInitial = function(slick) {
  443.                 $('.ec-grid2__cell').fadeIn(1500);
  444.                 var baseHeight = $(slick.target).height();
  445.                 var baseWidth = $(slick.target).width();
  446.                 var rate = baseWidth / baseHeight;
  447.                 $('.slide-item').height(baseHeight * rate); // 余白を削除する
  448.                 // transform を使用することでCLSの影響を受けないようにする
  449.                 $('.slide-item img')
  450.                     .css(
  451.                         {
  452.                             'transform-origin': 'top left',
  453.                             'transform': 'scaleY(' + rate + ')',
  454.                             'transition': 'transform .1s'
  455.                         }
  456.                     );
  457.                 // 正しいサイズに近くなったら属性を解除する
  458.                 setTimeout(removeSize, 500);
  459.             };
  460.             $('.item_visual').on('init', slickInitial);
  461.             // リサイズ時は CLS の影響を受けないため属性を解除する
  462.             $(window).resize(removeSize);
  463.             $('.item_visual').slick({
  464.                 dots: false,
  465.                 arrows: false,
  466.                 responsive: [{
  467.                     breakpoint: 768,
  468.                     settings: {
  469.                         dots: true
  470.                     }
  471.                 }]
  472.             });
  473.             $('.slideThumb').on('click', function() {
  474.                 var index = $(this).attr('data-index');
  475.                 $('.item_visual').slick('slickGoTo', index, false);
  476.             })
  477.             // タブ切り替え用のJavaScript
  478.             $('.tab-button').on('click', function() {
  479.                 // すべてのタブとコンテンツからactiveクラスを削除
  480.                 $('.tab-button').removeClass('active');
  481.                 $('.tab-content').removeClass('active');
  482.                 // クリックされたタブとそれに対応するコンテンツにactiveクラスを追加
  483.                 $(this).addClass('active');
  484.                 const tabId = $(this).data('tab');
  485.                 $('#' + tabId).addClass('active');
  486.             });
  487.         });
  488.     </script>
  489.     <script>
  490.         $(function() {
  491.             $('.add-cart').on('click', function(event) {
  492.                 {% if form.classcategory_id1 is defined %}
  493.                 // 規格1フォームの必須チェック
  494.                 if ($('#classcategory_id1').val() == '__unselected' || $('#classcategory_id1').val() == '') {
  495.                     $('#classcategory_id1')[0].setCustomValidity('{{ 'front.product.product_class_unselected'|trans }}');
  496.                     return true;
  497.                 } else {
  498.                     $('#classcategory_id1')[0].setCustomValidity('');
  499.                 }
  500.                 {% endif %}
  501.                 {% if form.classcategory_id2 is defined %}
  502.                 // 規格2フォームの必須チェック
  503.                 if ($('#classcategory_id2').val() == '__unselected' || $('#classcategory_id2').val() == '') {
  504.                     $('#classcategory_id2')[0].setCustomValidity('{{ 'front.product.product_class_unselected'|trans }}');
  505.                     return true;
  506.                 } else {
  507.                     $('#classcategory_id2')[0].setCustomValidity('');
  508.                 }
  509.                 {% endif %}
  510.                 // 個数フォームのチェック
  511.                 if ($('#quantity').val() < 1) {
  512.                     $('#quantity')[0].setCustomValidity('{{ 'front.product.invalid_quantity'|trans }}');
  513.                     return true;
  514.                 } else {
  515.                     $('#quantity')[0].setCustomValidity('');
  516.                 }
  517.                 event.preventDefault();
  518.                 $form = $('#form1');
  519.                 $.ajax({
  520.                     url: $form.attr('action'),
  521.                     type: $form.attr('method'),
  522.                     data: $form.serialize(),
  523.                     dataType: 'json',
  524.                     beforeSend: function(xhr, settings) {
  525.                         // Buttonを無効にする
  526.                         $('.add-cart').prop('disabled', true);
  527.                     }
  528.                 }).done(function(data) {
  529.                     // レスポンス内のメッセージをalertで表示
  530.                     $.each(data.messages, function() {
  531.                         $('#ec-modal-header').text(this);
  532.                     });
  533.                     $('.ec-modal').show()
  534.                     // カートブロックを更新する
  535.                     $.ajax({
  536.                         url: "{{ url('block_cart') }}",
  537.                         type: 'GET',
  538.                         dataType: 'html'
  539.                     }).done(function(html) {
  540.                         $('.ec-headerRole__cart').html(html);
  541.                     });
  542.                 }).fail(function(data) {
  543.                     alert('{{ 'front.product.add_cart_error'|trans }}');
  544.                 }).always(function(data) {
  545.                     // Buttonを有効にする
  546.                     $('.add-cart').prop('disabled', false);
  547.                 });
  548.             });
  549.             $('.scroll-to-checkout a').on('click', function(e) {
  550.                 e.preventDefault();
  551.                 const targetId = $(this).attr('href');
  552.                 const targetPosition = $(targetId).offset().top;
  553.                 $('html, body').animate({
  554.                     scrollTop: targetPosition
  555.                 }, 600); // 800ミリ秒かけてスクロール
  556.             });
  557.         });
  558.         $('.ec-modal-wrap').on('click', function(e) {
  559.             // モーダル内の処理は外側にバブリングさせない
  560.             e.stopPropagation();
  561.         });
  562.         $('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
  563.             $('.ec-modal').hide()
  564.         });
  565.     </script>
  566.     <script type="application/ld+json">
  567.     {
  568.         "@context": "https://schema.org/",
  569.         "@type": "Product",
  570.         "name": "{{ Product.name }}",
  571.         "image": [
  572.             {% for img in Product.ProductImage %}
  573.                 "{{ app.request.schemeAndHttpHost }}{{ asset(img, 'save_image') }}"{% if not loop.last %},{% endif %}
  574.             {% else %}
  575.                 "{{ app.request.schemeAndHttpHost }}{{ asset(''|no_image_product, 'save_image') }}"
  576.             {% endfor %}
  577.         ],
  578.         "description": "{{ Product.description_list | default(Product.description_detail) | replace({'\n': '', '\r': ''}) | slice(0,300) }}",
  579.         {% if Product.code_min %}
  580.         "sku": "{{ Product.code_min }}",
  581.         {% endif %}
  582.         "offers": {
  583.             "@type": "Offer",
  584.             "url": "{{ url('product_detail', {'id': Product.id}) }}",
  585.             "priceCurrency": "{{ eccube_config.currency }}",
  586.             "price": {{ Product.getPrice02IncTaxMin ? Product.getPrice02IncTaxMin : 0}},
  587.             "availability": "{{ Product.stock_find ? "InStock" : "OutOfStock" }}"
  588.         }
  589.     }
  590.     </script>
  591.     <script>
  592.         $(function() {
  593.             // 規格1が変更されたとき
  594.             $('#classcategory_id1').on('change', function() {
  595.                 updateStock();
  596.             });
  597.             // 規格2が変更されたとき
  598.             $('#classcategory_id2').on('change', function() {
  599.                 updateStock();
  600.             });
  601.             // 初期表示時
  602.             updateStock();
  603.             // 在庫表示を更新する関数
  604.             function updateStock() {
  605.                 // 現在選択されているProductClassのデータを取得
  606.                 var productClassId = $('#ProductClass').val();
  607.                 if (!productClassId) {
  608.                     $('#selected-stock-quantity').text('{{ 'front.product.please_select_product_class'|trans }}');
  609.                     return;
  610.                 }
  611.                 // 選択された商品規格の情報を取得
  612.                 var classCategory1 = $('#classcategory_id1').val() || '__unselected';
  613.                 var classCategory2 = $('#classcategory_id2').val() || '';
  614.                 // 商品規格情報を取得
  615.                 var productClass = null;
  616.                 if (eccube.classCategories[classCategory1]) {
  617.                     if (classCategory2 && eccube.classCategories[classCategory1]['#' + classCategory2]) {
  618.                         productClass = eccube.classCategories[classCategory1]['#' + classCategory2];
  619.                     } else if (eccube.classCategories[classCategory1]['#']) {
  620.                         productClass = eccube.classCategories[classCategory1]['#'];
  621.                     }
  622.                 }
  623.                 if (!productClass) {
  624.                     $('#selected-stock-quantity').text('{{ 'front.product.please_select_product_class'|trans }}');
  625.                     return;
  626.                 }
  627.                 // 在庫表示を更新
  628.                 var stockQuantityElement = $('#selected-stock-quantity');
  629.                 if (productClass.stock !== null && productClass.stock > 0) {
  630.                     stockQuantityElement.text(productClass.stock);
  631.                 } else {
  632.                     stockQuantityElement.text('{{ 'front.product.out_of_stock'|trans }}');
  633.                 }
  634.             }
  635.         });
  636.     </script>
  637. {% endblock %}
  638. {% block main %}
  639.     <div class="ec-productRole">
  640.         <div class="ec-pageHeader">
  641.             <h1 class="km_pagetitle">{{ Product.name }}</h1>
  642.         </div>
  643.         <div class="detail-top-image">
  644.             <img src="{{ asset(Product.ProductImage[0], 'save_image') }}">
  645.         </div>
  646.         <div class="ec-productRole__profile">
  647.             {# 住所 #}
  648.             {% if Product.kofun_product_type and Product.kofun_product_type.id == 1 %}
  649.                 <div class="ec-productRole__kofun-address">
  650.                     {{ Product.Kofun.Pref.name ?? '' }}{{ Product.Kofun.addr01 }}{{ Product.Kofun.addr02 }}
  651.                 </div>
  652.             {% endif %}
  653.             {# タグ #}
  654.             {% if Product.Tags is not empty %}
  655.                 <ul class="ec-productRole__tags">
  656.                     {% for Tag in Product.Tags %}
  657.                         <li class="ec-productRole__tag tag_{{ Tag.id }}">{{ Tag }}</li>
  658.                     {% endfor %}
  659.                 </ul>
  660.             {% endif %}
  661.             {# 通常価格 #}
  662.             {% if Product.hasProductClass -%}
  663.                 <div class="ec-productRole__priceRegular">
  664.                     {% if Product.getPrice01Min is not null and Product.getPrice01IncTaxMin == Product.getPrice01IncTaxMax %}
  665.                         <span class="ec-productRole__priceRegularPrice">{{ 'front.product.normal_price'|trans }}:<span class="price01-default">{{ Product.getPrice01IncTaxMin|price }}</span></span>
  666.                         <span class="ec-productRole__priceRegularTax">{{ 'common.tax_include'|trans }}</span>
  667.                     {% elseif Product.getPrice01Min is not null and Product.getPrice01Max is not null %}
  668.                         <span class="ec-productRole__priceRegularPrice">{{ 'front.product.normal_price'|trans }}:<span class="price01-default">{{ Product.getPrice01IncTaxMin|price }}~ {{ Product.getPrice01IncTaxMax|price }}</span></span>
  669.                         <span class="ec-productRole__priceRegularTax">{{ 'common.tax_include'|trans }}</span>
  670.                     {% endif %}
  671.                 </div>
  672.             {% else %}
  673.                 {% if Product.getPrice01Max is not null %}
  674.                     <span class="ec-productRole__priceRegularPrice">{{ 'front.product.normal_price'|trans }}:{{ Product.getPrice01IncTaxMin|price }}</span>
  675.                     <span class="ec-productRole__priceRegularTax">{{ 'common.tax_include'|trans }}</span>
  676.                 {% endif %}
  677.             {% endif %}
  678.             {# 販売価格 #}
  679.             <div class="ec-productRole__price">
  680.                 {% if Product.hasProductClass -%}
  681.                     {% if Product.getPrice02IncTaxMin == Product.getPrice02IncTaxMax %}
  682.                         <div class="ec-price">
  683.                             <span class="ec-price__price price02-default">{{ Product.getPrice02IncTaxMin|price }}</span>
  684.                             <span class="ec-price__tax">{{ 'common.tax_include'|trans }}</span>
  685.                         </div>
  686.                     {% else %}
  687.                         <div class="ec-price">
  688.                             <span class="ec-price__price price02-default">{{ Product.getPrice02IncTaxMin|price }} ~ {{ Product.getPrice02IncTaxMax|price }}</span>
  689.                             <span class="ec-price__tax">{{ 'common.tax_include'|trans }}</span>
  690.                         </div>
  691.                     {% endif %}
  692.                 {% else %}
  693.                     <div class="ec-price">
  694.                         <span class="ec-price__price">{{ Product.getPrice02IncTaxMin|price }}</span>
  695.                         <span class="ec-price__tax">{{ 'common.tax_include'|trans }}</span>
  696.                     </div>
  697.                 {% endif %}
  698.             </div>
  699.         </div>
  700.         {% if Product.kofun_product_type and Product.kofun_product_type.id == 1 %}
  701.             <div class="ec-productRole__kofun">
  702.                 <div class="ec-productRole__kofun-content description-detail">
  703.                     {{ Product.Kofun.descriptionDetail|raw|nl2br }}
  704.                 </div>
  705.                 <div class="ec-productRole__kofun-appeal-points">
  706.                     <div class="title">{{ 'front.kofun.appeal_points_title'|trans }}</div>
  707.                     <div class="content">
  708.                         {{ Product.Kofun.appealPoints|raw|nl2br }}
  709.                     </div>
  710.                 </div>
  711.                 <div class="ec-productRole__kofun-content scroll-to-checkout">
  712.                     <a href="#checkout">
  713.                         <span>ご購入はこちらから</span>
  714.                     </a>
  715.                 </div>
  716.                 <div class="ec-productRole__kofun-content access">
  717.                     <h2>アクセス</h2>
  718.                     <div class="content">
  719.                         {{ Product.Kofun.access|raw|nl2br }}
  720.                     </div>
  721.                 </div>
  722.                 {% if app.environment == 'prod' %}
  723.                     {% if Product.Kofun.id == 'bj0zQKulUcfULgr06dwy' %}
  724.                         {% set visit_url = 'https://calendar.app.google/DSkdUAXqMmRxZnti8' %}
  725.                     {% elseif Product.Kofun.id == 'FaUkQoWKRHRumqlKIvgg' %}
  726.                         {% set visit_url = 'https://calendar.app.google/SasLwuKaFwQSZZrz7' %}
  727.                     {% endif %}
  728.                 {% elseif app.environment == 'dev' %}
  729.                     {% set visit_url = 'https://calendar.app.google/ECkmJUvKpra9SSQU9' %}
  730.                 {% endif %}
  731.                 {% if visit_url is defined %}
  732.                 <div class="ec-productRole__kofun-content visit-reservation">
  733.                     <a href="{{ visit_url }}" target="_blank">
  734.                         <span>見学のご予約はこちらから</span>
  735.                     </a>
  736.                 </div>
  737.                 {% endif %}
  738.                 <div class="ec-productRole__kofun-content basicline">
  739.                     <h2>基本情報</h2>
  740.                     <div class="content">
  741.                         <span class="label">{{ 'front.kofun.base_info__danka_duty'|trans }}</span>{{ Product.Kofun.dankaDuty|raw|nl2br }}
  742.                     </div>
  743.                     <div class="content">
  744.                         <span class="label">{{ 'front.kofun.base_info__religion'|trans }}</span>{{ Product.Kofun.religion|raw|nl2br }}
  745.                     </div>
  746.                     <div class="content">
  747.                         <span class="label">{{ 'front.kofun.base_info__successor'|trans }}</span>{{ Product.Kofun.successor|raw|nl2br }}
  748.                     </div>
  749.                     <div class="content">
  750.                         <span class="label">{{ 'front.kofun.base_info__ritual'|trans }}</span>{{ Product.Kofun.ritual|raw|nl2br }}
  751.                     </div>
  752.                     <div class="content">
  753.                         <span class="label">{{ 'front.kofun.base_info__features'|trans }}</span>{{ Product.Kofun.features|raw|nl2br }}
  754.                     </div>
  755.                     <div class="content">
  756.                         <span class="label">{{ 'front.kofun.base_info__facilities'|trans }}</span>{{ Product.Kofun.facilities|raw|nl2br }}
  757.                     </div>
  758.                     <div class="content">
  759.                         <span class="label">{{ 'front.kofun.base_info__business_hours'|trans }}</span>{{ Product.Kofun.businessHours|raw|nl2br }}
  760.                     </div>
  761.                     <div class="content">
  762.                         <span class="label">{{ 'front.kofun.base_info__holidays'|trans }}</span>{{ Product.Kofun.holidays|raw|nl2br }}
  763.                     </div>
  764.                 </div>
  765.                 <div class="ec-productRole__kofun-content basicline">
  766.                     <h2>古墳の概要</h2>
  767.                     <div class="content">
  768.                         <span class="label">【形状】</span>
  769.                         <div class="value">
  770.                             {{ Product.Kofun.shape|raw|nl2br }}
  771.                         </div>
  772.                     </div>
  773.                     <div class="content">
  774.                         <span class="label">【区画】</span>
  775.                         <div class="value">
  776.                             <div>{{ 'front.kofun.kofun_summary__section_one_person'|trans({'%count%': Product.Kofun.onePersonSectionCount}) }}</div>
  777.                             {% if (Product.Kofun.twoPersonSectionCount > 0) %}
  778.                             <div>{{ 'front.kofun.kofun_summary__section_two_person'|trans({'%count%': Product.Kofun.twoPersonSectionCount}) }}</div>
  779.                             {% endif %}
  780.                             <div>{{ 'front.kofun.kofun_summary__section_communal'|trans({'%count%': Product.Kofun.communalSectionCount}) }}</div>
  781.                         </div>
  782.                     </div>
  783.                     <div class="content">
  784.                         <span class="label">【副葬品】</span>
  785.                         <div class="value">
  786.                             {{ Product.Kofun.burialGoods|raw|nl2br }}
  787.                         </div>
  788.                     </div>
  789.                     <div class="content">
  790.                         <span class="label">【販売開始日】</span>
  791.                         <div class="value">
  792.                             {{ Product.Kofun.salesStartDate|raw|nl2br }}
  793.                         </div>
  794.                     </div>
  795.                     <div class="content">
  796.                         <span class="label">【完成予定日】</span>
  797.                         <div class="value">
  798.                             {{ Product.Kofun.completionDate|raw|nl2br }}
  799.                         </div>
  800.                     </div>
  801.                     {% for BlueprintImage in Product.Kofun.BlueprintImage %}
  802.                         <div class="blueprint-image">
  803.                             <img src="{{ asset(BlueprintImage, 'save_image') }}">
  804.                         </div>
  805.                     {% endfor %}
  806.                     <div class="ec-grid3">
  807.                         {% set descriptions = Product.imageDescriptions|split('|') %}
  808.                         {% for ProductImage in Product.ProductImage|slice(1, 3) %}
  809.                             <div class="ec-grid3__cell product-image">
  810.                                 <img src="{{ asset(ProductImage, 'save_image') }}" alt="" loading="lazy">
  811.                                 {% if descriptions[loop.index0] is defined %}
  812.                                     <div class="product-image-description">
  813.                                         {{ descriptions[loop.index0]|raw|nl2br }}
  814.                                     </div>
  815.                                 {% endif %}
  816.                             </div>
  817.                         {% endfor %}
  818.                     </div>
  819.                 </div>
  820.                 <div class="ec-productRole__kofun-content scroll-to-checkout">
  821.                     <a href="#checkout">
  822.                         <span>ご購入はこちらから</span>
  823.                     </a>
  824.                 </div>
  825.                 {% if Product.movie_url %}
  826.                 <div class="ec-productRole__kofun-content introduction_movie">
  827.                     <h2>{{ 'front.kofun.introduction_movie'|trans }}</h2>
  828.                     <div class="ec-productRole__movie">
  829.                         {% for movie_url in Product.movie_url|split('\n') %}
  830.                             <div class="movie-item">
  831.                                 <iframe src="https://www.youtube.com/embed/{{ movie_url|split(',')|first }}?mute=1&rel=0&loop=1" frameborder="0" allow="picture-in-picture" allowfullscreen></iframe>
  832.                                 {% if movie_url|split(',')|length > 1 %}
  833.                                     <div class="movie-caption">
  834.                                         {{ movie_url|split(',', 2)|last }}
  835.                                     </div>
  836.                                 {% endif %}
  837.                             </div>
  838.                         {% endfor %}
  839.                     </div>
  840.                 </div>
  841.                 {% endif %}
  842.                 <div class="ec-productRole__kofun-content price-table">
  843.                     <h2>{{ 'front.kofun.price_table'|trans }}</h2>
  844.                     <div class="header">
  845.                         <span class="label">{{ 'front.kofun.price_table_header__type'|trans }}</span>
  846.                         <div class="value">
  847.                             {{ 'front.kofun.price_table_header__price'|trans }}
  848.                         </div>
  849.                     </div>
  850.                     {% for ProductClass in Product.ProductClasses %}
  851.                     <div class="content">
  852.                         <span class="label">{{ ProductClass.ClassCategory1.Name }}</span>
  853.                         <div class="value">
  854.                             {{ 'front.kofun.price_table_data__price'|trans({'%price1%': ProductClass.eternalUseFee|number_format, '%price2%': ProductClass.miscellaneousFee|number_format, '%price3%': ProductClass.Price02|number_format}) }}
  855.                         </div>
  856.                     </div>
  857.                     {% endfor %}
  858.                     <div class="note">{{ 'front.kofun.price_table_note'|trans }}</div>
  859.                 </div>
  860.                 <div class="ec-productRole__kofun-content">
  861.                     <h3>{{ 'front.kofun.fee_list'|trans }}</h3>
  862.                     <div class="tab-container">
  863.                         <div class="tab-buttons">
  864.                             <button class="tab-button active" data-tab="eternal">{{ 'front.kofun.fee_list__eternal'|trans }}</button>
  865.                             <button class="tab-button" data-tab="communal">{{ 'front.kofun.fee_list__communal'|trans }}</button>
  866.                         </div>
  867.                         <div id="eternal" class="tab-content active">
  868.                             {% if (Product.Kofun.eternalBurialFee > 0) %}
  869.                             <div class="content">
  870.                                 <span class="label">{{ 'front.kofun.fee_list__burial'|trans }}</span>
  871.                                 <div class="value">
  872.                                     {{ 'front.kofun.fee_list__unit_price'|trans({'%price%': Product.Kofun.eternalBurialFee|number_format}) }}
  873.                                     <div class="fee-note">{{ 'front.kofun.fee_list__note'|trans }}</div>
  874.                                 </div>
  875.                             </div>
  876.                             <div class="content">
  877.                                 <span class="label">{{ 'front.kofun.fee_list__inscription'|trans }}</span>
  878.                                 <div class="value">
  879.                                     {{ 'front.kofun.fee_list__unit_price'|trans({'%price%': Product.Kofun.eternalInscriptionFee|number_format}) }}
  880.                                 </div>
  881.                             </div>
  882.                             <div class="content">
  883.                                 <span class="label">{{ 'front.kofun.fee_list__maintenance'|trans }}</span>
  884.                                 <div class="value">
  885.                                     {{ 'front.kofun.fee_list__section_price'|trans({'%price%': Product.Kofun.eternalMaintenanceFee|number_format}) }}
  886.                                 </div>
  887.                             </div>
  888.                             <div class="content-group">
  889.                                 <div class="content">
  890.                                     <span class="label">{{ 'front.kofun.fee_list__eternal_single_misc'|trans }}</span>
  891.                                     <div class="value">
  892.                                         {{ 'front.kofun.fee_list__total_price'|trans({'%price%': Product.Kofun.singleMiscFee|number_format}) }}
  893.                                     </div>
  894.                                 </div>
  895.                                 <div class="content">
  896.                                     <span class="label">{{ 'front.kofun.fee_list__eternal_double_misc'|trans }}</span>
  897.                                     <div class="value">
  898.                                         {{ 'front.kofun.fee_list__total_price'|trans({'%price%': Product.Kofun.doubleMiscFee|number_format}) }}
  899.                                     </div>
  900.                                 </div>
  901.                             </div>
  902.                             {% else %}
  903.                             <div class="content">
  904.                                 <span class="label">諸費用</span>
  905.                                 <div class="value">
  906.                                     入山費、納骨料、骨壺代、植栽維持費(管理費)合わせて{{ Product.Kofun.eternalMaintenanceFee|number_format }}円(税込)
  907.                                     <div class="fee-note">※ 墓誌銘板および彫刻は含まれていません。</div>
  908.                                 </div>
  909.                             </div>
  910.                             {% endif %}
  911.                             <div class="content-group">
  912.                                 <h5>オプション</h5>
  913.                                 {% if (Product.Kofun.eternalBurialFee > 0) %}
  914.                                 <div class="content">
  915.                                     <span class="label">{{ 'front.kofun.fee_list__option_extension'|trans }}</span>
  916.                                     <div class="value">
  917.                                         {{ 'front.kofun.fee_list__option_extension_price'|trans({'%price%': Product.Kofun.extensionFee|number_format}) }}
  918.                                         <div class="fee-note">{{ 'front.kofun.fee_list__option_note'|trans }}</div>
  919.                                     </div>
  920.                                 </div>
  921.                                 {% else %}
  922.                                 <div class="content">
  923.                                     <span class="label">{{ 'front.kofun.fee_list__option_extension'|trans }}</span>
  924.                                     <div class="value">
  925.                                         20年まで10年間ごとに{{ Product.Kofun.extensionFee|number_format }}円(非課税)<br/>
  926.                                         永年使用は515,000円(非課税)
  927.                                         <div class="fee-note">{{ 'front.kofun.fee_list__option_note'|trans }}</div>
  928.                                     </div>
  929.                                 </div>
  930.                                 <div class="content">
  931.                                     <span class="label">墓誌彫刻</span>
  932.                                     <div class="value">
  933.                                         22,000円(税込)
  934.                                         <div class="fee-note">※ ご希望のお客様は古墳墓をご購入後、お問い合わせからお申し込みください。</div>
  935.                                     </div>
  936.                                 </div>
  937.                                 {% endif %}
  938.                             </div>
  939.                         </div>
  940.                         <div id="communal" class="tab-content">
  941.                             {% if (Product.Kofun.communalBurialFee > 0) %}
  942.                             <div class="content">
  943.                                 <span class="label">{{ 'front.kofun.fee_list__burial'|trans }}</span>
  944.                                 <div class="value">
  945.                                     {{ 'front.kofun.fee_list__price'|trans({'%price%': Product.Kofun.communalBurialFee|number_format}) }}
  946.                                 </div>
  947.                             </div>
  948.                             <div class="content">
  949.                                 <span class="label">{{ 'front.kofun.fee_list__inscription'|trans }}</span>
  950.                                 <div class="value">
  951.                                     {{ 'front.kofun.fee_list__price'|trans({'%price%': Product.Kofun.communalInscriptionFee|number_format}) }}
  952.                                 </div>
  953.                             </div>
  954.                             <div class="content">
  955.                                 <span class="label">{{ 'front.kofun.fee_list__maintenance'|trans }}</span>
  956.                                 <div class="value">
  957.                                     {{ 'front.kofun.fee_list__price'|trans({'%price%': Product.Kofun.communalMaintenanceFee|number_format}) }}
  958.                                 </div>
  959.                             </div>
  960.                             <div class="content-group">
  961.                                 <div class="content">
  962.                                     <span class="label">{{ 'front.kofun.fee_list__communal_misc'|trans }}</span>
  963.                                     <div class="value">
  964.                                         {{ 'front.kofun.fee_list__total_price'|trans({'%price%': Product.Kofun.communalMiscFee|number_format}) }}
  965.                                     </div>
  966.                                 </div>
  967.                             </div>
  968.                             {% else %}
  969.                             <div class="content">
  970.                                 <span class="label">諸費用</span>
  971.                                 <div class="value">
  972.                                     入山費、納骨料、植栽維持費(管理費)合わせて{{ Product.Kofun.communalMaintenanceFee|number_format }}円(税込)
  973.                                 </div>
  974.                             </div>
  975.                             {% endif %}
  976.                         </div>
  977.                     </div>
  978.                 </div>
  979.                 <div class="ec-productRole__kofun-content buy_process">
  980.                     <h2>古墳墓のお手続き</h2>
  981.                     <div class="content">
  982.                         ①料金表と霊園規則をご確認の上、ご注文ください。
  983.                     </div>
  984.                     <div class="content">
  985.                         ②ご購入に際し、お申込者様の続柄確認書類をご提出いただきます。写真のアップロード、または郵送にてご提出をお願いいたします。
  986.                     </div>
  987.                     <div class="content sub">
  988.                         ※続柄確認書類とはお申込者及び埋葬予定者の本籍地と世帯全員のお名前が記載されたものとなります。(住民票や戸籍謄本など)発行から3カ月以内
  989.                     </div>
  990.                     <div class="content">
  991.                         ③お支払い確認後、霊園から「永代使用承諾証」をお送りいたします。
  992.                     </div>
  993.                     <div class="content link">
  994.                         {% if Product.Kofun.termsFileName %}
  995.                             <a href="{{ asset(Product.Kofun.termsFileName, 'terms_file') }}" target="_blank">墓地使用規則>></a>
  996.                         {% else %}
  997.                             <div class="warning">墓地使用規則がアップロードされていません。</div>
  998.                         {% endif %}
  999.                     </div>
  1000.                 </div>
  1001.             </div>
  1002.         {% endif %}
  1003.         <div class="ec-productRole__description">{{ Product.description_detail|raw|nl2br }}
  1004.         </div>
  1005.         {% if Product.freearea %}
  1006.              <div class="ec-productRole__description">
  1007.                  {{ include(template_from_string(Product.freearea), sandboxed = true) }}
  1008.             </div>
  1009.         {% endif %}
  1010.         <div class="ec-productRole__profile" id="checkout">
  1011.             {# タグ #}
  1012.             {% if Product.Tags is not empty %}
  1013.                 <ul class="ec-productRole__tags">
  1014.                     {% for Tag in Product.Tags %}
  1015.                         <li class="ec-productRole__tag tag_{{ Tag.id }}">{{ Tag }}</li>
  1016.                     {% endfor %}
  1017.                 </ul>
  1018.             {% endif %}
  1019.             {# 通常価格 #}
  1020.             {% if Product.hasProductClass -%}
  1021.                 <div class="ec-productRole__priceRegular">
  1022.                     {% if Product.getPrice01Min is not null and Product.getPrice01IncTaxMin == Product.getPrice01IncTaxMax %}
  1023.                         <span class="ec-productRole__priceRegularPrice">{{ 'front.product.normal_price'|trans }}:<span class="price01-default">{{ Product.getPrice01IncTaxMin|price }}</span></span>
  1024.                         <span class="ec-productRole__priceRegularTax">{{ 'common.tax_include'|trans }}</span>
  1025.                     {% elseif Product.getPrice01Min is not null and Product.getPrice01Max is not null %}
  1026.                         <span class="ec-productRole__priceRegularPrice">{{ 'front.product.normal_price'|trans }}:<span class="price01-default">{{ Product.getPrice01IncTaxMin|price }}~ {{ Product.getPrice01IncTaxMax|price }}</span></span>
  1027.                         <span class="ec-productRole__priceRegularTax">{{ 'common.tax_include'|trans }}</span>
  1028.                     {% endif %}
  1029.                 </div>
  1030.             {% else %}
  1031.                 {% if Product.getPrice01Max is not null %}
  1032.                     <span class="ec-productRole__priceRegularPrice">{{ 'front.product.normal_price'|trans }}:{{ Product.getPrice01IncTaxMin|price }}</span>
  1033.                     <span class="ec-productRole__priceRegularTax">{{ 'common.tax_include'|trans }}</span>
  1034.                 {% endif %}
  1035.             {% endif %}
  1036.             {# 販売価格 #}
  1037.             <div class="ec-productRole__price">
  1038.                 {% if Product.hasProductClass -%}
  1039.                     {% if Product.getPrice02IncTaxMin == Product.getPrice02IncTaxMax %}
  1040.                         <div class="ec-price">
  1041.                             <span class="ec-price__price price02-default">{{ Product.getPrice02IncTaxMin|price }}</span>
  1042.                             <span class="ec-price__tax">{{ 'common.tax_include'|trans }}</span>
  1043.                         </div>
  1044.                     {% else %}
  1045.                         <div class="ec-price">
  1046.                             <span class="ec-price__price price02-default">{{ Product.getPrice02IncTaxMin|price }} ~ {{ Product.getPrice02IncTaxMax|price }}</span>
  1047.                             <span class="ec-price__tax">{{ 'common.tax_include'|trans }}</span>
  1048.                         </div>
  1049.                     {% endif %}
  1050.                 {% else %}
  1051.                     <div class="ec-price">
  1052.                         <span class="ec-price__price">{{ Product.getPrice02IncTaxMin|price }}</span>
  1053.                         <span class="ec-price__tax">{{ 'common.tax_include'|trans }}</span>
  1054.                     </div>
  1055.                 {% endif %}
  1056.             </div>
  1057.             {# 商品コード #}
  1058.             {% if Product.code_min is not empty %}
  1059.                 <div class="ec-productRole__code">
  1060.                     {{ 'front.product.code'|trans }}: <span class="product-code-default">{{ Product.code_min }}{% if Product.code_min != Product.code_max %} ~ {{ Product.code_max }}{% endif %}</span>
  1061.                 </div>
  1062.             {% endif %}
  1063.             {# 関連カテゴリ #}
  1064.             {% if Product.ProductCategories is not empty %}
  1065.                 <div class="ec-productRole__category">
  1066.                     {% for ProductCategory in Product.ProductCategories %}
  1067.                         <ul>
  1068.                             <li>
  1069.                                 {% for Category in ProductCategory.Category.path %}
  1070.                                     <a href="{{ url('product_list') }}?category_id={{ Category.id }}">{{ Category.name }}</a> {%- if loop.last == false %}
  1071.                                     <span>></span>{% endif -%}
  1072.                                 {% endfor %}
  1073.                             </li>
  1074.                         </ul>
  1075.                     {% endfor %}
  1076.                 </div>
  1077.             {% endif %}
  1078.             <form action="{{ url('product_add_cart', {id:Product.id}) }}" method="post" id="form1" name="form1">
  1079.                 {% if Product.stock_find %}
  1080.                     <div class="ec-productRole__actions">
  1081.                         {% if form.classcategory_id1 is defined %}
  1082.                             <div class="ec-select">
  1083.                                 {{ form_row(form.classcategory_id1) }}
  1084.                                 {{ form_errors(form.classcategory_id1) }}
  1085.                             </div>
  1086.                             {% if form.classcategory_id2 is defined %}
  1087.                                 <div class="ec-select">
  1088.                                     {{ form_row(form.classcategory_id2) }}
  1089.                                     {{ form_errors(form.classcategory_id2) }}
  1090.                                 </div>
  1091.                             {% endif %}
  1092.                         {% endif %}
  1093.                         <div class="ec-productRole__stock" id="selected-product-stock" style="margin-bottom: 10px;">
  1094.                             <span>{{ 'front.product.stock'|trans }}</span>
  1095.                             <span class="ec-productRole__stockQuantity" id="selected-stock-quantity">
  1096.                                 {{ 'front.product.please_select_product_class'|trans }}
  1097.                             </span>
  1098.                         </div>
  1099.                         <div class="ec-numberInput"><span>{{ 'common.quantity'|trans }}</span>
  1100.                             {{ form_widget(form.quantity) }}
  1101.                             {{ form_errors(form.quantity) }}
  1102.                         </div>
  1103.                     </div>
  1104.                     {% if Product.isCanAddCart %}
  1105.                         <div class="ec-productRole__btn">
  1106.                             <button type="submit" class="ec-blockBtn--action add-cart">
  1107.                                 {{ 'front.product.add_cart'|trans }}
  1108.                             </button>
  1109.                         </div>
  1110.                     {% else %}
  1111.                         <div class="ec-productRole__btn">
  1112.                             <button type="button" class="ec-blockBtn--action" disabled="disabled">
  1113.                                 {{ 'front.product.can_not_add_cart'|trans }}
  1114.                             </button>
  1115.                         </div>
  1116.                     {% endif %}
  1117.                 {% else %}
  1118.                     <div class="ec-productRole__btn">
  1119.                         <button type="button" class="ec-blockBtn--action" disabled="disabled">
  1120.                             {{ 'front.product.out_of_stock'|trans }}
  1121.                         </button>
  1122.                     </div>
  1123.                 {% endif %}
  1124.                 {{ form_rest(form) }}
  1125.             </form>
  1126.             <div class="ec-modal">
  1127.                 <div class="ec-modal-overlay">
  1128.                     <div class="ec-modal-wrap">
  1129.                         <span class="ec-modal-close"><span class="ec-icon"><img src="{{ asset('assets/icon/cross-dark.svg') }}" alt=""/></span></span>
  1130.                         <div id="ec-modal-header" class="text-center">{{ 'front.product.add_cart_complete'|trans }}</div>
  1131.                         <div class="ec-modal-box">
  1132.                             <div class="ec-role">
  1133.                                 <span class="ec-inlineBtn--cancel">{{ 'front.product.continue'|trans }}</span>
  1134.                                 <a href="{{ url('cart') }}" class="ec-inlineBtn--action">{{ 'common.go_to_cart'|trans }}</a>
  1135.                             </div>
  1136.                         </div>
  1137.                     </div>
  1138.                 </div>
  1139.             </div>
  1140.             {% if BaseInfo.option_favorite_product %}
  1141.                 <form action="{{ url('product_add_favorite', {id:Product.id}) }}" method="post">
  1142.                     <div class="ec-productRole__btn">
  1143.                         {% if is_favorite == false %}
  1144.                             <button type="submit" id="favorite" class="ec-blockBtn--cancel">
  1145.                                 {{ 'front.product.add_favorite'|trans }}
  1146.                             </button>
  1147.                         {% else %}
  1148.                             <button type="submit" id="favorite" class="ec-blockBtn--cancel"
  1149.                                     disabled="disabled">{{ 'front.product.add_favorite_alrady'|trans }}
  1150.                             </button>
  1151.                         {% endif %}
  1152.                     </div>
  1153.                 </form>
  1154.             {% endif %}
  1155.         </div>
  1156.     </div>
  1157. {% endblock %}