custom/plugins/GrimmTheme/src/Resources/views/solution360/grimm/leasing/leasing-modal.html.twig line 1

Open in your IDE?
  1. {# Grimm leasing currently replaced by albis, keep in case of reverting to old logic without albis plugin #}
  2. {# trigger modal #}
  3. {# {% if price > 12500 %}
  4.     {% set range = "fifthRange" %}
  5. {% elseif price > 5000 %}
  6.     {% set range = "fourthRange" %}
  7. {% elseif price > 2500 %}
  8.     {% set range = "thirdRange" %}
  9. {% elseif price > 500 %}
  10.     {% set range = "secondRange" %}
  11. {% else %}
  12.     {% set range = "firstRange" %}
  13. {% endif %}
  14. {% set snippetString = "detail.leasing.durationAmount.fifthDuration.rates." ~ range %}
  15. {% set factor = snippetString|trans|sw_sanitize %} #}
  16. {# cart #}
  17. {# {% if activeRoute == "frontend.checkout.cart.page" %} #}
  18.      {# <div class="leasing-info leasing-info--cart">
  19.         <div>
  20.             {{ 'detail.priceDataInfoFrom'|trans|sw_sanitize|lower }}
  21.             <span class="leasing-info__price">{{ ((price * factor) / 100)|currency }}</span>
  22.             {{ "detail.leasing.titleCheckout"|trans|sw_sanitize }}
  23.         </div>
  24.         <button type="button" class="btn btn-secondary btn-block" data-toggle="modal" data-target="#leasingModal">
  25.             {{ "detail.leasing.title"|trans|sw_sanitize }}  
  26.         </button>
  27.     </div>  #}
  28.     {# detail page #}
  29. {% if activeRoute == "frontend.detail.page" %}
  30.     <div class="leasing-info row justify-content-between align-content-center">
  31.         {# <button type="button" class="monthly-installment-btn grm-link" data-toggle="modal" data-target="#leasingModal">
  32.             {{ "detail.leasing.header"|trans|sw_sanitize }}  
  33.         </button>
  34.         {{ 'detail.priceDataInfoFrom'|trans|sw_sanitize|lower }}
  35.         <span class="leasing-info__price">
  36.             {{ ((price * factor) / 100)|currency }}
  37.         </span> #}
  38.         {% if config('AlbisLease.config') %}
  39.             <a class="monthly-installment-btn d-inline-block ml-1 mb-4 col-12"
  40.                 {# href="{{ path('frontend.albis.modal',{ productnumber: page.product.productNumber }) }}"
  41.                 data-toggle="modal"
  42.                 data-modal-class="quickview-modal"
  43.                 data-url="{{ path('frontend.albis.modal',{ productnumber: page.product.productNumber }) }}" #}
  44.                 >
  45.                 {% sw_icon 'info' %}  <span class="leasing-title">{{ "detail.leasing.header"|trans|sw_sanitize }}</span>
  46.             </a>
  47.         {% endif %}
  48.         <div class="col-7 align-self-center">
  49.             <p class="mb-0"> {{ "detail.leasing.description"|trans|sw_sanitize }}</p>
  50.         </div>
  51.         <div class="col-5 align-self-center">
  52.             <button class="leasing-btn"
  53.                 href="{{ path('frontend.albis.modal',{ productnumber: page.product.productNumber }) }}"
  54.                 data-toggle="modal"
  55.                 data-modal-class="quickview-modal"
  56.                 data-url="{{ path('frontend.albis.modal',{ productnumber: page.product.productNumber }) }}"
  57.                 > 
  58.                 {{ "detail.leasing.goodsOnLease"|trans|sw_sanitize }}
  59.                 </button>
  60.         </div>
  61.     </div>  
  62. {% endif %}
  63.     
  64. {# modal #}
  65. {# <div class="modal leasing-modal" id="leasingModal" tabindex="-1" role="dialog" aria-labelledby="leasing-modal" aria-hidden="true">
  66.   <div class="modal-dialog" role="document">
  67.     <div class="modal-content">
  68.       <div class="modal-header product-detail-share-modal__header">
  69.         {{ "detail.leasing.header"|trans|sw_sanitize }}
  70.         <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  71.           {% sw_icon 'schliessen' style {'pack': 'grimmtheme', 'namespace': 'GrimmTheme', 'size': 'xs'} %}
  72.         </button>
  73.       </div>
  74.       <div class="modal-body cms-block">
  75.         <div class="cms-element-form">
  76.           {% sw_include '@Storefront/solution360/grimm/leasing/leasing-form.html.twig' with {
  77.               action: 'frontend.form.contact.send'
  78.               } 
  79.           %}
  80.           <div class="confirm-alert"></div>
  81.         </div>
  82.       </div>
  83.     </div>
  84.   </div>
  85. </div> #}