templates/uniqskills/catalogue/landing_new/landing_partials/payment.html.twig line 282

Open in your IDE?
  1. {% set shownProducts = 0 %}
  2. {% set country = null %}
  3. {% set productPacksToDisplay = [] %}
  4. {% set productVariantsToDisplay = [] %}
  5. {# display price in usd if there are no productVariants for current user country #}
  6. {% if productVariants is empty %}
  7.     {% set productVariantsToDisplay = productVariantsToDisplay|merge([{
  8.         'productVariant': null,
  9.         'landingProductVariant': null
  10.     }]) %}
  11. {% endif %}
  12. {% for landingProductVariant in module.subscriptions %}
  13.     {% for productVariant in productVariants %}
  14.         {% if productVariant.id == landingProductVariant.subscription %}
  15.             {% set productVariantsToDisplay = productVariantsToDisplay|merge([{
  16.                 'productVariant': productVariant,
  17.                 'landingProductVariant': landingProductVariant
  18.             }]) %}
  19.         {% endif %}
  20.     {% endfor %}
  21. {% endfor %}
  22. {% if module.packages is defined %}
  23.     {% for landingProductPack in module.packages %}
  24.         {% for productPack in productPacks %}
  25.             {% if productPack.id == landingProductPack.package %}
  26.                 {% set productPacksToDisplay = productPacksToDisplay|merge([{
  27.                     'productPack': productPack,
  28.                     'landingProductPack': landingProductPack
  29.                 }]) %}
  30.             {% endif %}
  31.         {% endfor %}
  32.     {% endfor %}
  33. {% endif %}
  34. <section class="rowSignUp"
  35.          style="background-image: url({{ asset('/uniqskills/new_landing/images/rowSignUp_bgBottom-2-min.png') | imagine_filter('img_1600_width') }});">
  36.     <a class="rowSignUp_link" name="{{ module.type }}-{{ module.id }}"></a>
  37.     <div class="container">
  38.         <div class="row">
  39.             <div class="col rowSignUp__header">
  40.                 <h2>{% if module.titleName is defined and module.titleName is not empty %}{{ module.titleName|raw }}{% else %}{{ 'uniqskills.landing.signInNow'|trans }}!{% endif %}</h2>
  41.             </div>
  42.         </div>
  43.         <div class="row justify-content-center">
  44.             {% for item in productPacksToDisplay %}
  45.                 {% set landingProductPack = item['landingProductPack'] %}
  46.                 {% set productPack = item['productPack'] %}
  47.                 {% set shownProducts = shownProducts + 1 %}
  48.                 <div class="col-12 col-md-6 col-lg-4">
  49.                     <div class="rowSignUp__modal">
  50.                         <div class="rowSignUp__modal__header{% if shownProducts % 2 == 1 %} rowSignUp__modal__header__bluered{% endif %}" style="position: relative">
  51.                             <div class="rowSignUp__modal__header__title">
  52.                                 {{ productPack.name }}
  53.                             </div>
  54.                             <div class="rowSignUp__modal__header__description">
  55.                                 {% if productPack.type is defined
  56.                                     and productPack.type is not empty %}
  57.                                     {% if productPack.type == 'bundle' %}
  58.                                         {{ 'uniqskills.packs.productPack'|trans }}
  59.                                     {% elseif productPack.type == 'cycle' %}
  60.                                         {{ 'uniqskills.packs.cycle'|trans }}
  61.                                     {% endif %}
  62.                                 {% endif %}
  63.                             </div>
  64.                             {% if landingProductPack.packageTitle is not empty
  65.                                 and landingProductPack.packageDescription is not empty %}
  66.                                 <button type="button" class="rowSignUp__modal__header__more">
  67.                                     {{ landingProductPack.packageTitle }}
  68.                                 </button>
  69.                                 <div class="rowSignUp__modal__header__info">
  70.                                     <p>{{ landingProductPack.packageDescription|raw }}</p>
  71.                                     <button type="button"
  72.                                             class="rowSignUp__modal__header__more rowSignUp__modal__header__more-active">
  73.                                         {{ 'btn.close'|trans }}
  74.                                     </button>
  75.                                 </div>
  76.                             {% endif %}
  77.                         </div>
  78.                         {% for coursePackItem in productPack.courseProductPackItem %}
  79.                             {% set packCourse = coursePackItem.productVariant.courses|first %}
  80.                             {% set country = coursePackItem.productVariant.country %}
  81.                             <div class="rowSignUp__modal__package__header">
  82.                                 <div class="rowSignUp__modal__package__row">
  83.                                     <span>
  84.                                         {% if productPack.type == 'bundle' %}
  85.                                             {{ 'product'|trans }}
  86.                                         {% elseif productPack.type == 'cycle' %}
  87.                                             {{ 'uniqskills.landing.packagePart'|trans }}
  88.                                         {% endif %}
  89.                                         {{ loop.index }}
  90.                                     </span>
  91.                                     <span>
  92.                                         {% if productPack.type == 'cycle' and coursePackItem.description is not empty %}
  93.                                             {{ coursePackItem.description }}
  94.                                         {% elseif coursePackItem.price is not empty %}
  95.                                             {% include 'uniqskills/catalogue/landing_price.html.twig' with {
  96.                                                 'landingPriceNet': coursePackItem.price,
  97.                                                 'landingPriceGross': coursePackItem.price,
  98.                                                 'country': country,
  99.                                                 'rate': 'brutto',
  100.                                                 'showRate': true
  101.                                             } %}
  102.                                         {% endif %}
  103.                                     </span>
  104.                                 </div>
  105.                                 <span class="rowSignUp__modal__package__course">{{ packCourse.name }}</span>
  106.                             </div>
  107.                             {% if coursePackItem.bulletPoints is not empty %}
  108.                                 <div class="rowSignUp__modal__list" style="padding-top: 15px;">
  109.                                     {% for point in coursePackItem.bulletPoints %}
  110.                                         <div class="row rowSignUp__modal__list__element">
  111.                                             <div {% if app.request.locale == 'en' %}style="padding-left: 20px"{% endif %} class="col-2 rowSignUp__modal__list__element__left">
  112.                                                 <div class="bgs2-rowBenefits_check"></div>
  113.                                             </div>
  114.                                             <div class="col-10 rowSignUp__modal__list__element__right">
  115.                                                 {{ point|raw }}
  116.                                             </div>
  117.                                         </div>
  118.                                     {% endfor %}
  119.                                 </div>
  120.                             {% endif %}
  121.                         {% endfor %}
  122.                         <div class="rowSignUp__modal__price">
  123.                             <div class="row">
  124.                                 <div class="col rowSignUp__modal__price__title">
  125.                                     {% if productPack.type == 'cycle' %}
  126.                                         {{ 'uniqskills.landing.packagePrice'|trans }}
  127.                                     {% else %}
  128.                                         {{ 'uniqskills.landing.price'|trans }}
  129.                                     {% endif %}
  130.                                 </div>
  131.                             </div>
  132.                             <div class="row">
  133.                                 <div class="col-6 rowSignUp__modal__price__noPadding">
  134.                                     <div class="rowSignUp__modal__price__currentPrice">
  135.                                         {% if productPack.type == 'cycle' %}
  136.                                             {% set firstProductPackItem = productPack.productPackItem|first %}
  137.                                             {% set packPriceNet = firstProductPackItem.productVariant.getFullPrice('net') %}
  138.                                             {% set packPriceGross = firstProductPackItem.productVariant.getFullPrice('gross') %}
  139.                                         {% else %}
  140.                                             {% set packPriceNet = productPack.totalPriceNet %}
  141.                                             {% set packPriceGross = productPack.totalPriceGross %}
  142.                                         {% endif %}
  143.                                         {% include 'uniqskills/catalogue/landing_price.html.twig' with {
  144.                                             'landingPriceNet': packPriceNet,
  145.                                             'landingPriceGross': packPriceGross,
  146.                                             'country': country,
  147.                                             'rate': 'brutto',
  148.                                             'showRate': true
  149.                                         } %}
  150.                                     </div>
  151.                                 </div>
  152.                                 <div class="col-6 rowSignUp__modal__price__btnGroup">
  153.                                     {% if app.request.locale == 'en' %}
  154.                                         <a href="{{ path('fmUniqskillsContactForm') }}"
  155.                                            class="button button-blueBackground rowSignUp__modal__price__btnGroup__btnSignUp">{{ 'uniqskills.landing.signInNow'|trans }}</a>
  156.                                     {% else %}
  157.                                         <button class="button button-blueBackground addToCart rowSignUp__modal__price__btnGroup__btnSignUp"
  158.                                                 type="button" style="border: 0;"
  159.                                                 data-carturl="{{ path('fmUniqskillsCartIndex') }}"
  160.                                                 data-addurl="{{ path('fmProductCartFrontendAdd') }}"
  161.                                                 data-notfound="{{ path('fmUniqskillsOrderError',
  162.                                                     {'_locale': app.session.get('userLocale', 'pl'), 'slugCourse': course.slug}) }}"
  163.                                                 {% if productPack.type == 'cycle' %}
  164.                                                     data-cycle="1"
  165.                                                 {% endif %}
  166.                                                 data-productpackid="{{ productPack.id }}"
  167.                                                 onclick="{{ gaDataLayerUS('add_to_cart', productPack.id, {'isProductPack': 1}) }}
  168.                                                         {{ ga4('add_to_cart', productPack.id, {'isProductPack': 1}) }}
  169.                                                         "
  170.                                                 >
  171.                                             {% if productPack.type == 'cycle' %}
  172.                                                 {{ 'uniqskills.landing.nl.joinNow'|trans }}
  173.                                             {% else %}
  174.                                                 {{ 'uniqskills.landing.signInNow'|trans }}
  175.                                             {% endif %}
  176.                                         </button>
  177.                                     {% endif %}
  178.                                 </div>
  179.                             </div>
  180.                         </div>
  181.                     </div>
  182.                 </div>
  183.             {% endfor %}
  184.             {% set lifetimeLanding = false %}
  185.             {% for item in productVariantsToDisplay %}
  186.                 {% if (item['landingProductVariant'] is not null or productPacksToDisplay is empty) and not lifetimeLanding %}
  187.                     {% set landingProductVariant = item['landingProductVariant'] %}
  188.                     {% set productVariant = item['productVariant'] %}
  189.                     {% set discountCode = null %}
  190.                     {% set shownProducts = shownProducts + 1 %}
  191.                     {% if module.lifeTimeAccess is defined and module.lifeTimeAccess %}
  192.                         {% set lifetimeLanding = true %}
  193.                     {% endif %}
  194.                     {% if
  195.                         landingProductVariant is not empty and landingProductVariant.discountCode is not empty %}
  196.                         {% for subscriptionCoupon in productVariant.coupon %}
  197.                             {% if subscriptionCoupon.id == landingProductVariant.discountCode %}
  198.                                 {% set discountCode = subscriptionCoupon %}
  199.                             {% endif %}
  200.                         {% endfor %}
  201.                     {% endif %}
  202.                     {% set installmentAmount = '' %}
  203.                     {% if productVariant is not empty and productVariant.installmentAmount > 1 and productVariant.paymentType.slug == 'partial-payment' %}
  204.                         {% set installmentAmount = productVariant.installmentAmount ~ 'x' %}
  205.                     {% endif %}
  206.                     <div class="col-12 col-md-6 col-lg-4">
  207.                         <div class="rowSignUp__modal">
  208.                             <div class="rowSignUp__modal__header{% if shownProducts % 2 == 1 %} rowSignUp__modal__header__bluered{% endif %}">
  209.                                 <div class="rowSignUp__modal__header__title">
  210.                                     {{ course.name }}
  211.                                 </div>
  212.                                 {% if productVariant is not empty and productVariant.isRecurringSubscription != 1 %}
  213.                                     <div class="rowSignUp__modal__header__description">
  214.                                     {% if installmentAmount == '' %} {{ 'uniqskills.landing.fullPayment'|trans }} {% else %} {{ 'uniqskills.landing.installmentPayment'|trans }} {% endif %}
  215.                                 </div>
  216.                                 {% endif %}
  217.                             </div>
  218.                             <div class="rowSignUp__modal__list">
  219.                                 {% if (buttonToCountryNotFound is not defined) or (not buttonToCountryNotFound) %}
  220.                                     {% if landingProductVariant.customDescription is defined and landingProductVariant.customDescription|trim is not empty %}
  221.                                         <div style="padding: 0 10px;">
  222.                                             {{ landingProductVariant.customDescription|raw }}
  223.                                         </div>
  224.                                     {% elseif landingProductVariant.bullets is defined and landingProductVariant.bullets|length > 0 %}
  225.                                         {% for point in landingProductVariant.bullets %}
  226.                                             <div class="row rowSignUp__modal__list__element">
  227.                                                 <div {% if app.request.locale == 'en' %}style="padding-left: 20px"{% endif %} class="col-2 rowSignUp__modal__list__element__left">
  228.                                                     <div class="bgs2-rowBenefits_check"></div>
  229.                                                 </div>
  230.                                                 <div class="col-10 rowSignUp__modal__list__element__right">
  231.                                                     {{ point.title|raw }}
  232.                                                 </div>
  233.                                             </div>
  234.                                         {% endfor %}
  235.                                     {% else %}
  236.                                         {% for point in module.bulletPoints %}
  237.                                             <div {% if app.request.locale == 'en' %}style="padding-left: 20px"{% endif %} class="row rowSignUp__modal__list__element">
  238.                                                 <div class="col-2 rowSignUp__modal__list__element__left">
  239.                                                     <div class="bgs2-rowBenefits_check"></div>
  240.                                                 </div>
  241.                                                 <div class="col-10 rowSignUp__modal__list__element__right">
  242.                                                     {{ point.title|raw }}
  243.                                                 </div>
  244.                                             </div>
  245.                                         {% endfor %}
  246.                                     {% endif %}
  247.                                 {% else %}
  248.                                     {% for point in module.bulletPoints %}
  249.                                         <div {% if app.request.locale == 'en' %}style="padding-left: 20px"{% endif %} class="row rowSignUp__modal__list__element">
  250.                                             <div class="col-2 rowSignUp__modal__list__element__left">
  251.                                                 <div class="bgs2-rowBenefits_check"></div>
  252.                                             </div>
  253.                                             <div class="col-10 rowSignUp__modal__list__element__right">
  254.                                                 {{ point.title|raw }}
  255.                                             </div>
  256.                                         </div>
  257.                                     {% endfor %}
  258.                                 {% endif %}
  259.                             </div>
  260.                             {% if landingProductVariant and not lifetimeLanding %}
  261.                                 <div class="rowSignUp__modal__rabat">
  262.                                     <div class="row">
  263.                                         <div class="col-1"></div>
  264.                                         <div class="col-10">
  265.                                             {{ landingProductVariant.description }}
  266.                                         </div>
  267.                                     </div>
  268.                                 </div>
  269.                             {% endif %}
  270.                             {% include 'uniqskills/catalogue/landing_new/landing_partials/_payment-price.html.twig' %}
  271.                             {% if module.showContactForm is defined and module.showContactForm %}
  272.                                 <div class="div-break"></div>
  273.                                 <div class="landingContactFormBox">
  274.                                     <div class="landingContactFormBox--title">
  275.                                         <span>{{ 'uniqskills.form.contact.messageInfo1'|trans }}</span>
  276.                                         <span>{{ 'uniqskills.form.contact.messageInfo2'|trans }}:</span>
  277.                                     </div>
  278.                                     <form id="landingContactForm" data-url="{{ path('fmUniqskillsAjaxLandingContactForm') }}">
  279.                                         <div class="form-group">
  280.                                             <label for="landing-contact-name">{{ 'uniqskills.form.contact.name'|trans }}:</label>
  281.                                             <input required name="landing-contact-name" type="text" class="form-control" id="landing-contact-name">
  282.                                         </div>
  283.                                         <div class="form-group">
  284.                                             <label for="landing-contact-email">{{ 'uniqskills.form.contact.email'|trans }}:</label>
  285.                                             <input required name="landing-contact-email" type="email" class="form-control" id="landing-contact-email">
  286.                                         </div>
  287.                                         <div class="form-group">
  288.                                             <label for="landing-contact-message">{{ 'uniqskills.form.contact.body'|trans }}:</label>
  289.                                             <textarea required name="landing-contact-message" class="form-control" id="landing-contact-message" rows="3"></textarea>
  290.                                         </div>
  291.                                         <div class="g-recaptcha" data-sitekey="{{ recaptchaPublicKey }}"></div>
  292.                                         <div id="spinner"></div>
  293.                                         <div class="recaptcha-message"></div>
  294.                                         <div class="form-group" style="text-align: center;">
  295.                                             <button type="submit" class="btn landingContactFormBox--submit">{{ 'uniqskills.form.contact.submit'|trans }}</button>
  296.                                         </div>
  297.                                     </form>
  298.                                 </div>
  299.                                 <script src="https://www.google.com/recaptcha/api.js" async defer></script>
  300.                             {% endif %}
  301.                         </div>
  302.                     </div>
  303.                 {% endif %}
  304.             {% endfor %}
  305.         </div>
  306.     </div>
  307. </section>