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

Open in your IDE?
  1. {#
  2. This file is part of EC-CUBE
  3. Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  4. http://www.ec-cube.co.jp/
  5. For the full copyright and license information, please view the LICENSE
  6. file that was distributed with this source code.
  7. #}
  8. {% extends 'default_frame.twig' %}
  9. {% set body_class = 'product_page' %}
  10. {% block stylesheet %}
  11.     <style>
  12.         .slick-slider {
  13.             margin-bottom: 30px;
  14.         }
  15.         .slick-dots {
  16.             position: absolute;
  17.             bottom: -45px;
  18.             display: block;
  19.             width: 100%;
  20.             padding: 0;
  21.             list-style: none;
  22.             text-align: center;
  23.         }
  24.         .slick-dots li {
  25.             position: relative;
  26.             display: inline-block;
  27.             width: 20px;
  28.             height: 20px;
  29.             margin: 0 5px;
  30.             padding: 0;
  31.             cursor: pointer;
  32.         }
  33.         .slick-dots li button {
  34.             font-size: 0;
  35.             line-height: 0;
  36.             display: block;
  37.             width: 20px;
  38.             height: 20px;
  39.             padding: 5px;
  40.             cursor: pointer;
  41.             color: transparent;
  42.             border: 0;
  43.             outline: none;
  44.             background: transparent;
  45.         }
  46.         .slick-dots li button:hover,
  47.         .slick-dots li button:focus {
  48.             outline: none;
  49.         }
  50.         .slick-dots li button:hover:before,
  51.         .slick-dots li button:focus:before {
  52.             opacity: 1;
  53.         }
  54.         .slick-dots li button:before {
  55.             content: " ";
  56.             line-height: 20px;
  57.             position: absolute;
  58.             top: 0;
  59.             left: 0;
  60.             width: 12px;
  61.             height: 12px;
  62.             text-align: center;
  63.             opacity: .25;
  64.             background-color: black;
  65.             border-radius: 50%;
  66.         }
  67.         .slick-dots li.slick-active button:before {
  68.             opacity: .75;
  69.             background-color: black;
  70.         }
  71.         .slick-dots li button.thumbnail img {
  72.             width: 0;
  73.             height: 0;
  74.         }
  75.     </style>
  76. {% endblock %}
  77. {% block javascript %}
  78.     <script>
  79.         eccube.classCategories = {{ class_categories_as_json(Product)|raw }};
  80.         
  81.         // 規格2に選択肢を割り当てる。
  82.         function fnSetClassCategories(form, classcat_id2_selected) {
  83.             var $form = $(form);
  84.             var product_id = $form.find('input[name=product_id]').val();
  85.             var $sele1 = $form.find('select[name=classcategory_id1]');
  86.             var $sele2 = $form.find('select[name=classcategory_id2]');
  87.             eccube.setClassCategories($form, product_id, $sele1, $sele2, classcat_id2_selected);
  88.         }
  89.         {% if form.classcategory_id2 is defined %}
  90.         fnSetClassCategories(
  91.             $('#form1'), {{ form.classcategory_id2.vars.value|json_encode|raw }}
  92.         );
  93.         {% elseif form.classcategory_id1 is defined %}
  94.         eccube.checkStock($('#form1'), {{ Product.id }}, {{ form.classcategory_id1.vars.value|json_encode|raw }}, null);
  95.         {% endif %}
  96.     </script>
  97.     <script>
  98.         $(function() {
  99.             // bfcache無効化
  100.             $(window).bind('pageshow', function(event) {
  101.                 if (event.originalEvent.persisted) {
  102.                     location.reload(true);
  103.                 }
  104.             });
  105.             // Core Web Vital の Cumulative Layout Shift(CLS)対策のため
  106.             // img タグに width, height が付与されている.
  107.             // 630px 未満の画面サイズでは縦横比が壊れるための対策
  108.             // see https://github.com/EC-CUBE/ec-cube/pull/5023
  109.             $('.ec-grid2__cell').hide();
  110.             var removeSize = function () {
  111.                 $('.slide-item').height('');
  112.                 $('.slide-item img')
  113.                     .removeAttr('width')
  114.                     .removeAttr('height')
  115.                     .removeAttr('style');
  116.             };
  117.             var slickInitial = function(slick) {
  118.                 $('.ec-grid2__cell').fadeIn(1500);
  119.                 var baseHeight = $(slick.target).height();
  120.                 var baseWidth = $(slick.target).width();
  121.                 var rate = baseWidth / baseHeight;
  122.                 $('.slide-item').height(baseHeight * rate); // 余白を削除する
  123.                 // transform を使用することでCLSの影響を受けないようにする
  124.                 $('.slide-item img')
  125.                     .css(
  126.                         {
  127.                             'transform-origin': 'top left',
  128.                             'transform': 'scaleY(' + rate + ')',
  129.                             'transition': 'transform .1s'
  130.                         }
  131.                     );
  132.                 // 正しいサイズに近くなったら属性を解除する
  133.                 setTimeout(removeSize, 500);
  134.             };
  135.             $('.item_visual').on('init', slickInitial);
  136.             // リサイズ時は CLS の影響を受けないため属性を解除する
  137.             $(window).resize(removeSize);
  138.             $('.item_visual').slick({
  139.                 dots: false,
  140.                 arrows: false,
  141.                 responsive: [{
  142.                     breakpoint: 768,
  143.                     settings: {
  144.                         dots: true
  145.                     }
  146.                 }]
  147.             });
  148.             $('.slideThumb').on('click', function() {
  149.                 var index = $(this).attr('data-index');
  150.                 $('.item_visual').slick('slickGoTo', index, false);
  151.             })
  152.         });
  153.     </script>
  154.     <script>
  155.         $(function() {
  156.             $('.add-cart').on('click', function(event) {
  157.                 {% if form.classcategory_id1 is defined %}
  158.                 // 規格1フォームの必須チェック
  159.                 if ($('#classcategory_id1').val() == '__unselected' || $('#classcategory_id1').val() == '') {
  160.                     $('#classcategory_id1')[0].setCustomValidity('{{ '項目が選択されていません'|trans }}');
  161.                     return true;
  162.                 } else {
  163.                     $('#classcategory_id1')[0].setCustomValidity('');
  164.                 }
  165.                 {% endif %}
  166.                 {% if form.classcategory_id2 is defined %}
  167.                 // 規格2フォームの必須チェック
  168.                 if ($('#classcategory_id2').val() == '__unselected' || $('#classcategory_id2').val() == '') {
  169.                     $('#classcategory_id2')[0].setCustomValidity('{{ '項目が選択されていません'|trans }}');
  170.                     return true;
  171.                 } else {
  172.                     $('#classcategory_id2')[0].setCustomValidity('');
  173.                 }
  174.                 {% endif %}
  175.                 // 個数フォームのチェック
  176.                 if ($('#quantity').val() < 1) {
  177.                     $('#quantity')[0].setCustomValidity('{{ '1以上で入力してください。'|trans }}');
  178.                     return true;
  179.                 } else {
  180.                     $('#quantity')[0].setCustomValidity('');
  181.                 }
  182.                 event.preventDefault();
  183.                 $form = $('#form1');
  184.                 $.ajax({
  185.                     url: $form.attr('action'),
  186.                     type: $form.attr('method'),
  187.                     data: $form.serialize(),
  188.                     dataType: 'json',
  189.                     beforeSend: function(xhr, settings) {
  190.                         // Buttonを無効にする
  191.                         $('.add-cart').prop('disabled', true);
  192.                     }
  193.                 }).done(function(data) {
  194.                     // レスポンス内のメッセージをalertで表示
  195.                     $.each(data.messages, function() {
  196.                         $('#ec-modal-header').text(this);
  197.                     });
  198.                     $('.ec-modal').show()
  199.                     // カートブロックを更新する
  200.                     $.ajax({
  201.                         url: "{{ url('block_cart') }}",
  202.                         type: 'GET',
  203.                         dataType: 'html'
  204.                     }).done(function(html) {
  205.                         $('.ec-headerRole__cart').html(html);
  206.                     });
  207.                 }).fail(function(data) {
  208.                     alert('{{ 'カートへの追加に失敗しました。'|trans }}');
  209.                 }).always(function(data) {
  210.                     // Buttonを有効にする
  211.                     $('.add-cart').prop('disabled', false);
  212.                 });
  213.             });
  214.         });
  215.         $('.ec-modal-wrap').on('click', function(e) {
  216.             // モーダル内の処理は外側にバブリングさせない
  217.             e.stopPropagation();
  218.         });
  219.         $('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
  220.             $('.ec-modal').hide()
  221.         });
  222.     </script>
  223.     <script type="application/ld+json">
  224.     {
  225.         "@context": "https://schema.org/",
  226.         "@type": "Product",
  227.         "name": "{% if Product.Maker %}{{ Product.Maker.nameEn }} {% endif %}{{ Product.name }}{% if Product.model_year %} {{ Product.model_year }}{{ '年モデル'|trans }}{% endif %}",
  228.         "image": [
  229.             {% for img in Product.ProductImage %}
  230.                 "{{ app.request.schemeAndHttpHost }}{{ asset(img, 'save_image') }}"{% if not loop.last %},{% endif %}
  231.             {% else %}
  232.                 "{{ app.request.schemeAndHttpHost }}{{ asset(''|no_image_product, 'save_image') }}"
  233.             {% endfor %}
  234.         ],
  235.     "description": "{{ (Product.description_list ~ ' ' ~ Product.description_detail) | replace({'\n': '', '\r': ''}) | slice(0,300) }}",
  236.         {% if Product.code_min %}
  237.         "sku": "{{ Product.code_min }}",
  238.         {% endif %}
  239.         "offers": {
  240.             "@type": "Offer",
  241.             "url": "{{ url('product_detail', {'id': Product.id}) }}",
  242.             "priceCurrency": "{{ eccube_config.currency }}",
  243.             "price": {{ Product.getPrice02IncTaxMin ? (Product.getPrice02IncTaxMin / 1.05)|round(0, 'common') : 0}},
  244.             "availability": "{{ Product.stock_find ? "InStock" : "OutOfStock" }}"
  245.         }
  246.     }
  247.     </script>
  248. {% endblock %}
  249. {% block main %}
  250.     <div class="ec-productRole">
  251.         <div class="ec-grid2">
  252.             <div class="ec-grid2__cell">
  253.                 <div class="ec-sliderItemRole">
  254.                     <div class="item_visual">
  255.                         {% set ImageLoop = '' %}
  256.                         {% for ProductImage in Product.ProductImage %}
  257.                             {% set ImageLoop = loop.index %}
  258.                             <div class="slide-item">
  259.                                 <img src="{{ asset(ProductImage, 'save_image') }}" alt="{% if loop.first %}{{ Product.Maker ? Product.Maker.nameEn ~ ' ' : '' }}{{ Product.name }}{% if Product.model_year %} {{ Product.model_year }}{{ '年モデル'|trans }}{% endif %}{% endif %}" width="550" height="550"{% if loop.index > 1 %} loading="lazy"{% endif %}>
  260.                                 {% if Product.ProductImageAlts is defined and Product.ProductImageAlts is not null %}
  261.                                     {% set altText = '' %}
  262.                                     {% set ProductImageAlt = Product.ProductImageAlts|filter(alt => alt.sort_no == ImageLoop)|first %}
  263.                                     {% if ProductImageAlt.alt_text is defined and ProductImageAlt.alt_text is not null %}
  264.                                         {% set altText = ProductImageAlt.alt_text %}
  265.                                         <p class="text-center" style="width:80%; margin-top:1em;">{{ altText }}</p>
  266.                                     {% endif %}
  267.                                 {% endif %}
  268.                             </div>
  269.                         {% else %}
  270.                             <div class="slide-item"><img src="{{ asset(''|no_image_product, 'save_image') }}" alt="{% if loop.first %}{{ Product.Maker ? Product.Maker.nameEn ~ ' ' : '' }}{{ Product.name }}{% if Product.model_year %} {{ Product.model_year }}{{ '年モデル'|trans }}{% endif %}{% endif %}" width="550" height="550"></div>
  271.                         {% endfor %}
  272.                     </div>
  273.                     <div class="item_nav">
  274.                         {% set ImageLoop = '' %}
  275.                         {% for ProductImage in Product.ProductImage %}
  276.                             {% set ImageLoop = loop.index %}
  277.                             <div class="slideThumb" data-index="{{ loop.index0 }}">
  278.                                 <img src="{{ asset(ProductImage, 'save_image') }}" alt="{{ Product.Maker ? Product.Maker.nameEn ~ ' ' : '' }}{{ Product.name }}{% if Product.model_year %} {{ Product.model_year }}{{ '年モデル'|trans }}{% endif %}" width="133" height="133" loading="lazy">
  279.                                 {% if Product.ProductImageAlts is defined and Product.ProductImageAlts is not null %}
  280.                                     {% set altText = '' %}
  281.                                     {% set ProductImageAlt = Product.ProductImageAlts|filter(alt => alt.sort_no == ImageLoop)|first %}
  282.                                     {% if ProductImageAlt.alt_text is defined and ProductImageAlt.alt_text is not null %}
  283.                                         {% set altText = ProductImageAlt.alt_text %}
  284.                                         <p class="text-center" style="width:80%;">{{ altText }}</p>
  285.                                     {% endif %}
  286.                                 {% endif %}
  287.                             </div>
  288.                         {% endfor %}
  289.                     </div>
  290.                 </div>
  291.             </div>
  292.             <div class="ec-grid2__cell">
  293.                 <div class="ec-productRole__profile">
  294.                     {# 商品名 #}
  295.                     <div class="ec-productRole__title">
  296.                         <h2 class="ec-headingTitle">{% if Product.Maker %}<span class="small"> {{ Product.Maker.nameEn }}({{ Product.Maker.nameJp }})</span>{% endif %}<br />{{ Product.name }}{% if Product.model_year %} {{ Product.model_year }}{{ '年モデル'|trans }}{% endif %}</h2>
  297.                     </div>
  298.                     {# タグ #}
  299.                     <ul class="ec-productRole__tags">
  300.                         {% for Tag in Product.Tags %}
  301.                             <li class="ec-productRole__tag tag_{{ Tag.id }}">{{ Tag }}</li>
  302.                         {% endfor %}
  303.                     </ul>
  304.                     {# 通常価格 #}
  305.                     {% if Product.hasProductClass -%}
  306.                         <div class="ec-productRole__priceRegular">
  307.                             {% if Product.getPrice01Min is not null and Product.getPrice01IncTaxMin == Product.getPrice01IncTaxMax %}
  308.                                 <span class="ec-productRole__priceRegularPrice">{{ 'メーカー希望小売価格'|trans }}:<span class="price01-default">{{ Product.getPrice01IncTaxMin|price }}</span></span>
  309.                                 <span class="ec-productRole__priceRegularTax">{{ '税込'|trans }}</span>
  310.                             {% elseif Product.getPrice01Min is not null and Product.getPrice01Max is not null %}
  311.                                 <span class="ec-productRole__priceRegularPrice">{{ 'メーカー希望小売価格'|trans }}:<span class="price01-default">{{ Product.getPrice01IncTaxMin|price }}~ {{ Product.getPrice01IncTaxMax|price }}</span></span>
  312.                                 <span class="ec-productRole__priceRegularTax">{{ '税込'|trans }}</span>
  313.                             {% endif %}
  314.                         </div>
  315.                     {% else %}
  316.                         {% if Product.getPrice01Max is not null %}
  317.                             <span class="ec-productRole__priceRegularPrice">{{ 'メーカー希望小売価格'|trans }}:{{ Product.getPrice01IncTaxMin|price }}</span>
  318.                             <span class="ec-productRole__priceRegularTax">{{ '税込'|trans }}</span>
  319.                         {% endif %}
  320.                     {% endif %}
  321.                     {# 販売価格、その他備考 #}
  322.                     {# 表示について、規格1の選択肢がapp/Customize/Entity/ProductTrait.php、規格2の選択肢はeccube.jsで制御。 #}
  323.                     {# 規格を持たない商品はこのファイル上で制御しているよう。 #}
  324.                     {# 表示フラグ系はProductTypeExtension.phpで実装、ask_priceのみカートに値を渡して、値引処理に使用している。 #}
  325.                     <div class="ec-productRole__price">
  326.                         {% if Product.hasProductClass -%}
  327.                             {# 規格を持つ商品の場合の処理 #}
  328.                             {% if 'teika_price' in Product.ask_price and 'hidden_price' not in Product.ask_price %}
  329.                             {# 現金特価未適用フラグがある場合、現金特価計算をさせないように動作。規格1規格2がある場合の動作修正はeccube.jsも触る。 #}
  330.                                 {% if Product.getPrice02IncTaxMin == Product.getPrice02IncTaxMax %}
  331.                                     <div class="ec-price">
  332.                                         <span class="ec-price__price">販売価格:</span>
  333.                                         <span class="ec-price__price price02-default teika_price">{{ Product.getPrice02IncTaxMin|price }}</span>
  334.                                         <span class="ec-price__tax">{{ '税込'|trans }}</span>
  335.                                     </div>
  336.                                 {% else %}
  337.                                     <div class="ec-price">
  338.                                         <span class="ec-price__price">販売価格:</span>
  339.                                         <span class="ec-price__price price02-default teika_price">{{ Product.getPrice02IncTaxMin|price }} ~ {{ Product.getPrice02IncTaxMax|price }}</span>
  340.                                         <span class="ec-price__tax">{{ '税込'|trans }}</span>
  341.                                     </div>
  342.                                 {% endif %}
  343.                             {% elseif 'hidden_price' in Product.ask_price %}
  344.                             {# 売価非表示フラグがある場合の処理。コメントありとなしで条件分岐。 #}
  345.                                 {% if Product.info_comment2 is not empty %}
  346.                                     <div class="ec-price">
  347.                                         <span class="ec-price__price">{{ Product.info_comment2|trans }}</span>
  348.                                     </div>
  349.                                 {% elseif Product.info_comment2 is empty %}
  350.                                     <div class="ec-price">
  351.                                         <span class="ec-price__price">{{ 'ビックリ大特価!'|trans }}</span>
  352.                                     </div>
  353.                                 {% endif %}
  354.                             {% else %}
  355.                             {# 条件なしの処理。現金特価での表示。規格2がある場合の動作修正はeccube.jsも同時に触る必要がある。 #}
  356.                                 {% if Product.getPrice02IncTaxMin == Product.getPrice02IncTaxMax %}
  357.                                     <div class="ec-price">
  358.                                         <span class="ec-price__price">現金特価:</span>
  359.                                         <span class="ec-price__price price02-default genkin_tokka">{{ (Product.getPrice02IncTaxMin / 1.05)|price }}</span>
  360.                                         <span class="ec-price__tax">{{ '税込'|trans }}</span>
  361.                                     </div>
  362.                                 {% else %}
  363.                                     <div class="ec-price">
  364.                                         <span class="ec-price__price">現金特価:</span>
  365.                                         <span class="ec-price__price price02-default genkin_tokka">{{ (Product.getPrice02IncTaxMin / 1.05)|price }} ~ {{ (Product.getPrice02IncTaxMax / 1.05)|price }}</span>
  366.                                         <span class="ec-price__tax">{{ '税込'|trans }}</span>
  367.                                     </div>
  368.                                 {% endif %}
  369.                             {% endif %}
  370.                         {% else %}
  371.                             {# 規格がない商品の場合の処理 #}
  372.                             {% if 'teika_price' in Product.ask_price and 'hidden_price' not in Product.ask_price %}
  373.                                 <div class="ec-price">
  374.                                         <span class="ec-price__price">販売価格:</span>
  375.                                     <span class="ec-price__price">{{ Product.getPrice02IncTaxMin|price }}</span>
  376.                                     <span class="ec-price__tax">{{ '税込'|trans }}</span>
  377.                                 </div>
  378.                             {% elseif 'hidden_price' in Product.ask_price and Product.info_comment2 is not empty %}
  379.                                 <div class="ec-price">
  380.                                     <span class="ec-price__price">{{ Product.info_comment2|trans }}</span>
  381.                                 </div>
  382.                             {% elseif 'hidden_price' in Product.ask_price and Product.info_comment2 is empty %}
  383.                                 <div class="ec-price">
  384.                                     <span class="ec-price__price">{{ 'ビックリ大特価!'|trans }}</span>
  385.                                 </div>
  386.                             {% else %}
  387.                                 <div class="ec-price">
  388.                                         <span class="ec-price__price">現金特価:</span>
  389.                                     <span class="ec-price__price">{{ (Product.getPrice02IncTaxMin / 1.05)|price }}</span>
  390.                                     <span class="ec-price__tax">{{ '税込'|trans }}</span>
  391.                                 </div>
  392.                             {% endif %}
  393.                         {% endif %}
  394.                     </div>
  395.                     {# 商品コード #}
  396.                     {% if Product.code_min is not empty %}
  397.                         <div class="ec-productRole__code">
  398.                             {{ '商品コード'|trans }}: <span class="product-code-default">{{ Product.code_min }}{% if Product.code_min != Product.code_max %} ~ {{ Product.code_max }}{% endif %}</span>
  399.                         </div>
  400.                     {% endif %}
  401.                     {# 関連カテゴリ #}
  402.                     {% if Product.ProductCategories is not empty %}
  403.                         <div class="ec-productRole__category">
  404.                             <div>{{ '関連カテゴリ'|trans }}</div>
  405.                             {% for ProductCategory in Product.ProductCategories %}
  406.                                 {% if ProductCategory.Category.countBranches == 1 %}
  407.                                     <ul>
  408.                                         <li>
  409.                                             {% for Category in ProductCategory.Category.path %}
  410.                                                 <a href="{{ url('product_list') }}?category_id={{ Category.id }}">{{ Category.name }}</a> {%- if loop.last == false %}
  411.                                                 <span>></span>{% endif -%}
  412.                                             {% endfor %}
  413.                                         </li>
  414.                                     </ul>
  415.                                 {% endif %}
  416.                             {% endfor %}
  417.                         </div>
  418.                     {% endif %}
  419.                     <form action="{{ url('product_add_cart', {id:Product.id}) }}" method="post" id="form1" name="form1">
  420.                         {% if Product.stock_find %}
  421.                             <div class="ec-productRole__actions">
  422.                                 {% if form.classcategory_id1 is defined %}
  423.                                     <div class="ec-select">
  424.                                         {% form_theme form.classcategory_id1 'Form/custom_form_div_layout.twig' %}
  425.                                         {{ form_row(form.classcategory_id1) }}
  426.                                         {{ form_errors(form.classcategory_id1) }}
  427.                                     </div>
  428.                                     {% if form.classcategory_id2 is defined %}
  429.                                         <div class="ec-select">
  430.                                             {% form_theme form.classcategory_id2 'Form/custom_form_div_layout.twig' %}
  431.                                             {{ form_row(form.classcategory_id2) }}
  432.                                             {{ form_errors(form.classcategory_id2) }}
  433.                                         </div>
  434.                                     {% endif %}
  435.                                 {% endif %}
  436.                                     <div class="ec-numberInput"><span>{{ '数量'|trans }}</span>
  437.                                         {{ form_widget(form.quantity) }}
  438.                                         {{ form_errors(form.quantity) }}
  439.                                     </div>
  440.                             </div>
  441.                             {% if Product.disable_cart is not empty %}
  442.                                 <div class="ec-productRole__btn">
  443.                                     <button type="button" class="ec-blockBtn--action" disabled="disabled">
  444.                                         {{ '対面販売の為、お問い合わせください。'|trans }}
  445.                                     </button>
  446.                                 </div>
  447.                             {% elseif Product.disable_cart is empty %}
  448.                                <div class="ec-productRole__btn">
  449.                                     <button type="submit" class="ec-blockBtn--action add-cart">
  450.                                         {{ 'カートに入れる'|trans }}
  451.                                     </button>
  452.                                 </div>
  453.                             {% endif %}
  454.                         {% else %}
  455.                             {% if Product.disable_cart is not empty %}
  456.                                 <div class="ec-productRole__btn">
  457.                                     <button type="button" class="ec-blockBtn--action" disabled="disabled">
  458.                                         {{ '対面販売の為、お問い合わせください。'|trans }}
  459.                                     </button>
  460.                                 </div>
  461.                             {% elseif Product.disable_cart is empty %}
  462.                                 <div class="ec-productRole__btn">
  463.                                     <button type="button" class="ec-blockBtn--action" disabled="disabled">
  464.                                         {{ 'ただいま品切れ中です。'|trans }}
  465.                                     </button>
  466.                                 </div>
  467.                             {% endif %}
  468.                         {% endif %}
  469.                         {{ form_rest(form) }}
  470.                     </form>
  471.                     <div class="ec-modal">
  472.                         <div class="ec-modal-overlay">
  473.                             <div class="ec-modal-wrap">
  474.                                 <span class="ec-modal-close"><span class="ec-icon"><img src="{{ asset('assets/icon/cross-dark.svg') }}" alt=""/></span></span>
  475.                                 <div id="ec-modal-header" class="text-center">{{ 'カートに追加しました。'|trans }}</div>
  476.                                 <div class="ec-modal-box">
  477.                                     <div class="ec-role">
  478.                                         <span class="ec-inlineBtn--cancel">{{ 'お買い物を続ける'|trans }}</span>
  479.                                         <a href="{{ url('cart') }}" class="ec-inlineBtn--action">{{ 'カートへ進む'|trans }}</a>
  480.                                     </div>
  481.                                 </div>
  482.                             </div>
  483.                         </div>
  484.                     </div>
  485.                     <div class="ec-productRole__btn">
  486.                                 <button onclick="location.href='{{ url('contact',{'contact_pname':contact_pname, 'contact_pcode':contact_pcode, 'contact_pid':contact_pid, })}}'" id="favorite" class="ec-blockBtn--cancel">
  487.                                     {{ 'お問い合わせ'|trans }}
  488.                                 </button>
  489.                             </div>
  490.                     <!--{% if BaseInfo.option_favorite_product %}
  491.                         <form action="{{ url('contact') }}" method="post">
  492.                             <div class="ec-productRole__btn">
  493.                                 {% if is_favorite == false %}
  494.                                     <button type="submit" id="favorite" class="ec-blockBtn--cancel">
  495.                                         {{ 'お問い合わせ'|trans }}
  496.                                     </button>
  497.                                 {% else %}
  498.                                     <button type="submit" id="favorite" class="ec-blockBtn--cancel"
  499.                                             disabled="disabled">{{ 'お気に入りに追加済です。'|trans }}
  500.                                     </button>
  501.                                 {% endif %}
  502.                             </div>
  503.                         </form>
  504.                     {% endif %}-->
  505.                     {# 以下商品の属性ごとの注意書きを表記する。 #}
  506.                     <div>
  507.                         <ul>
  508.                             {% if Product.stock_find %} {# 在庫数が1以上のSKUが含まれている場合 #}
  509.                                 <li><span class="ec-color-red">在庫有り表示でも店頭展示していない場合があります。<span class="ec-font-bold">実物をご覧になりたい場合はご来店前にメールにてご連絡ください。</span></span></li>
  510.                             {% endif %}
  511.                             {% if Product.Tags|filter(tag => tag.id == 10)|length > 0 %} {# 商品タグにメーカー取寄せが含まれる場合 #}
  512.                                 <li>メーカー取寄せとなります。在庫状況はできる限り反映しておりますが、タイミングによっては欠品の場合もございます。</li>
  513.                             {% endif %}
  514.                             {% if 'f2f' in Product.delivery_product_type %} {# 商品の配送属性にf2f(対面販売)が含まれる場合 #}
  515.                                 <li>こちらの商品は原則<span class="ec-font-bold">対面販売</span>となります。ご購入の際は店頭かメールにてご相談ください。</li>
  516.                             {% endif %}
  517.                             {% if 'ebike' in Product.delivery_product_type %} {# 商品の配送属性にebikeが含まれる場合 #}
  518.                                 <li>大型商品となります。<span class="ec-font-bold">配送をご希望の場合は送料にご注意ください。</span>当店より30km圏内であれば、弊社スタッフが配送に伺いますので送料無料です。詳しくは店頭にてご相談ください。</li>
  519.                             {% endif %}
  520.                             {% if Product.Tags|filter(tag => tag.id == 8)|length > 0 %} {# 商品タグにアウトレット品が含まれる場合 #}
  521.                                 <li><span class="ec-font-bold">アウトレット品となります。</span>キズや塗装不良がある場合や、通常商品と保証内容が異なる場合があります。詳しくは店頭かメールにてご相談ください。</li>
  522.                             {% endif %}
  523.                             {% if Product.Tags|filter(tag => tag.id == 7)|length > 0 %} {# 商品タグに代理店取り寄せ特価が含まれる場合 #}
  524.                                 <li>代理店取り寄せの特価品です。当店で在庫はしていない場合は実物をご覧いただけません。</li>
  525.                             {% endif %}
  526.                         </ul>
  527.                     </div>
  528.                 </div>
  529.             </div>
  530.         </div>
  531.         {% if Product.description_detail %}
  532.             <div class="ec-productRole__description">{{ Product.description_detail|raw|nl2br }}
  533.                     </div>
  534.         {% endif %}
  535.         {% if Product.freearea %}
  536.              <div class="ec-productRole__description">
  537.                  {{ include(template_from_string(Product.freearea)) }}
  538.             </div>
  539.         {% endif %}
  540.     </div>
  541. {% endblock %}