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. {% if Category is not null %}
  10. {% if Category.id == 7 and 14 in Selects['ball-type'] %}
  11.     {% set subtitle = '持ち込みボール' %}
  12. {% elseif Category.id == 7 and 11 in Selects['ball-type'] %}
  13.     {% set subtitle = 'スリクソン' %}
  14. {% elseif Category.id == 7 and 12 in Selects['ball-type'] %}
  15.     {% set subtitle = 'ゼクシオ' %}
  16. {% elseif Category.id == 7 and 13 in Selects['ball-type'] %}
  17.     {% set subtitle = 'ツアースペシャル' %}
  18. {% endif %}
  19. {% if Category.id == 9 and 15 in Selects['design-cate'] %}
  20.     {% set subtitle = '誕生日祝い' %}
  21. {% elseif Category.id == 9 and 16 in Selects['design-cate'] %}
  22.     {% set subtitle = '定年退職祝い' %}
  23. {% elseif Category.id == 9 and 17 in Selects['design-cate'] %}
  24.     {% set subtitle = '還暦祝い' %}
  25. {% elseif Category.id == 9 and 18 in Selects['design-cate'] %}
  26.     {% set subtitle = 'コンペ景品' %}
  27. {% elseif Category.id == 9 and 19 in Selects['design-cate'] %}
  28.     {% set subtitle = '父の日祝い' %}
  29. {% elseif Category.id == 9 and 20 in Selects['design-cate'] %}
  30.     {% set subtitle = '母の日祝い' %}
  31. {% elseif Category.id == 9 and 21 in Selects['design-cate'] %}
  32.     {% set subtitle = 'GOLFPRINT オリジナル' %}
  33. {% endif %}
  34. {% endif %}
  35. {% set body_class = 'product_page' %}
  36. {% block stylesheet %}
  37.     <style>
  38.         #modalWrapAlert {
  39.             display: none;
  40.             background: 0 0;
  41.             width: 100%;
  42.             height: 100%;
  43.             position: fixed;
  44.             top: 0;
  45.             left: 0;
  46.             z-index: 100;
  47.             overflow: hidden
  48.         }
  49.         .modalBoxAlert {
  50.             position: fixed;
  51.             width: 85%;
  52.             max-width: 420px;
  53.             height: 0;
  54.             top: 0;
  55.             bottom: 0;
  56.             left: 0;
  57.             right: 0;
  58.             margin: auto;
  59.             overflow: hidden;
  60.             opacity: 1;
  61.             display: none;
  62.             border-radius: 3px;
  63.             z-index: 1000
  64.         }
  65.         .modalInnerAlert {
  66.             padding: 10px;
  67.             text-align: center;
  68.             box-sizing: border-box;
  69.             background: rgba(0, 0, 0, .7);
  70.             color: #fff
  71.         }
  72.     </style>
  73. {% endblock %}
  74. {% block javascript %}
  75.     <script>
  76.         eccube.productsClassCategories = {
  77.             {% for Product in pagination %}
  78.             "{{ Product.id|escape('js') }}": {{ class_categories_as_json(Product)|raw }}{% if loop.last == false %}, {% endif %}
  79.             {% endfor %}
  80.         };
  81.         $(function() {
  82.             // 表示件数を変更
  83.             $('.disp-number').change(function() {
  84.                 var dispNumber = $(this).val();
  85.                 $('#disp_number').val(dispNumber);
  86.                 $('#pageno').val(1);
  87.                 checkAndSetVal();
  88.                 $("#form1").submit();
  89.             });
  90.             // 並び順を変更
  91.             $('.order-by').change(function() {
  92.                 var orderBy = $(this).val();
  93.                 $('#orderby').val(orderBy);
  94.                 $('#pageno').val(1);
  95.                 checkAndSetVal();
  96.                 $("#form1").submit();
  97.             });
  98. {# Category.id:7 ボールを選ぶ用 #}
  99.             $('.ball_type').change(function() {
  100.                 let selCnt = 0;
  101.                 const ballType = document.forms.formSelPC.ball_type;
  102.                 for( let i=0; i < ballType.length; i++ ) {
  103.                     if( ballType[i].checked ) {
  104.                         selCnt++;
  105.                     }
  106.                 }
  107.                 if( selCnt == ballType.length ) {
  108.                     for( let i=0; i < ballType.length; i++ ) {
  109.                         ballType[i].checked = false;
  110.                     }
  111.                     //alert('絞り込みたい項目がある場合のみチェックしてください。');
  112.                     selAlert();
  113.                 }
  114.             });
  115.             $('.ball_nums').change(function() {
  116.                 let selCnt = 0;
  117.                 const ballNums = document.forms.formSelPC.ball_nums;
  118.                 for( let i=0; i < ballNums.length; i++ ) {
  119.                     if( ballNums[i].checked ) {
  120.                         selCnt++;
  121.                     }
  122.                 }
  123.                 if( selCnt == ballNums.length ) {
  124.                     for( let i=0; i < ballNums.length; i++ ) {
  125.                         ballNums[i].checked = false;
  126.                     }
  127.                     //alert('絞り込みたい項目がある場合のみチェックしてください。');
  128.                     selAlert();
  129.                 }
  130.             });
  131.             $('.ball_price').change(function() {
  132.                 let selCnt = 0;
  133.                 const ballPrice = document.forms.formSelPC.ball_price;
  134.                 for( let i=0; i < ballPrice.length; i++ ) {
  135.                     if( ballPrice[i].checked ) {
  136.                         selCnt++;
  137.                     }
  138.                 }
  139.                 if( selCnt == ballPrice.length ) {
  140.                     for( let i=0; i < ballPrice.length; i++ ) {
  141.                         ballPrice[i].checked = false;
  142.                     }
  143.                     //alert('絞り込みたい項目がある場合のみチェックしてください。');
  144.                     selAlert();
  145.                 }
  146.             });
  147.             $('.ball_type_sp').change(function() {
  148.                 let selCnt = 0;
  149.                 const ballType = document.forms.formSelSP.ball_type;
  150.                 for( let i=0; i < ballType.length; i++ ) {
  151.                     if( ballType[i].checked ) {
  152.                         selCnt++;
  153.                     }
  154.                 }
  155.                 if( selCnt == ballType.length ) {
  156.                     for( let i=0; i < ballType.length; i++ ) {
  157.                         ballType[i].checked = false;
  158.                     }
  159.                     //alert('絞り込みたい項目がある場合のみチェックしてください。');
  160.                     selAlert();
  161.                 }
  162.             });
  163.             $('.ball_nums_sp').change(function() {
  164.                 let selCnt = 0;
  165.                 const ballNums = document.forms.formSelSP.ball_nums;
  166.                 for( let i=0; i < ballNums.length; i++ ) {
  167.                     if( ballNums[i].checked ) {
  168.                         selCnt++;
  169.                     }
  170.                 }
  171.                 if( selCnt == ballNums.length ) {
  172.                     for( let i=0; i < ballNums.length; i++ ) {
  173.                         ballNums[i].checked = false;
  174.                     }
  175.                     //alert('絞り込みたい項目がある場合のみチェックしてください。');
  176.                     selAlert();
  177.                 }
  178.             });
  179.             $('.ball_price_sp').change(function() {
  180.                 let selCnt = 0;
  181.                 const ballPrice = document.forms.formSelSP.ball_price;
  182.                 for( let i=0; i < ballPrice.length; i++ ) {
  183.                     if( ballPrice[i].checked ) {
  184.                         selCnt++;
  185.                     }
  186.                 }
  187.                 if( selCnt == ballPrice.length ) {
  188.                     for( let i=0; i < ballPrice.length; i++ ) {
  189.                         ballPrice[i].checked = false;
  190.                     }
  191.                     //alert('絞り込みたい項目がある場合のみチェックしてください。');
  192.                     selAlert();
  193.                 }
  194.             });
  195. {# Category.id:8 マーカーを選ぶ用 #}
  196. {# Category.id:9 デザインを選ぶ用 #}
  197.             $('.design_cate').change(function() {
  198.                 let selCnt = 0;
  199.                 const designCate = document.forms.formSelPC.design_cate;
  200.                 for( let i=0; i < designCate.length; i++ ) {
  201.                     if( designCate[i].checked ) {
  202.                         selCnt++;
  203.                     }
  204.                 }
  205.                 if( selCnt == designCate.length ) {
  206.                     for( let i=0; i < designCate.length; i++ ) {
  207.                         designCate[i].checked = false;
  208.                     }
  209.                     //alert('絞り込みたい項目がある場合のみチェックしてください。');
  210.                     selAlert();
  211.                 }
  212.             });
  213.             $('.design_cate_sp').change(function() {
  214.                 let selCnt = 0;
  215.                 const designCate = document.forms.formSelSP.design_cate;
  216.                 for( let i=0; i < designCate.length; i++ ) {
  217.                     if( designCate[i].checked ) {
  218.                         selCnt++;
  219.                     }
  220.                 }
  221.                 if( selCnt == designCate.length ) {
  222.                     for( let i=0; i < designCate.length; i++ ) {
  223.                         designCate[i].checked = false;
  224.                     }
  225.                     //alert('絞り込みたい項目がある場合のみチェックしてください。');
  226.                     selAlert();
  227.                 }
  228.             });
  229. {# Category.id:10 ラッピング用 #}
  230.             $('.add-cart').on('click', function(e) {
  231.                 var $form = $(this).parents('li').find('form');
  232.                 // 個数フォームのチェック
  233.                 var $quantity = $form.parent().find('.quantity');
  234.                 if ($quantity.val() < 1) {
  235.                     $quantity[0].setCustomValidity('{{ '1以上で入力してください。'|trans }}');
  236.                     setTimeout(function() {
  237.                         loadingOverlay('hide');
  238.                     }, 100);
  239.                     return true;
  240.                 } else {
  241.                     $quantity[0].setCustomValidity('');
  242.                 }
  243.                 e.preventDefault();
  244.                 $.ajax({
  245.                     url: $form.attr('action'),
  246.                     type: $form.attr('method'),
  247.                     data: $form.serialize(),
  248.                     dataType: 'json',
  249.                     beforeSend: function(xhr, settings) {
  250.                         // Buttonを無効にする
  251.                         $('.add-cart').prop('disabled', true);
  252.                     }
  253.                 }).done(function(data) {
  254.                     // レスポンス内のメッセージをalertで表示
  255.                     $.each(data.messages, function() {
  256.                         $('#ec-modal-header').text(this);
  257.                     });
  258.                     $('.ec-modal').show()
  259.                     // カートブロックを更新する
  260.                     $.ajax({
  261.                         url: '{{ url('block_cart') }}',
  262.                         type: 'GET',
  263.                         dataType: 'html'
  264.                     }).done(function(html) {
  265.                         $('.ec-headerRole__cart').html(html);
  266.                     });
  267.                 }).fail(function(data) {
  268.                     alert('{{ 'カートへの追加に失敗しました。'|trans }}');
  269.                 }).always(function(data) {
  270.                     // Buttonを有効にする
  271.                     $('.add-cart').prop('disabled', false);
  272.                 });
  273.             });
  274.         });
  275.         $('.ec-modal-wrap').on('click', function(e) {
  276.             // モーダル内の処理は外側にバブリングさせない
  277.             e.stopPropagation();
  278.         });
  279.         $('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
  280.             $('.ec-modal').hide()
  281.         });
  282.     </script>
  283.     <script>
  284.     {% if Category is not null %}
  285.     {% if Category.id == 7 %}{# ボールを選ぶ #}
  286.         function setValPC( rst = 1 ) {
  287.             let sels_type = '';
  288.             const ballType = document.forms.formSelPC.ball_type;
  289.             for( let i=0; i < ballType.length; i++ ) {
  290.                 if( ballType[i].checked ) {
  291.                     if( sels_type ) {
  292.                         sels_type = sels_type + ',';
  293.                     }
  294.                     sels_type = sels_type + ballType[i].value;
  295.                 }
  296.             }
  297.             $('#ball-type').val(sels_type);
  298.             let sels_nums = '';
  299.             const ballNums = document.forms.formSelPC.ball_nums;
  300.             for( let i=0; i < ballNums.length; i++ ) {
  301.                 if( ballNums[i].checked ) {
  302.                     if( sels_nums ) {
  303.                         sels_nums = sels_nums + ',';
  304.                     }
  305.                     sels_nums = sels_nums + ballNums[i].value;
  306.                 }
  307.             }
  308.             $('#ball-nums').val(sels_nums);
  309.             let sels_price = '';
  310.             const ballPrice = document.forms.formSelPC.ball_price;
  311.             for( let i=0; i < ballPrice.length; i++ ) {
  312.                 if( ballPrice[i].checked ) {
  313.                     if( sels_price ) {
  314.                         sels_price = sels_price + ',';
  315.                     }
  316.                     sels_price = sels_price + ballPrice[i].value;
  317.                 }
  318.             }
  319.             $('#ball-price').val(sels_price);
  320.             if( rst == 1 ) {
  321.                 $('#pageno').val(1);
  322.                 $('#disp_number').val(21);
  323.                 $('#orderby').val(2);
  324.             }
  325.             $("#form1").submit();
  326.         }
  327.         function setValSP( rst = 1 ) {
  328.             let sels_type = '';
  329.             const ballType = document.forms.formSelSP.ball_type;
  330.             for( let i=0; i < ballType.length; i++ ) {
  331.                 if( ballType[i].checked ) {
  332.                     if( sels_type ) {
  333.                         sels_type = sels_type + ',';
  334.                     }
  335.                     sels_type = sels_type + ballType[i].value;
  336.                 }
  337.             }
  338.             $('#ball-type').val(sels_type);
  339.             let sels_nums = '';
  340.             const ballNums = document.forms.formSelSP.ball_nums;
  341.             for( let i=0; i < ballNums.length; i++ ) {
  342.                 if( ballNums[i].checked ) {
  343.                     if( sels_nums ) {
  344.                         sels_nums = sels_nums + ',';
  345.                     }
  346.                     sels_nums = sels_nums + ballNums[i].value;
  347.                 }
  348.             }
  349.             $('#ball-nums').val(sels_nums);
  350.             let sels_price = '';
  351.             const ballPrice = document.forms.formSelSP.ball_price;
  352.             for( let i=0; i < ballPrice.length; i++ ) {
  353.                 if( ballPrice[i].checked ) {
  354.                     if( sels_price ) {
  355.                         sels_price = sels_price + ',';
  356.                     }
  357.                     sels_price = sels_price + ballPrice[i].value;
  358.                 }
  359.             }
  360.             $('#ball-price').val(sels_price);
  361.             if( rst == 1 ) {
  362.                 $('#pageno').val(1);
  363.                 $('#disp_number').val(21);
  364.                 $('#orderby').val(2);
  365.             }
  366.             $("#form1").submit();
  367.         }
  368.         function checkAndSetVal() {
  369.             let selCntPC = 0;
  370.             const ballType = document.forms.formSelPC.ball_type;
  371.             for( let i=0; i < ballType.length; i++ ) {
  372.                 if( ballType[i].checked ) {
  373.                     selCntPC++;
  374.                 }
  375.             }
  376.             const ballNums = document.forms.formSelPC.ball_nums;
  377.             for( let i=0; i < ballNums.length; i++ ) {
  378.                 if( ballNums[i].checked ) {
  379.                     selCntPC++;
  380.                 }
  381.             }
  382.             const ballPrice = document.forms.formSelPC.ball_price;
  383.             for( let i=0; i < ballPrice.length; i++ ) {
  384.                 if( ballPrice[i].checked ) {
  385.                     selCntPC++;
  386.                 }
  387.             }
  388.             let selCntSP = 0;
  389.             const ballTypeSP = document.forms.formSelSP.ball_type;
  390.             for( let i=0; i < ballTypeSP.length; i++ ) {
  391.                 if( ballTypeSP[i].checked ) {
  392.                     selCntSP++;
  393.                 }
  394.             }
  395.             const ballNumsSP = document.forms.formSelSP.ball_nums;
  396.             for( let i=0; i < ballNumsSP.length; i++ ) {
  397.                 if( ballNumsSP[i].checked ) {
  398.                     selCntSP++;
  399.                 }
  400.             }
  401.             const ballPriceSP = document.forms.formSelSP.ball_price;
  402.             for( let i=0; i < ballPriceSP.length; i++ ) {
  403.                 if( ballPriceSP[i].checked ) {
  404.                     selCntSP++;
  405.                 }
  406.             }
  407.             if( selCntPC > 0 && selCntSP == 0 ) {
  408.                 setValPC(0);
  409.             }
  410.             else if( selCntPC == 0 && selCntSP > 0 ) {
  411.                 setValSP(0);
  412.             }
  413.             {# 絞り込み2回目以降はPC版、SP版両方の絞り込みが選択されている #}
  414.             else if( selCntPC > 0 && selCntSP > 0 ) {
  415.                 setValPC(0);
  416.             }
  417.             else {
  418.                 return false;
  419.             }
  420.         }
  421.     {% elseif Category.id == 8 %}{# マーカーを選ぶ #}
  422.     {% elseif Category.id == 9 %}{# デザインを選ぶ #}
  423.         function setValPC( rst = 1 ) {
  424.             let sels_design = '';
  425.             const designCate = document.forms.formSelPC.design_cate;
  426.             for( let i=0; i < designCate.length; i++ ) {
  427.                 if( designCate[i].checked ) {
  428.                     if( sels_design ) {
  429.                         sels_design = sels_design + ',';
  430.                     }
  431.                     sels_design = sels_design + designCate[i].value;
  432.                 }
  433.             }
  434.             $('#design-cate').val(sels_design);
  435.             if( rst == 1 ) {
  436.                 $('#pageno').val(1);
  437.                 $('#disp_number').val(21);
  438.                 $('#orderby').val(2);
  439.             }
  440.             $("#form1").submit();
  441.         }
  442.         function setValSP( rst = 1 ) {
  443.             let sels_design = '';
  444.             const designCate = document.forms.formSelSP.design_cate;
  445.             for( let i=0; i < designCate.length; i++ ) {
  446.                 if( designCate[i].checked ) {
  447.                     if( sels_design ) {
  448.                         sels_design = sels_design + ',';
  449.                     }
  450.                     sels_design = sels_design + designCate[i].value;
  451.                 }
  452.             }
  453.             $('#design-cate').val(sels_design);
  454.             if( rst == 1 ) {
  455.                 $('#pageno').val(1);
  456.                 $('#disp_number').val(21);
  457.                 $('#orderby').val(2);
  458.             }
  459.             $("#form1").submit();
  460.         }
  461.         function checkAndSetVal() {
  462.             let selCntPC = 0;
  463.             const designCate = document.forms.formSelPC.design_cate;
  464.             for( let i=0; i < designCate.length; i++ ) {
  465.                 if( designCate[i].checked ) {
  466.                     selCntPC++;
  467.                 }
  468.             }
  469.             let selCntSP = 0;
  470.             const designCateSP = document.forms.formSelSP.design_cate;
  471.             for( let i=0; i < designCateSP.length; i++ ) {
  472.                 if( designCateSP[i].checked ) {
  473.                     selCntSP++;
  474.                 }
  475.             }
  476.             if( selCntPC > 0 && selCntSP == 0 ) {
  477.                 setValPC(0);
  478.             }
  479.             else if( selCntPC == 0 && selCntSP > 0 ) {
  480.                 setValSP(0);
  481.             }
  482.             {# 絞り込み2回目以降はPC版、SP版両方の絞り込みが選択されている #}
  483.             else if( selCntPC > 0 && selCntSP > 0 ) {
  484.                 setValPC(0);
  485.             }
  486.             else {
  487.                 return false;
  488.             }
  489.         }
  490.     {% elseif Category.id == 10 %}{# ラッピング #}
  491.     {% endif %}
  492.     {% endif %}
  493.     </script>
  494.     <script>
  495.         function selAlert() {
  496.             var modalThis = $('body').find('#alert01');
  497.             //bodyの最下にwrapを作る 
  498.             $('body').append('<div id="modalWrapAlert" />');
  499.             var wrap = $('#modalWrapAlert');
  500.             wrap.fadeIn('200');
  501.             modalThis.fadeIn('200');
  502.             //モーダルの高さを取ってくる 
  503.             function mdlHeight() {
  504.                 var wh = $(window).innerHeight();
  505.                 var attH = modalThis.find('.modalInnerAlert').innerHeight();
  506.                 modalThis.css({
  507.                     height: attH
  508.                 });
  509.             }
  510.             mdlHeight();
  511.             $(window).on('resize', function () {
  512.                 mdlHeight();
  513.             });
  514.             function clickAction() {
  515.                 modalThis.fadeOut('200');
  516.                 wrap.fadeOut('200', function () {
  517.                     wrap.remove();
  518.                 });
  519.             }
  520.             //wrapクリックされたら 
  521.             wrap.on('click', function () {
  522.                 clickAction();
  523.                 return false;
  524.             });
  525.             //2秒後に消える 
  526.             setTimeout(clickAction, 2000);
  527.             return false;
  528.         }
  529.     </script>
  530. {% endblock %}
  531. {% block main %}
  532.     {% if search_form.category_id.vars.errors|length > 0 %}
  533.         <div class="ec-searchnavRole">
  534.             <p class="errormsg text-danger">{{ 'ご指定のカテゴリは存在しません'|trans }}</p>
  535.         </div>
  536.     {% else %}
  537.         <div class="container">
  538.             <form name="form1" id="form1" method="get" action="?">
  539.                 {% for item in search_form %}
  540.                     <input type="hidden" id="{{ item.vars.id }}"
  541.                            name="{{ item.vars.full_name }}"
  542.                            {% if item.vars.value is not empty %}value="{{ item.vars.value }}" {% endif %}/>
  543.                 {% endfor %}
  544.                 {% if Category is not null %}
  545.                 {% if Category.id == 7 %}{# ボールを選ぶ #}
  546.                 <input type="hidden" id="ball-type" name="ball-type">
  547.                 <input type="hidden" id="ball-nums" name="ball-nums">
  548.                 <input type="hidden" id="ball-price" name="ball-price">
  549.                 {% elseif Category.id == 8 %}{# マーカーを選ぶ #}
  550.                 {% elseif Category.id == 9 %}{# デザインを選ぶ #}
  551.                 <input type="hidden" id="design-cate" name="design-cate">
  552.                 {% elseif Category.id == 10 %}{# ラッピング #}
  553.                 {% endif %}
  554.                 {% endif %}
  555.             </form>
  556.             <!-- パンくずリスト -->
  557.             <nav aria-label="breadcrumb" class="my-3">
  558.                 <ol class="breadcrumb">
  559.                     <li class="breadcrumb-item"><a href="{{ url('homepage') }}">ホーム</a></li>
  560.                     {% if Category is not null %}
  561.                     {% if Category.id == 7 %}
  562.                         <li class="breadcrumb-item active" aria-current="page">ボールを選ぶ</li>
  563.                     {% elseif Category.id == 8 %}{# マーカーを選ぶ #}
  564.                     {% elseif Category.id == 9 %}{# デザインを選ぶ #}
  565.                         <li class="breadcrumb-item active" aria-current="page">デザインを選ぶ</li>
  566.                     {% elseif Category.id == 10 %}{# ラッピング #}
  567.                     {% endif %}
  568.                     {% else %}
  569.                         <li class="breadcrumb-item active" aria-current="page">全商品</li>
  570.                     {% endif %}
  571.                 </ol>
  572.             </nav>
  573.             <div class="layout-2colmun">
  574.                 {% if Category is not null %}
  575.                 {% if Category.id == 7 %}{# ボールを選ぶ #}
  576.                     {{ include('Product/aside_ball.twig') }}
  577.                 {% elseif Category.id == 8 %}{# マーカーを選ぶ #}
  578.                 {% elseif Category.id == 9 %}{# デザインを選ぶ #}
  579.                     {{ include('Product/aside_design.twig') }}
  580.                 {% elseif Category.id == 10 %}{# ラッピング #}
  581.                 {% endif %}
  582.                 {% else %}
  583.                     {{ include('Block/aside_others.twig') }}
  584.                 {% endif %}
  585.                 <main class="main">
  586.                     {% if Category is not null %}
  587.                     {% if Category.id == 7 %}{# ボールを選ぶ #}
  588.                         <h1 class="fw-bold mb-5">名入れゴルフボール</h1>
  589.                         <p>
  590.                             お好きなデザインをゴルフボールに印刷します。<br>
  591.                             <span class="text-danger">表示価格にはボール代・印刷代が税込みで含まれています。</span>
  592.                         </p>
  593.                     {% elseif Category.id == 8 %}{# マーカーを選ぶ #}
  594.                     {% elseif Category.id == 9 %}{# デザインを選ぶ #}
  595.                         <h1 class="fw-bold mb-5">名入れデザイン</h1>
  596.                         <p>
  597.                             お好きなデザインをゴルフボールに印刷します。<br>
  598.                             ボールに印刷したいデザインをカートに入れてご注文ください。<br>
  599.                             お客様の方でデザインのご用意がある場合は「<a href="{{ url('product_detail', {'id': 99}) }}">デザインを入稿する</a>」を選んでデータをアップロードしてください。<br>
  600.                             <span class="text-danger">デザインの内容によって料金・納期は変わりません。(印刷代も含め、全てボールの代金に含まれています)</span>
  601.                         </p>
  602.                         <p class="my-3">導入事例から参考デザインを選ぶこともできます。</p>
  603.                         <a href="" class="btn btn-lg btn-dark py-3 rounded-0" data-bs-toggle="modal" data-bs-target="#fullScreenModal"><i class="icon-arrow_circle_right"></i>導入事例参考デザインを見る</a>
  604.                     {% elseif Category.id == 10 %}{# ラッピング #}
  605.                     {% endif %}
  606.                     {% endif %}
  607.                     {% if pagination.totalItemCount > 0 %}
  608.                         <div class="d-flex justify-content-between mb-4 border-bottom py-3 align-items-center flex-column flex-md-row">
  609.                             {{ '<div><span class="fw-bold">%count%件</span>の商品が見つかりました。</div>'|trans({ '%count%': pagination.totalItemCount })|raw }}
  610.                             <div class="d-flex mt-3 mt-md-0">
  611.                                 <div class="me-2 d-block d-lg-none">
  612.                                     {% if Category is not null %}
  613.                                     {% if Category.id == 7 %}{# ボールを選ぶ #}
  614.                                     <a href="" class="btn btn-outline-dark btn-sm" data-bs-toggle="modal" data-bs-target="#filterModalBall">絞込</a>
  615.                                     {% elseif Category.id == 8 %}{# マーカーを選ぶ #}
  616.                                     {% elseif Category.id == 9 %}{# デザインを選ぶ #}
  617.                                     <a href="" class="btn btn-outline-dark btn-sm" data-bs-toggle="modal" data-bs-target="#filterModal">絞込</a>
  618.                                     {% elseif Category.id == 10 %}{# ラッピング #}
  619.                                     {% endif %}
  620.                                     {% endif %}
  621.                                 </div>
  622.                                 {% if pagination.totalItemCount > 0 %}
  623.                                     <div class="me-1">
  624.                                         {{ form_widget(search_form.disp_number, {'id': '', 'attr': {'class': 'disp-number form-select form-select-sm'}}) }}
  625.                                     </div>
  626.                                     {% if Category is not null %}
  627.                                     <div class="ms-1{% if Category.id == 9 %} d-none{% endif %}">
  628.                                         {{ form_widget(search_form.orderby, {'id': '', 'attr': {'class': 'order-by form-select form-select-sm'}}) }}
  629.                                     </div>
  630.                                     {% else %}
  631.                                     <div class="ms-1">
  632.                                         {{ form_widget(search_form.orderby, {'id': '', 'attr': {'class': 'order-by form-select form-select-sm'}}) }}
  633.                                     </div>
  634.                                     {% endif %}
  635.                                 {% endif %}
  636.                             </div>
  637.                         </div>
  638.                         <div class="row">
  639.                             {% for Product in pagination %}
  640.                                 {# ▼ 導入事例参考デザインは表示しない #}
  641.                                 <div class="col-6 col-lg-4 mb-4">
  642.                                     <a href="{{ url('product_detail', {'id': Product.id}) }}" class="item-thumb">
  643.                                         <img src="{{ asset(Product.main_list_image|no_image_product, 'save_image') }}" class="thumb" alt="{{ Product.name }}" {% if loop.index > 5 %} loading="lazy"{% endif %}>
  644.                                         <div class="name">{{ Product.name }}</div>
  645.                                         {% for Tag in Product.ProductTag %}
  646.                                             {% if Tag.Tag.name == '一番人気' %}
  647.                                                 <span class="icon -popular">一番人気</span>
  648.                                             {% elseif Tag.Tag.name == '即日配送' %}
  649.                                                 <span class="icon -rapid">即日配送</span>
  650.                                             {% elseif Tag.Tag.name == '代引手数料無料' %}
  651.                                                 <span class="icon -free">代引手数料無料</span>
  652.                                             {% elseif Tag.Tag.name == '送料無料' %}
  653.                                                 <span class="icon -free">送料無料</span>
  654.                                             {% elseif Tag.Tag.name == '3%還元' %}
  655.                                                 <span class="icon -point">3%還元</span>
  656.                                             {% elseif Tag.Tag.name == '人気' %}
  657.                                                 <span class="icon -popular">人気</span>
  658.                                             {% endif %}
  659.                                         {% endfor %}
  660.                                         {% if Category is not null %}
  661.                                         {% if Category.id == 7 %}{# ボールを選ぶ #}
  662.                                         <div class="price">
  663.                                             {% if Product.hasProductClass %}
  664.                                                 {% if Product.getPrice02Min == Product.getPrice02Max %}
  665.                                                     {{ Product.getPrice02IncTaxMin|number_format }} 円 (税込)
  666.                                                 {% else %}
  667.                                                     {{ Product.getPrice02IncTaxMin|number_format }} ~ {{ Product.getPrice02IncTaxMax|number_format }} 円 (税込)
  668.                                                 {% endif %}
  669.                                             {% else %}
  670.                                                 {{ Product.getPrice02IncTaxMin|number_format }} 円 (税込)
  671.                                             {% endif %}
  672.                                         </div>
  673.                                         {% endif %}
  674.                                         {% else %}
  675.                                         <div class="price">
  676.                                             {% if Product.hasProductClass %}
  677.                                                 {% if Product.getPrice02Min == Product.getPrice02Max %}
  678.                                                     {{ Product.getPrice02IncTaxMin|number_format }} 円 (税込)
  679.                                                 {% else %}
  680.                                                     {{ Product.getPrice02IncTaxMin|number_format }} ~ {{ Product.getPrice02IncTaxMax|number_format }} 円 (税込)
  681.                                                 {% endif %}
  682.                                             {% else %}
  683.                                                 {{ Product.getPrice02IncTaxMin|number_format }} 円 (税込)
  684.                                             {% endif %}
  685.                                         </div>
  686.                                         {% endif %}
  687.                                     </a>
  688.                                 </div>
  689.                             {% endfor %}
  690.                         </div>
  691. {#
  692.                         <ul class="pagination justify-content-center mt-5">
  693.                             <li class="page-item"><a class="page-link text-dark" href="#">前へ</a></li>
  694.                             <li class="page-item"><a class="page-link text-dark active" href="#">1</a></li>
  695.                             <li class="page-item"><a class="page-link text-dark" href="#">2</a></li>
  696.                             <li class="page-item"><a class="page-link text-dark" href="#">3</a></li>
  697.                             <li class="page-item"><a class="page-link text-dark" href="#">次へ</a></li>
  698.                         </ul>
  699. #}
  700.                         {% include "pager.twig" with {'pages': pagination.paginationData} %}
  701.                     {% else %}
  702.                         <div class="d-flex justify-content-between mb-4 border-bottom py-3 align-items-center flex-column flex-md-row">
  703.                             <div><span>{{ 'ただいま準備中です'|trans }}</span></div>
  704.                         </div>
  705.                     {% endif %}
  706.                     <div class="modalBoxAlert" id="alert01">
  707.                         <div class="modalInnerAlert">
  708.                             絞り込みたい項目がある場合のみチェックしてください。
  709.                         </div>
  710.                     </div>
  711.                 </main>
  712.             </div>
  713.         </div>
  714.         <!-- modal -->
  715.         {% if Category is not null %}
  716.         {% if Category.id == 7 %}{# ボールを選ぶ #}
  717.         <div class="modal fade" id="filterModalBall" tabindex="-1" aria-labelledby="filterModalBallLabel" aria-hidden="true">
  718.             <div class="modal-dialog">
  719.                 <div class="modal-content">
  720.                     <div class="modal-header">
  721.                         <h5 class="modal-title" id="filterModalBallLabel">絞り込み</h5>
  722.                         <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
  723.                     </div>
  724.                     <form name="formSelSP" id="formSelSP" method="get" action="?">
  725.                     <div class="modal-body">
  726.                         <!-- 絞り込みフォームの内容をここに追加 -->
  727.                         <div class="aside-filter _modal">
  728.                         <div class="title">
  729.                             ボールの種類から選ぶ
  730.                         </div>
  731.                         <ul class="list-unstyled mb-0 list">
  732.                             <li>
  733.                                 <label>
  734.                                     <input type="checkbox" name="ball_type" class="ball_type_sp" value="14"{% if( 14 in Selects['ball-type'] ) %} checked{% endif %}>
  735.                                     持ち込みボール
  736.                                 </label>
  737.                             </li>
  738.                             <li>
  739.                                 <label>
  740.                                     <input type="checkbox" name="ball_type" class="ball_type_sp" value="11"{% if( 11 in Selects['ball-type'] ) %} checked{% endif %}>
  741.                                     スリクソン
  742.                                 </label>
  743.                             </li>
  744.                             <li>
  745.                                 <label>
  746.                                     <input type="checkbox" name="ball_type" class="ball_type_sp" value="12"{% if( 12 in Selects['ball-type'] ) %} checked{% endif %}>
  747.                                     ゼクシオ
  748.                                 </label>
  749.                             </li>
  750.                             <li>
  751.                                 <label>
  752.                                     <input type="checkbox" name="ball_type" class="ball_type_sp" value="13"{% if( 13 in Selects['ball-type'] ) %} checked{% endif %}>
  753.                                     ツアースペシャル
  754.                                 </label>
  755.                             </li>
  756.                         </ul>
  757.                         <div class="title">
  758.                             ボールの球数から選ぶ
  759.                         </div>
  760.                         <ul class="list-unstyled mb-0 list">
  761.                             <li>
  762.                                 <label>
  763.                                     <input type="checkbox" name="ball_nums" class="ball_nums_sp" value="8,13"{% if( 8 in Selects['ball-nums'] or 13 in Selects['ball-nums'] ) %} checked{% endif %}>
  764.                                     3球
  765.                                 </label>
  766.                             </li>
  767.                             <li>
  768.                                 <label>
  769.                                     <input type="checkbox" name="ball_nums" class="ball_nums_sp" value="11,14"{% if( 11 in Selects['ball-nums'] or 14 in Selects['ball-nums'] ) %} checked{% endif %}>
  770.                                     6球
  771.                                 </label>
  772.                             </li>
  773.                             <li>
  774.                                 <label>
  775.                                     <input type="checkbox" name="ball_nums" class="ball_nums_sp" value="12,15"{% if( 12 in Selects['ball-nums'] or 15 in Selects['ball-nums'] ) %} checked{% endif %}>
  776.                                     12球
  777.                                 </label>
  778.                             </li>
  779.                         </ul>
  780.                         <div class="title">
  781.                             価格で選ぶ
  782.                         </div>
  783.                         <ul class="list-unstyled mb-0 list">
  784.                             <li>
  785.                                 <label>
  786.                                     <input type="checkbox" name="ball_price" class="ball_price_sp" value="1"{% if( 1 in Selects['ball-price'] ) %} checked{% endif %}>
  787.                                     ~2,999円
  788.                                 </label>
  789.                             </li>
  790.                             <li>
  791.                                 <label>
  792.                                     <input type="checkbox" name="ball_price" class="ball_price_sp" value="2"{% if( 2 in Selects['ball-price'] ) %} checked{% endif %}>
  793.                                     3,000円~4,999円
  794.                                 </label>
  795.                             </li>
  796.                             <li>
  797.                                 <label>
  798.                                     <input type="checkbox" name="ball_price" class="ball_price_sp" value="3"{% if( 3 in Selects['ball-price'] ) %} checked{% endif %}>
  799.                                     5,000円~9,999円
  800.                                 </label>
  801.                             </li>
  802.                             <li>
  803.                                 <label>
  804.                                     <input type="checkbox" name="ball_price" class="ball_price_sp" value="4"{% if( 4 in Selects['ball-price'] ) %} checked{% endif %}>
  805.                                     10,000円以上
  806.                                 </label>
  807.                             </li>
  808.                         </ul>
  809.                         </div>
  810.                     </div>
  811.                     <div class="modal-footer">
  812.                         <button type="button" class="btn btn-outline-dark" data-bs-dismiss="modal">閉じる</button>
  813.                         <button type="button" class="btn btn-outline-dark" onclick="location.href='{{ url('product_list') }}?category_id=7'">クリア</button>
  814.                         <button type="button" class="btn btn-primary" onclick="setValSP();">絞り込む</button>
  815.                     </div>
  816.                     </form>
  817.                 </div>
  818.             </div>
  819.         </div>
  820.         {% elseif Category.id == 8 %}{# マーカーを選ぶ #}
  821.         {% elseif Category.id == 9 %}{# デザインを選ぶ #}
  822.         <div class="modal fade" id="filterModal" tabindex="-1" aria-labelledby="filterModalLabel" aria-hidden="true">
  823.             <div class="modal-dialog">
  824.                 <div class="modal-content">
  825.                     <div class="modal-header">
  826.                         <h5 class="modal-title" id="filterModalLabel">絞り込み</h5>
  827.                         <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
  828.                     </div>
  829.                     <form name="formSelSP" id="formSelSP" method="get" action="?">
  830.                     <div class="modal-body">
  831.                         <!-- 絞り込みフォームの内容をここに追加 -->
  832.                         <div class="aside-filter _modal">
  833.                             <div class="title">
  834.                             カテゴリから選ぶ
  835.                         </div>
  836.                         <ul class="list-unstyled mb-0 list">
  837.                             <li>
  838.                                 <label>
  839.                                     <input type="checkbox" name="design_cate" class="design_cate_sp" value="15"{% if( 15 in Selects['design-cate'] ) %} checked{% endif %}>
  840.                                     誕生日祝い
  841.                                 </label>
  842.                             </li>
  843.                             <li>
  844.                                 <label>
  845.                                     <input type="checkbox" name="design_cate" class="design_cate_sp" value="16"{% if( 16 in Selects['design-cate'] ) %} checked{% endif %}>
  846.                                     定年退職祝い
  847.                                 </label>
  848.                             </li>
  849.                             <li>
  850.                                 <label>
  851.                                     <input type="checkbox" name="design_cate" class="design_cate_sp" value="17"{% if( 17 in Selects['design-cate'] ) %} checked{% endif %}>
  852.                                     還暦祝い
  853.                                 </label>
  854.                             </li>
  855.                             <li>
  856.                                 <label>
  857.                                     <input type="checkbox" name="design_cate" class="design_cate_sp" value="18"{% if( 18 in Selects['design-cate'] ) %} checked{% endif %}>
  858.                                     コンペ景品
  859.                                 </label>
  860.                             </li>
  861.                             <li>
  862.                                 <label>
  863.                                     <input type="checkbox" name="design_cate" class="design_cate_sp" value="19"{% if( 19 in Selects['design-cate'] ) %} checked{% endif %}>
  864.                                     父の日祝い
  865.                                 </label>
  866.                             </li>
  867.                             <li>
  868.                                 <label>
  869.                                     <input type="checkbox" name="design_cate" class="design_cate_sp" value="20"{% if( 20 in Selects['design-cate'] ) %} checked{% endif %}>
  870.                                     母の日祝い
  871.                                 </label>
  872.                             </li>
  873.                             <li>
  874.                                 <label>
  875.                                     <input type="checkbox" name="design_cate" class="design_cate_sp" value="21"{% if( 21 in Selects['design-cate'] ) %} checked{% endif %}>
  876.                                     GOLFPRINT オリジナル
  877.                                 </label>
  878.                             </li>
  879.                         </ul>
  880.                         </div>
  881.                     </div>
  882.                     <div class="modal-footer">
  883.                         <button type="button" class="btn btn-outline-dark" data-bs-dismiss="modal">閉じる</button>
  884.                         <button type="button" class="btn btn-outline-dark" onclick="location.href='{{ url('product_list') }}?category_id=9'">クリア</button>
  885.                         <button type="button" class="btn btn-primary" onclick="setValSP();">絞り込む</button>
  886.                     </div>
  887.                     </form>
  888.                 </div>
  889.             </div>
  890.         </div>
  891.         <!-- modal 導入事例事例参考デザイン -->
  892.         <div class="modal fade" id="fullScreenModal" tabindex="-1" aria-labelledby="fullScreenModalLabel" aria-hidden="true">
  893.             <div class="modal-dialog modal-dialog-centered modal-dialog-scrollable" style="max-width: 100vw; margin: 0;">
  894.                 <div class="modal-content" style="height: 100vh;">
  895.                     <div class="modal-header">
  896.                         <h5 class="modal-title" id="fullScreenModalLabel">導入事例参考デザイン</h5>
  897.                         <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
  898.                     </div>
  899.                     <div class="modal-body">
  900.                         <div class="row">
  901. {% for CaseData in CaseDataList %}
  902.                             <div class="col-6 col-md-4 col-lg-3 col-xxl-2 mb-4">
  903.                                 <div class="bg-secondary p-3 rounded">
  904.                                     <form name="formCase{{ CaseData.id }}" id="productFormCase{{ CaseData.id }}" action="{{ url('product_add_cart_case', {id:CaseData.id}) }}" method="post">
  905.                                         <input type="hidden" id="quantityCase{{ CaseData.id }}" name="quantity" value="1">
  906.                                         <input type="hidden" id="product_idCase{{ CaseData.id }}" name="product_id" value="101">
  907.                                         <input type="hidden" id="ProductClassCase{{ CaseData.id }}" name="ProductClass" value="320">
  908.                                         <input type="hidden" id="_tokenCase{{ CaseData.id }}" name="_token" value="{{ csrf_token('_token') }}">
  909.                                     <a href="javascript:formCase{{ CaseData.id }}.submit()" class="numbering-container">
  910.                                         <div class="number">{{ CaseData.id }}</div>
  911.                                         <img src="/icms/user_data/image/Voice1/{{ CaseData.thumbnail_gazo }}" class="img-fluid text-dark mb-3" alt="{{ CaseData.title }}" width="500" height="500">
  912.                                         <p class="text-center text-dark mb-1">[NO.{{ CaseData.id }}]</p>
  913.                                         <p class="text-center text-dark mb-0">{{ CaseData.title|raw }}</p>
  914.                                     </a>
  915.                                     </form>
  916.                                 </div>
  917.                             </div>
  918. {% endfor %}
  919.                         </div>
  920.                     </div>
  921.                     <div class="modal-footer">
  922.                         <button type="button" class="btn btn-outline-dark" data-bs-dismiss="modal">閉じる</button>
  923.                     </div>
  924.                 </div>
  925.             </div>
  926.         </div>
  927.         {% elseif Category.id == 10 %}{# ラッピング #}
  928.         {% endif %}
  929.         {% endif %}
  930.     {% endif %}
  931. {% endblock %}