app/template/default/Product/list.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 javascript %}
  11.     <script>
  12.         eccube.productsClassCategories = {
  13.             {% for Product in pagination %}
  14.             "{{ Product.id|escape('js') }}": {{ class_categories_as_json(Product)|raw }}{% if loop.last == false %}, {% endif %}
  15.             {% endfor %}
  16.         };
  17.         $(function() {
  18.             // 表示件数を変更
  19.             $('.disp-number').change(function() {
  20.                 var dispNumber = $(this).val();
  21.                 $('#disp_number').val(dispNumber);
  22.                 $('#pageno').val(1);
  23.                 $("#form1").submit();
  24.             });
  25.             // 並び順を変更
  26.             $('.order-by').change(function() {
  27.                 var orderBy = $(this).val();
  28.                 $('#orderby').val(orderBy);
  29.                 $('#pageno').val(1);
  30.                 $("#form1").submit();
  31.             });
  32.             $('.add-cart').on('click', function(e) {
  33.                 var $form = $(this).parents('li').find('form');
  34.                 // 個数フォームのチェック
  35.                 var $quantity = $form.parent().find('.quantity');
  36.                 if ($quantity.val() < 1) {
  37.                     $quantity[0].setCustomValidity('{{ '1以上で入力してください。'|trans }}');
  38.                     setTimeout(function() {
  39.                         loadingOverlay('hide');
  40.                     }, 100);
  41.                     return true;
  42.                 } else {
  43.                     $quantity[0].setCustomValidity('');
  44.                 }
  45.                 e.preventDefault();
  46.                 $.ajax({
  47.                     url: $form.attr('action'),
  48.                     type: $form.attr('method'),
  49.                     data: $form.serialize(),
  50.                     dataType: 'json',
  51.                     beforeSend: function(xhr, settings) {
  52.                         // Buttonを無効にする
  53.                         $('.add-cart').prop('disabled', true);
  54.                     }
  55.                 }).done(function(data) {
  56.                     // レスポンス内のメッセージをalertで表示
  57.                     $.each(data.messages, function() {
  58.                         $('#ec-modal-header').html(this);
  59.                     });
  60.                     $('.ec-modal').show()
  61.                     // カートブロックを更新する
  62.                     $.ajax({
  63.                         url: '{{ url('block_cart') }}',
  64.                         type: 'GET',
  65.                         dataType: 'html'
  66.                     }).done(function(html) {
  67.                         $('.ec-headerRole__cart').html(html);
  68.                     });
  69.                 }).fail(function(data) {
  70.                     alert('{{ 'カートへの追加に失敗しました。'|trans }}');
  71.                 }).always(function(data) {
  72.                     // Buttonを有効にする
  73.                     $('.add-cart').prop('disabled', false);
  74.                 });
  75.             });
  76.         });
  77.         $('.ec-modal-wrap').on('click', function(e) {
  78.             // モーダル内の処理は外側にバブリングさせない
  79.             e.stopPropagation();
  80.         });
  81.         $('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
  82.             $('.ec-modal').hide()
  83.         });
  84.         {# word検索 #}
  85.         const word = document.querySelector('#name');
  86.         word.addEventListener('input', (evt) => {
  87.             word.textContent = evt.target.value;
  88.             $('#search-product').submit();
  89.         })
  90.         //価格のslider
  91.         const range1 = document.querySelector('#range-1');
  92.         const range2 = document.querySelector('#range-2');
  93.         const startValue1 = document.querySelector('#start-value1');
  94.         const endValue2 = document.querySelector('#end-value2');
  95.         range1.addEventListener('input', (evt) => {
  96.             startValue1.textContent = evt.target.value;
  97.             $('#search-product').submit();
  98.         })
  99.         range2.addEventListener('input', (evt) => {
  100.             endValue2.textContent = evt.target.value;
  101.             $('#search-product').submit();
  102.         })
  103.         startValue1.textContent = range1.value;
  104.         endValue2.textContent = range2.value;
  105.         //高さのslider
  106.         const range3 = document.querySelector('#range-3');
  107.         const range4 = document.querySelector('#range-4');
  108.         const startValue3 = document.querySelector('#start-value3');
  109.         const endValue4 = document.querySelector('#end-value4');
  110.         range3.addEventListener('input', (evt) => {
  111.             startValue3.textContent = evt.target.value;
  112.             $('#search-product').submit();
  113.         })
  114.         range4.addEventListener('input', (evt) => {
  115.             endValue4.textContent = evt.target.value;
  116.             $('#search-product').submit();
  117.         })
  118.         startValue3.textContent = range3.value;
  119.         endValue4.textContent = range4.value;
  120.         //幅のslider
  121.         const range5 = document.querySelector('#range-5');
  122.         const range6 = document.querySelector('#range-6');
  123.         const startValue5 = document.querySelector('#start-value5');
  124.         const endValue6 = document.querySelector('#end-value6');
  125.         range5.addEventListener('input', (evt) => {
  126.             startValue5.textContent = evt.target.value;
  127.             $('#search-product').submit();
  128.         })
  129.         range6.addEventListener('input', (evt) => {
  130.             endValue6.textContent = evt.target.value;
  131.             $('#search-product').submit();
  132.         })
  133.         startValue5.textContent = range5.value;
  134.         endValue6.textContent = range6.value;
  135.         //初期表示は非表示
  136.         document.getElementById("searchBox").style.display ="none";
  137.         //絞り込みボタンの背景色を制御
  138.         const search = location.search;
  139.         if (search !== "") {
  140.             isSelected.style.background = "#F2F2F2";
  141.         }
  142.         function clickBtn2(){ //検索ボックスの表示・非表示を制御
  143.             const searchBox = document.getElementById("searchBox");
  144.             const isSelected = document.getElementById("isSelected");
  145.             if (searchBox.style.display==""){
  146.                 searchBox.style.display ="none";
  147.             } else{
  148.                 searchBox.style.display ="";
  149.             }
  150.         }
  151.     </script>
  152. {% endblock %}
  153. {% block stylesheet %}
  154.     <style>
  155.         .ec-modal {
  156.             display: none;
  157.             position: fixed;
  158.             top: 0;
  159.             left: 0;
  160.             z-index: 99999;
  161.             width: 100%;
  162.             height: 100%;
  163.         }
  164.         .ec-modal.small {
  165.             width: 30%;
  166.         }
  167.         .ec-modal.full {
  168.             width: 100%;
  169.             height: 100%;
  170.         }
  171.         .ec-modal .ec-modal-overlay {
  172.             display: flex;
  173.             justify-content: center;
  174.             align-items: center;
  175.             background-color: rgba(0, 0, 0, 0.3);
  176.             width: 100%;
  177.             height: 100%;
  178.         }
  179.         .ec-modal .ec-modal-wrap {
  180.             position: relative;
  181.             border-radius: 6px;
  182.             border: 0px;
  183.             background-color: #fff;
  184.             width: 50%;
  185.             margin: 20px;
  186.             padding: 40px 5px;
  187.         }
  188.         .ec-modal .ec-modal-close {
  189.             cursor: pointer;
  190.             position: absolute;
  191.             right: 20px;
  192.             top: 10px;
  193.             font-size: 20px;
  194.             height: 30px;
  195.             width: 20px;
  196.         }
  197.         .ec-modal .ec-modal-close:hover {
  198.             color: #4b5361;
  199.         }
  200.         .ec-modal .ec-modal-box {
  201.             text-align: center;
  202.         }
  203.         .ec-modal .ec-role {
  204.             margin-top: 20px;
  205.         }
  206.         .margin {
  207.             margin: 3px;
  208.         }
  209.         .artcategory-flex {
  210.             background-color: #f4f1ee;
  211.             padding: 5px;
  212.             margin-bottom: 30px;
  213.             display: flex;
  214.             flex-wrap: wrap;
  215.             border-radius: 6px;
  216.         } 
  217.         .category-title {
  218.             padding: 3px;
  219.             margin-left: 2%;
  220.         }
  221.         .category-title h5 {
  222.             color: black;
  223.         }
  224.         .ec-headerSearch__keywordBtn {
  225.             border-radius: 6px;
  226.         }
  227.         a {
  228.             color: black;
  229.             text-decoration: none;
  230.         }
  231.         a:hover {
  232.             color: #d5a770;
  233.             text-decoration: none;
  234.         }
  235.         .mb {
  236.             margin-bottom: 5px;
  237.         }
  238.         .img-wrap {
  239.             width: auto;
  240.             height: 300px;
  241.         }
  242.         .img-wrap img {
  243.             min-width: 250px;
  244.             width: auto;
  245.             height: 300px;
  246.             border-radius: 6px;
  247.         }
  248.         
  249.         .img {
  250.             width: auto;
  251.             height: 300px;
  252.             max-width: auto;
  253.             max-height: 300px;
  254.             object-fit: cover;
  255.         }
  256.         .ec-blockBtn--action {
  257.             display: inline-block;
  258.             margin-bottom: 0;
  259.             font-weight: bold;
  260.             text-align: center;
  261.             vertical-align: middle;
  262.             touch-action: manipulation;
  263.             cursor: pointer;
  264.             background-image: none;
  265.             border: 1px solid transparent;
  266.             white-space: nowrap;
  267.             padding: 6px 12px;
  268.             font-size: 0.875rem;
  269.             border-radius: 1.42857142;
  270.             -webkit-user-select: none;
  271.             -moz-user-select: none;
  272.             -ms-user-select: none;
  273.             user-select: none;
  274.             padding: 10px 16px;
  275.             text-decoration: none;
  276.             color: #fff;
  277.             background-color: #d5a770;
  278.             border-color: #d5a770;
  279.             display: block;
  280.             width: 100%;
  281.             height: 56px;
  282.             line-height: 56px;
  283.             padding-top: 0;
  284.             padding-bottom: 0;
  285.         }
  286.         {# これしないとmaker_idのフォームが表示されてしまう #}
  287.         .form-control {
  288.             display: none;
  289.         }
  290.         .form-label {
  291.             display: none;
  292.         }
  293.         .ml-20 {
  294.             margin-left: 20%;
  295.         }
  296.         .deleteIcon {
  297.             color: red;
  298.         }
  299.         .deleteIcon:hover {
  300.             color: red;
  301.         }
  302.         .product-list-flex {
  303.             display: flex;
  304.             justify-content: center;
  305.             padding: 40px;
  306.             margin: 0 auto 30px auto;
  307.             border-radius: 6px;
  308.             background-color: #F2F2F2;
  309.             max-width: 750px;
  310.         }
  311.         .pr-16 {
  312.             padding-right: 16px;
  313.         }
  314.         .skelton_btn {
  315.             width: 130px;
  316.             padding: 6px 12px;
  317.             text-align: center;
  318.             text-decoration: none;
  319.             background: #fff;
  320.         }
  321.         .skelton_btn:hover {
  322.             background: #F2F2F2;
  323.             cursor: pointer;
  324.             text-decoration: none;
  325.             border-radius: 3px;
  326.         }
  327.         @media screen and ( max-width:1035px) {
  328.             .product-list-flex {
  329.                 display: flex;
  330.             }
  331.             .slidebar-multithumb {
  332.                 width: 100%;
  333.             }
  334.             .line {
  335.                 display: none;
  336.             }
  337.             .searchWord {
  338.                 display: none;
  339.             }
  340.             .img-wrap img {
  341.                 min-width: 180px;
  342.                 width: auto;
  343.                 height: 300px;
  344.             }
  345.         }
  346.         @media screen and ( max-width:768px) {
  347.             .product-list-flex {
  348.                 display: none;
  349.             }
  350.             .skelton_btn {
  351.                 display: none;
  352.             }
  353.         }
  354.         .ec-numberInput {
  355.             display: none;
  356.         }
  357.         .product-list-description:hover {
  358.             color: black;
  359.         }
  360.     </style>
  361. {% endblock %}
  362. {% block main %}
  363.     {% if search_form.category_id.vars.errors|length > 0 %}
  364.         <div class="ec-searchnavRole">
  365.             <p class="errormsg text-danger">{{ 'ご指定のカテゴリは存在しません'|trans }}</p>
  366.         </div>
  367.     {% else %}
  368.         <div class="ec-searchnavRole">
  369.             <form name="form1" id="form1" method="get" action="?">
  370.                 {% for item in search_form %}
  371.                     <input type="hidden" id="{{ item.vars.id }}"
  372.                            name="{{ item.vars.full_name }}"
  373.                            {% if item.vars.value is not empty %}value="{{ item.vars.value }}" {% endif %}/>
  374.                 {% endfor %}
  375.             </form>
  376.             <div class="ec-searchnavRole__topicpath">
  377.                 <ol class="ec-topicpath">
  378.                     {% if Category is null %}
  379.                         {# <li class="ec-topicpath__item"><a href="{{ url('product_list') }}">{{ '全て'|trans }}</a>
  380.                         </li> #}
  381.                         <div class="artcategory-flex">
  382.                             <div class="category-title"><h2 class="fontweight-bold gold"><a href="{{ url('product_list') }}">{{ 'アート作品'|trans }}</a></h2></div>
  383.                         </div>
  384.                     {% endif %}
  385.                     {% if Category is not null %}
  386.                         {% for Path in Category.path %}
  387.                             {# <li class="ec-topicpath__item{% if loop.last %}--active{% endif %}"><a
  388.                                         href="{{ url('product_list') }}?category_id={{ Path.id }}">{{ Path.name }}</a>
  389.                             </li> #}
  390.                             <div class="artcategory-flex">
  391.                                 <div class="category-title"><h2 class="fontweight-bold gold"><a href="{{ url('product_list') }}?category_id={{ Path.id }}">{{ Path.name }}</a></h2></div>
  392.                             </div>
  393.                         {% endfor %}
  394.                     {% endif %}
  395.                     {% if search_form.vars.value and search_form.vars.value.name %}
  396.                         <li class="ec-topicpath__divider">|</li>
  397.                         <li class="ec-topicpath__item">{{ '「%name%」の検索結果'|trans({ '%name%': search_form.vars.value.name }) }}</li>
  398.                     {% endif %}
  399.                 </ol>
  400.             </div>
  401.             <div class="ec-searchnavRole__infos">
  402.                 <div class="ec-searchnavRole__counter">
  403.                     {% if pagination.totalItemCount > 0 %}
  404.                         {{ '<span class="ec-font-bold">%count%件</span><span>の作品が見つかりました</span>'|trans({ '%count%': pagination.totalItemCount })|raw }}
  405.                     {% else %}
  406.                         <span>{{ 'お探しの作品は見つかりませんでした'|trans }}</span>
  407.                     {% endif %}
  408.                 </div>
  409.                 {% if pagination.totalItemCount > 0 %}
  410.                     <div class="ec-searchnavRole__actions">
  411.                         <div class="ec-select">
  412.                             <a href="#" class="skelton_btn" id="isSelected" onclick="clickBtn2()">絞り込み</a>
  413.                             {{ form_widget(search_form.disp_number, {'id': '', 'attr': {'class': 'disp-number'}}) }}
  414.                             {{ form_widget(search_form.orderby, {'id': '', 'attr': {'class': 'order-by'}}) }}
  415.                         </div>
  416.                     </div>
  417.                 {% endif %}
  418.             </div>
  419.         </div>
  420.         <form method="get" class="searchform" id='search-product' action="{{ path('product_list') }}">
  421.             <div class="product-list-flex" id="searchBox">
  422.                 <div class="product-list-size pr-16">
  423.                     <div class="ec-headerSearch__category">
  424.                     <div class="fontweight-bold"><label for="range-label">ワード</label><a class='deleteIcon' href='/products/list?name=&price_min={{price_min}}&price_max={{price_max}}&size_vertical_min={{size_vertical_min}}&size_vertical_max={{size_vertical_max}}&size_width_min={{size_width_min}}&size_width_max={{size_width_max}}'><i class="fa-regular fa-trash-can ml-20"></i></a></div>
  425.                         <div class="ec-select ec-select_search margin-top ">
  426.                             {% if name %}
  427.                             <input type="text" name="name" id="name" placeholder={{name}}>
  428.                             {% else %}
  429.                             <input type="text" name="name" id="name">
  430.                             {% endif %}
  431.                         </div>
  432.                     </div>
  433.                 </div>
  434.                 <div class="product-list-size">
  435.                     <div class="slidebar-multithumb">
  436.                         <div class="fontweight-bold mb"><label for="range-label">価格</label><a class='deleteIcon' href='/products/list?name={{name}}&price_min=0&price_max=1000000&size_vertical_min={{size_vertical_min}}&size_vertical_max={{size_vertical_max}}&size_width_min={{size_width_min}}&size_width_max={{size_width_max}}'><i class="fa-regular fa-trash-can ml-20"></i></a></div>
  437.                         <div class="flex">
  438.                             <div><span id="start-value1"></span>~</div>
  439.                             <div><span id="end-value2"></span>円</div>
  440.                         </div>
  441.                         <div class="slidebar-multithumb-title"></div>
  442.                         {% if price_min %}
  443.                         <input class="thumb-1" type="range" name="price_min" id="range-1" value={{price_min}} min="0" max="1000000" step="100">
  444.                         {% else %}
  445.                         <input class="thumb-1" type="range" name="price_min" id="range-1" value="0" min="0" max="1000000" step="100">
  446.                         {% endif %}
  447.                         {% if price_max %}
  448.                         <input class="thumb-2" type="range" name="price_max" id="range-2" value={{price_max}} min="0" max="1000000" step="100">
  449.                         {% else %}
  450.                         <input class="thumb-2" type="range" name="price_max" id="range-2" value="1000000" min="0" max="1000000" step="100">
  451.                         {% endif %}
  452.                     </div>
  453.                 </div>
  454.                 <div class="product-list-size">
  455.                     <div class="slidebar-multithumb">
  456.                         <div class="fontweight-bold mb"><label for="range-label">高さ</label><a class='deleteIcon' href='/products/list?name={{name}}&price_min={{price_min}}&price_max={{price_max}}&size_vertical_min=0&size_vertical_max=300&size_width_min={{size_width_min}}&size_width_max={{size_width_max}}'><i class="fa-regular fa-trash-can ml-20"></i></a></div>
  457.                         <div class="flex">
  458.                             <div><span id="start-value3"></span>~</div>
  459.                             <div><span id="end-value4"></span>cm</div>
  460.                         </div>
  461.                         <div class="slidebar-multithumb-title"></div>
  462.                         {% if size_vertical_min %}
  463.                         <input class="thumb-1" type="range" name="size_vertical_min" id="range-3" value={{size_vertical_min}} min="0" max="500" step="10">
  464.                         {% else %}
  465.                         <input class="thumb-1" type="range" name="size_vertical_min" id="range-3" value="0" min="0" max="300" step="10">
  466.                         {% endif %}
  467.                         {% if size_vertical_max %}
  468.                         <input class="thumb-2" type="range" name="size_vertical_max" id="range-4" value={{size_vertical_max}} min="0" max="300" step="10">
  469.                         {% else %}
  470.                         <input class="thumb-2" type="range" name="size_vertical_max" id="range-4" value="300" min="0" max="300" step="10">
  471.                         {% endif %}
  472.                     </div>
  473.                 </div>
  474.                 <div class="product-list-size">
  475.                     <div class="slidebar-multithumb">
  476.                         <div class="fontweight-bold mb"><label for="range-label">幅</label><a class='deleteIcon' href='/products/list?name={{name}}&price_min={{price_min}}&price_max={{price_max}}&size_vertical_min={{size_vertical_min}}&size_vertical_max={{size_vertical_max}}&size_width_min=0&size_width_max=300'><i class="fa-regular fa-trash-can ml-20"></i></a></div>
  477.                         <div class="flex">
  478.                             <div><span id="start-value5"></span>~</div>
  479.                             <div><span id="end-value6"></span>cm</div>
  480.                         </div>
  481.                         <div class="slidebar-multithumb-title"></div>
  482.                         {% if size_width_min %}
  483.                         <input class="thumb-1" type="range" name="size_width_min" id="range-5" value={{size_width_min}} min="0" max="300" step="10">
  484.                         {% else %}
  485.                         <input class="thumb-1" type="range" name="size_width_min" id="range-5" value="0" min="0" max="300" step="10">
  486.                         {% endif %}
  487.                         {% if size_width_max %}
  488.                         <input class="thumb-2" type="range" name="size_width_max" id="range-6" value={{size_width_max}} min="0" max="300" step="10">
  489.                         {% else %}
  490.                         <input class="thumb-2" type="range" name="size_width_max" id="range-6" value="300" min="0" max="300" step="10">
  491.                         {% endif %}
  492.                     </div>
  493.                 </div>
  494.             </div>
  495.         </form>
  496.             
  497.         {% if pagination.totalItemCount > 0 %}
  498.             <div class="ec-shelfRole">
  499.                 <ul class="ec-shelfGrid">
  500.                     {% for Product in pagination %}
  501.                         <li class="ec-shelfGrid__item">
  502.                             <a href="{{ url('product_detail', {'id': Product.id}) }}" class="product-list-description">
  503.                                 {# <p class="ec-shelfGrid__item-image"> #}
  504.                                 <div class="img-wrap">
  505.                                     <img class="img" src="{{ asset(Product.main_list_image|no_image_product, 'save_image') }}" alt="{{ Product.name }}" {% if loop.index > 5 %} loading="lazy"{% endif %}>
  506.                                 </div>
  507.                                 {# </p> #}
  508.                                 <p class="price02-default margin">{{ Product.name }}</p>
  509.                                 {# アーティスト名 #}
  510.                                 {# {% for artist in artists %}
  511.                                     {% if Product.getArtistId == artist.id %}
  512.                                         <p class="margin">{{ artist.name }}</P>
  513.                                     {% endif %}
  514.                                 {% endfor %} #}
  515.                                 {# 絵の技法 #}
  516.                                 {% if Product.getProductionTechnique is not null %}
  517.                                     <p class="margin">{{ Product.getProductionTechnique }}</p>
  518.                                 {% endif %}
  519.                                 {# 絵のサイズ #}
  520.                                 {% if Product.getProductionSizeVertical and Product.getProductionSizeWidth %}
  521.                                     <p class="margin">{{ Product.getProductionSizeVertical }} x {{ Product.getProductionSizeWidth }} cm</p>
  522.                                 {% endif %}
  523.                                 {% if Product.description_list %}
  524.                                     <p class="margin">{{ Product.description_list|raw|nl2br }}</p>
  525.                                 {% endif %}
  526.                                 <p class="price02-default margin">
  527.                                     {% if Product.hasProductClass %}
  528.                                         {% if Product.getPrice02Min == Product.getPrice02Max %}
  529.                                             {{ Product.getPrice02IncTaxMin|price }}
  530.                                         {% else %}
  531.                                             {{ Product.getPrice02IncTaxMin|price }} ~ {{ Product.getPrice02IncTaxMax|price }}
  532.                                         {% endif %}
  533.                                     {% else %}
  534.                                         {{ Product.getPrice02IncTaxMin|price }}
  535.                                     {% endif %}
  536.                                 </p>
  537.                             </a>
  538.                             {% if Product.stock_find %}
  539.                                 {% set form = forms[Product.id] %}
  540.                                 {# Todo ここの下のform,hiddenで残しているが無くす? #}
  541.                                 <form name="form{{ Product.id }}" id="productForm{{ Product.id }}" action="{{ url('product_add_cart', {id:Product.id}) }}" method="post">
  542.                                     <div class="ec-productRole__actions">
  543.                                         {% if form.classcategory_id1 is defined %}
  544.                                             <div class="ec-select">
  545.                                                 {{ form_widget(form.classcategory_id1) }}
  546.                                                 {{ form_errors(form.classcategory_id1) }}
  547.                                             </div>
  548.                                             {% if form.classcategory_id2 is defined %}
  549.                                                 <div class="ec-select">
  550.                                                     {{ form_widget(form.classcategory_id2) }}
  551.                                                     {{ form_errors(form.classcategory_id2) }}
  552.                                                 </div>
  553.                                             {% endif %}
  554.                                         {% endif %}
  555.                                         <div class="ec-numberInput"><span>{{ '数量'|trans }}</span>
  556.                                             {{ form_widget(form.quantity, {'attr': {'class': 'quantity'}}) }}
  557.                                             {{ form_errors(form.quantity) }}
  558.                                         </div>
  559.                                     </div>
  560.                                     {{ form_rest(form) }}
  561.                                 </form>
  562.                                 <div class="ec-productRole__btn">
  563.                                     <button type="submit" class="ec-blockBtn--action add-cart" data-cartid="{{ Product.id }}" form="productForm{{ Product.id }}">
  564.                                         {{ 'カートに入れる'|trans }}
  565.                                     </button>
  566.                                 </div>
  567.                             {% else %}
  568.                                 <div class="ec-productRole__btn">
  569.                                     <button type="button" class="ec-blockBtn--action" disabled="disabled">
  570.                                         {{ 'ただいま品切れ中です。'|trans }}
  571.                                     </button>
  572.                                 </div>
  573.                             {% endif %}
  574.                         </li>
  575.                     {% endfor %}
  576.                 </ul>
  577.             </div>
  578.             <div class="ec-modal">
  579.                 <div class="ec-modal-overlay">
  580.                     <div class="ec-modal-wrap">
  581.                         <span class="ec-modal-close"><span class="ec-icon"><img src="{{ asset('assets/icon/cross-dark.svg') }}" alt=""/></span></span>
  582.                         <div id="ec-modal-header" class="text-center">{{ 'カートに追加しました。'|trans }}</div>
  583.                         <div class="ec-modal-box">
  584.                             <div class="ec-role">
  585.                                 <span class="ec-inlineBtn--cancel">{{ 'お買い物を続ける'|trans }}</span>
  586.                                 <a href="{{ url('cart') }}" class="ec-inlineBtn--action mt-5per">{{ 'カートへ進む'|trans }}</a>
  587.                             </div>
  588.                         </div>
  589.                     </div>
  590.                 </div>
  591.             </div>
  592.             <div class="ec-pagerRole">
  593.                 {% include "pager.twig" with {'pages': pagination.paginationData} %}
  594.             </div>
  595.         {% endif %}
  596.     {% endif %}
  597. {% endblock %}