app/template/user_data/loan.twig line 1

Open in your IDE?
  1. {% extends 'default_frame.twig' %}
  2. {% block stylesheet %}
  3.     <style>
  4.         .ec-loan_sec.v3 .list-product{
  5.             flex-wrap: wrap;
  6.             gap: 3rem;
  7.             justify-content: flex-start;
  8.         }
  9.         .ec-loan_sec.v3 .list-product .product .costs {
  10.             justify-content: flex-start;
  11.             gap: 5rem;
  12.         }
  13.         @media screen and (min-width: 768px) {
  14.             .ec-loan_sec.v3 .list-product .product{
  15.                 width: calc((100% - 6rem) / 3);
  16.                 max-width: 100%;
  17.             }
  18.         }
  19.     </style>
  20. {% endblock %}
  21. {% block javascript %}
  22.     <script>
  23.         eccube.productsClassCategories = {
  24.             {% for Product in pagination %}
  25.             "{{ Product.id|escape('js') }}": {{ class_categories_as_json(Product)|raw }}{% if loop.last == false %}, {% endif %}
  26.             {% endfor %}
  27.         };
  28.         $(function() {
  29.             // 検索条件を追加
  30.             $('.btn-condition').click(function() {
  31.                 $('#active_idx').val($(this).index());
  32.             });
  33.             $('.form-check-input').change(function() {
  34.                 $("#form1").submit();
  35.             });
  36.             // 表示件数を変更
  37.             $('.disp-number').change(function() {
  38.                 var dispNumber = $(this).val();
  39.                 $('#disp_number').val(dispNumber);
  40.                 $('#pageno').val(1);
  41.                 $("#form1").submit();
  42.             });
  43.             // 並び順を変更
  44.             $('.order-by').change(function() {
  45.                 var orderBy = $(this).val();
  46.                 $('#orderby').val(orderBy);
  47.                 $('#pageno').val(1);
  48.                 $("#form1").submit();
  49.             });
  50.             $('.add-cart').on('click', function(e) {
  51.                 var $form = $(this).parents('li').find('form');
  52.                 // TODO: test 修正要
  53.                 // 規格1フォームの必須チェック
  54.                 var $form_select = $form.parent().find('.form-select');
  55.                 if ($form_select.val() == '__unselected' || $form_select.val() == '') {
  56.                     $form_select[0].setCustomValidity('{{ '項目が選択されていません'|trans }}');
  57.                     setTimeout(function() {
  58.                         loadingOverlay('hide');
  59.                     }, 100);
  60.                     return true;
  61.                 } else {
  62.                     $form_select[0].setCustomValidity('');
  63.                 }
  64.                 // 個数フォームのチェック
  65.                 var $quantity = $form.parent().find('.quantity');
  66.                 if ($quantity.val() < 1) {
  67.                     $quantity[0].setCustomValidity('{{ '1以上で入力してください。'|trans }}');
  68.                     setTimeout(function() {
  69.                         loadingOverlay('hide');
  70.                     }, 100);
  71.                     return true;
  72.                 } else {
  73.                     $quantity[0].setCustomValidity('');
  74.                 }
  75.                 e.preventDefault();
  76.                 $.ajax({
  77.                     url: $form.attr('action'),
  78.                     type: $form.attr('method'),
  79.                     data: $form.serialize(),
  80.                     dataType: 'json',
  81.                     beforeSend: function(xhr, settings) {
  82.                         // Buttonを無効にする
  83.                         $('.add-cart').prop('disabled', true);
  84.                     }
  85.                 }).done(function(data) {
  86.                     // レスポンス内のメッセージをalertで表示
  87.                     $.each(data.messages, function() {
  88.                         $('#ec-modal-header').text(this);
  89.                     });
  90.                     $('.ec-modal').show()
  91.                     // カートブロックを更新する
  92.                     $.ajax({
  93.                         url: '{{ url('block_cart') }}',
  94.                         type: 'GET',
  95.                         dataType: 'html'
  96.                     }).done(function(html) {
  97.                         $('.ec-headerRole__cart').html(html);
  98.                     });
  99.                 }).fail(function(data) {
  100.                     alert('{{ 'カートへの追加に失敗しました。'|trans }}');
  101.                 }).always(function(data) {
  102.                     // Buttonを有効にする
  103.                     $('.add-cart').prop('disabled', false);
  104.                 });
  105.             });
  106.             $('.favorite').click(function(event) {
  107.                 if ($(this).attr('disabled') != 'disabled') {
  108.                     $(this).closest('li.product').find('.list-add-favorite').submit();
  109.                 }
  110.             });
  111.         });
  112.         $('.ec-modal-wrap').on('click', function(e) {
  113.             // モーダル内の処理は外側にバブリングさせない
  114.             e.stopPropagation();
  115.         });
  116.         $('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
  117.             $('.ec-modal').hide()
  118.         });
  119.     </script>
  120.     <script>
  121.         $(document).ready(function(){
  122.             //チェックボックス処理
  123.             $(".left .list-btn .btn-condition").eq($('#active_idx').val()).addClass('active');
  124.             $(".right .item").eq($('#active_idx').val()).addClass('active');
  125.             $(".right .item").each(function(index, el) {
  126.                 var chk_cnt = $(this).find("input[type='checkbox']:checked").length;
  127.                 $('.btn-condition').eq(index).find('.chk-cnt').text(chk_cnt);
  128.                 if (chk_cnt > 0) {
  129.                     $('.btn-condition').eq(index).find('.chk-cnt').show();
  130.                 }
  131.                 else {
  132.                     $('.btn-condition').eq(index).find('.chk-cnt').hide();
  133.                 }
  134.             });
  135.             $(".left .list-btn .btn-condition").click(function(e){
  136.                 if (!$(this).hasClass("active")) {
  137.                     var tabNum = $(this).index();
  138.                     var nthChild = tabNum+1;
  139.                     $(".left .list-btn .btn-condition.active").removeClass("active");
  140.                     $(this).addClass("active");
  141.                     $(".right .item.active").removeClass("active");
  142.                     $(".right .item:nth-child("+nthChild+")").addClass("active");
  143.                 }
  144.             });
  145.             $(".reset").click(function(e){
  146.                 $(".item input[type='checkbox']:checked").prop('checked', false);
  147.                 $("#form1").submit();
  148.             });
  149.         });
  150.     </script>
  151. {% endblock %}
  152. {% block main %}
  153. <div class="ec-loan-page">
  154.     <div class="ec-banner">
  155.         <div class="ec-banner__inner">
  156.             <div class="inner">
  157.                 <h2>
  158.                     エアココ自社ローンについて
  159.                 </h2>
  160.             </div>
  161.         </div>
  162.         <div class="ec-breadcrumb">
  163.             <ul class="ec-breadcrumb__menu">
  164.                 <li class="ec-breadcrumb__item"><a href="{{ url('homepage') }}">TOP</a></li>
  165.                 <li class="ec-breadcrumb__item"><span>></span></li>
  166.                 <li class="ec-breadcrumb__item"><p>エアココ自社ローンについて</p></li>
  167.             </ul>
  168.         </div>
  169.     </div>
  170.     <div class="ec-loan-main">
  171.         <div class="ec-loan__inner">
  172.             <div class="inner">
  173.                 <div class="ec-loan_sec">
  174.                     <div class="group-top">
  175.                         <div class="title">
  176.                             <p>こんなことでお困りではありませんか?</p>
  177.                         </div>
  178.                         <div class="image">
  179.                             <img src="{{ asset('assets/img/loan/img.png') }}" alt="">
  180.                         </div>
  181.                     </div>
  182.                 </div>
  183.                 <div class="ec-loan_sec v2">
  184.                     <div class="title">
  185.                         <p>でも安心してください!<br />
  186.                             エアココ自社ローンなら大丈夫!</p>
  187.                     </div>
  188.                     <div class="text">
  189.                         <p>エアコンを購入したいのにローン審査が通らなかったというお話を聞きます。エアココでは一般のファイナンスで審査が通らなかったお客様も安心してエアコンを設置できるようにエアココローン(自社ローン)のサービスを始めました。ローンの審査に不安がある方は、まず審査をしてみてください。</p>
  190.                     </div>
  191.                     <div class="group">
  192.                         <div class="title sm">
  193.                             <p>自社ローンの特徴</p>
  194.                         </div>
  195.                         <div class="list">
  196.                             <div class="item">
  197.                                 <div class="num">
  198.                                     <p>1</p>
  199.                                 </div>
  200.                                 <div class="text">
  201.                                     <p>金融機関や<br />
  202.                                         ファイナンス会社の</p>
  203.                                 </div>
  204.                                 <div class="title">
  205.                                     <p>審査は不要</p>
  206.                                 </div>
  207.                                 <div class="text">
  208.                                     <p>(エアココの審査のみ)</p>
  209.                                 </div>
  210.                             </div>
  211.                             <div class="item">
  212.                                 <div class="num">
  213.                                     <p>2</p>
  214.                                 </div>
  215.                                 <div class="text">
  216.                                     <p>過去の</p>
  217.                                 </div>
  218.                                 <div class="title">
  219.                                     <p>個人情報の<br />
  220.                                         提出不要</p>
  221.                                 </div>
  222.                             </div>
  223.                             <div class="item">
  224.                                 <div class="num">
  225.                                     <p>3</p>
  226.                                 </div>
  227.                                 <div class="title">
  228.                                     <p>24回払い</p>
  229.                                 </div>
  230.                             </div>
  231.                             <div class="item">
  232.                                 <div class="num">
  233.                                     <p>4</p>
  234.                                 </div>
  235.                                 <div class="title">
  236.                                     <p>金利<span>0</span>%</p>
  237.                                 </div>
  238.                             </div>
  239.                         </div>
  240.                     </div>
  241.                     <div class="list-btn">
  242.                         <a href="{{ url('loan_examination') }}" class="btn btn-sd">
  243.                             エアココ自社ローンのお申し込みはこちら
  244.                         </a>
  245.                     </div>
  246.                 </div>
  247.                 <div class="ec-loan_sec v3 ec-product__group">
  248.                     <div class="title">
  249.                         <p>エアココ自社ローン対象商品</p>
  250.                     </div>
  251.                     <ul class="list-product">
  252.                         {% if pagination.totalItemCount > 0 %}
  253.                             {% for Product in pagination %}
  254.                                 <li class="product">
  255.                                     <a href="{{ url('product_detail', {'id': Product.id}) }}" class="image">
  256.                                         <img src="{{ asset(Product.main_list_image|no_image_product, 'save_image') }}" alt="{{ Product.name }}" {% if loop.index > 5 %} loading="lazy"{% endif %}>
  257.                                     </a>
  258.                                     <a href="{{ url('product_detail', {'id': Product.id}) }}" class="name">
  259.                                         <p>{{ Product.name }}</p>
  260.                                     </a>
  261.                                     <div class="info">
  262.                                         <div class="costs">
  263.                                             <div class="cost">
  264.                                                 {% if Product.hasProductClass %}
  265.                                                     {% if Product.getPrice02Min == Product.getPrice02Max %}
  266.                                                         <p>{{ Product.getPrice02IncTaxMin|price }}</p>
  267.                                                         <span>(税込)</span>
  268.                                                     {% else %}
  269.                                                         <p>{{ Product.getPrice02IncTaxMin|price }} ~ {{ Product.getPrice02IncTaxMax|price }}</p>
  270.                                                         <span>(税込)</span>
  271.                                                     {% endif %}
  272.                                                 {% else %}
  273.                                                     <p>{{ Product.getPrice02IncTaxMin|price }}</p>
  274.                                                     <span>(税込)</span>
  275.                                                 {% endif %}
  276.                                             </div>
  277.                                             {% if BaseInfo.option_favorite_product %}
  278.                                                 {% set is_favorite = false %}
  279.                                                 {% if is_granted('ROLE_USER') %}
  280.                                                     {% set is_favorite = repository('\\Eccube\\Entity\\CustomerFavoriteProduct').isFavorite(Customer, Product) %}
  281.                                                 {% endif %}
  282.                                                 {% if is_favorite == false %}
  283.                                                     <div class="group" style="margin-top: 0;">
  284.                                                         <div class="list-btn" style="margin-top: 0;">
  285.                                                             <a href="javascript:void(0);" class="favorite">
  286.                                                                 <span></span> 
  287.                                                             </a>
  288.                                                         </div>
  289.                                                     </div>
  290.                                                 {% else %}                                                            
  291.                                                     <div class="group" style="margin-top: 0;">
  292.                                                         <div class="list-btn" style="margin-top: 0;">
  293.                                                             <a href="javascript:void(0);" class="favorite active" disabled="disabled">
  294.                                                                 <span></span> 
  295.                                                             </a>
  296.                                                         </div>
  297.                                                     </div>
  298.                                                 {% endif %}
  299.                                             {% endif %}
  300.                                             {% if BaseInfo.option_favorite_product %}
  301.                                                 <div style="display: none;">
  302.                                                     <form class="list-add-favorite" action="{{ url('product_add_favorite', {id:Product.id}) }}" method="post">
  303.                                                         <div class="ec-productRole__btn">
  304.                                                             <button type="submit" id="favorite" class="ec-blockBtn--cancel">
  305.                                                                 {{ 'お気に入りに追加'|trans }}
  306.                                                             </button>
  307.                                                         </div>
  308.                                                     </form>
  309.                                                 </div>
  310.                                             {% endif %}
  311.                                         </div>
  312.                                         <div class="cate">
  313.                                             {% if Product.ProductCategories is not empty %}
  314.                                                 {% for ProductCategory in Product.ProductCategories %}
  315.                                                     {% if ProductCategory.Category.Parent is not empty %}
  316.                                                         {% set parentCat = ProductCategory.Category.Parent %}
  317.                                                         {% if parentCat.id == 20 %}
  318.                                                             <span>{{ ProductCategory.Category.name }}</span>
  319.                                                         {% endif %}
  320.                                                     {% endif %}
  321.                                                 {% endfor %}
  322.                                             {% endif %}
  323.                                             {% if Product.ProductCategories is not empty %}
  324.                                                 {% for ProductCategory in Product.ProductCategories %}
  325.                                                     {% if ProductCategory.Category.Parent is not empty %}
  326.                                                         {% set parentCat = ProductCategory.Category.Parent %}
  327.                                                         {% if parentCat.id == 19 %}
  328.                                                             <span>{{ ProductCategory.Category.name }}</span>
  329.                                                         {% endif %}
  330.                                                     {% endif %}
  331.                                                 {% endfor %}
  332.                                             {% endif %}
  333.                                         </div>
  334.                                         {% if Product.code_min is not empty %}
  335.                                             <div class="des">
  336.                                                 <p>品番 {{ Product.code_min }}{% if Product.code_min != Product.code_max %} ~ {{ Product.code_max }}{% endif %}</p>
  337.                                             </div>
  338.                                         {% endif %}                                        
  339.                                     </div>
  340.                                 </li>
  341.                             {% endfor %}
  342.                         {% endif %}
  343.                     </ul>
  344.                 </div>
  345.                 
  346.             </div>
  347.             <div class="ec-loan_sec v4">
  348.                 <div class="inner">
  349.                     <div class="title">
  350.                         <p>手続きの流れ</p>
  351.                     </div>
  352.                     <div class="text">
  353.                         <p>審査フォームに必要事項を記載していただいて送信していただければ、最短で翌日にメールでご回答させていただきます。その後、エアココローン対象商品からエアコンを選んでいただき、設置工事が必要な方は設置工事費も含めてご契約をさせていただきます。</p>
  354.                     </div>
  355.                     <div class="list-item">
  356.                         <div class="item">
  357.                             <div class="num">
  358.                                 <p>STEP</p>
  359.                                 <span>1</span>
  360.                             </div>
  361.                             <div class="image">
  362.                                 <img src="{{ asset('assets/img/loan') }}/step-1.png" alt="">
  363.                             </div>
  364.                             <div class="text-item">
  365.                                 <p>審査フォーム送信</p>
  366.                             </div>
  367.                         </div>
  368.                         <div class="arr">
  369.                             <img src="{{ asset('assets/img/tel_service') }}/double_arrow.png" alt="">
  370.                         </div>
  371.                         <div class="item">
  372.                             <div class="num">
  373.                                 <p>STEP</p>
  374.                                 <span>2</span>
  375.                             </div>
  376.                             <div class="image">
  377.                                 <img src="{{ asset('assets/img/loan') }}/step-2.png" alt="">
  378.                             </div>
  379.                             <div class="text-item">
  380.                                 <p>審査結果のご連絡</p>
  381.                             </div>
  382.                         </div>
  383.                         <div class="arr">
  384.                             <img src="{{ asset('assets/img/tel_service') }}/double_arrow.png" alt="">
  385.                         </div>
  386.                         <div class="item">
  387.                             <div class="num">
  388.                                 <p>STEP</p>
  389.                                 <span>3</span>
  390.                             </div>
  391.                             <div class="image">
  392.                                 <img src="{{ asset('assets/img/loan') }}/step-3.png" alt="">
  393.                             </div>
  394.                             <div class="text-item">
  395.                                 <p>商品・工事費の算出</p>
  396.                             </div>
  397.                         </div>
  398.                         <div class="arr">
  399.                             <img src="{{ asset('assets/img/tel_service') }}/double_arrow.png" alt="">
  400.                         </div>
  401.                         <div class="item">
  402.                             <div class="num">
  403.                                 <p>STEP</p>
  404.                                 <span>4</span>
  405.                             </div>
  406.                             <div class="image">
  407.                                 <img src="{{ asset('assets/img/loan') }}/step-4.png" alt="">
  408.                             </div>
  409.                             <div class="text-item">
  410.                                 <p>ご契約・ご購入</p>
  411.                             </div>
  412.                         </div>
  413.                     </div>
  414.                     <div class="list-btn">
  415.                         <a href="{{ url('loan_examination') }}" class="btn btn-sd">
  416.                             エアココ自社ローンのお申し込みはこちら
  417.                         </a>
  418.                     </div>
  419.                 </div>
  420.             </div>
  421.         </div>
  422.     </div>
  423. </div>
  424. {% endblock %}