src/DcSiteBundle/Resources/views/Peugeot/Car/car-in-stock-card.html.twig line 1

Open in your IDE?
  1. {% extends '@DcSite/Peugeot/template.html.twig' %}
  2. {% block head %}
  3.     <title>{% if model.seoTitle(app.request.locale) is empty %}
  4.             {{ model.seoTitle(app.request.locale) }}
  5.         {% else %}
  6.             {{ 'car.car_in_stock.seo.title'|trans({
  7.                 '%car%' : model.fullName,
  8.                 '%year%' : model.year,
  9.                 '%transmission%' : model.transmissionTypeName(app.request.locale),
  10.                 '%fuel%' : model.fuelTypeName(app.request.locale),
  11.                 '%dealer%' : dealer.nameByLocale(app.request.locale),
  12.                 '%volume%' :  model.getEngineVolume(app.request.locale)
  13.             }, 'dc_base')|raw }}
  14.         {% endif %}
  15.     </title>
  16.     <meta name="description" content="{% if model.seoDescription(app.request.locale) is empty %}
  17.                                             {{ model.seoDescription(app.request.locale) }}
  18.                                       {% else %}
  19.                                             {{ 'car.car_in_stock.seo.description'|trans({
  20.         '%brand%' : model.model.brand,
  21.         '%car%' : model.fullName,
  22.         '%year%' : model.year,
  23.         '%transmission%' : model.transmissionTypeName(app.request.locale),
  24.         '%fuel%' : model.fuelTypeName(app.request.locale),
  25.         '%dealer%' : dealer.nameByLocale(app.request.locale),
  26.         '%volume%' :  model.getEngineVolume(app.request.locale)
  27.     }, 'dc_base')|raw }}
  28.                                       {% endif %}"/>
  29.     {% if model.seoKeywords(app.request.locale) %}
  30.         <meta name="keywords" content="{{ model.seoKeywords(app.request.locale) }}"/>
  31.     {% endif %}
  32.     <meta property="og:image" content="{{ absolute_url(media_url(model.preview, 'small_in_stock')) }}"/>
  33.     <link rel="stylesheet" type="text/css" href="/dist/{{ MODE }}/dcsite/peugeot/css/peugeotInStockCard.css?{{ VERSION }}">
  34. {% endblock head %}
  35. {% block ogtagDynamic %}
  36.     <meta property="og:title" content="{% if model.seoTitle(app.request.locale) is empty %}
  37.             {{ model.seoTitle(app.request.locale) }}
  38.         {% else %}
  39.             {{ 'car.car_in_stock.seo.title'|trans({
  40.         '%car%' : model.fullName,
  41.         '%year%' : model.year,
  42.         '%transmission%' : model.transmissionTypeName(app.request.locale),
  43.         '%fuel%' : model.fuelTypeName(app.request.locale),
  44.         '%dealer%' : dealer.nameByLocale(app.request.locale),
  45.         '%volume%' :  model.getEngineVolume(app.request.locale)
  46.     }, 'dc_base')|raw }}
  47.         {% endif %}"/>
  48.     <meta property="og:description" content="{% if model.seoDescription(app.request.locale) is empty %}
  49.                                             {{ model.seoDescription(app.request.locale) }}
  50.                                       {% else %}
  51.                                             {{ 'car.car_in_stock.seo.description'|trans({
  52.         '%brand%' : model.model.brand,
  53.         '%car%' : model.fullName,
  54.         '%year%' : model.year,
  55.         '%transmission%' : model.transmissionTypeName(app.request.locale),
  56.         '%fuel%' : model.fuelTypeName(app.request.locale),
  57.         '%dealer%' : dealer.nameByLocale(app.request.locale),
  58.         '%volume%' :  model.getEngineVolume(app.request.locale)
  59.     }, 'dc_base')|raw }}
  60.                                       {% endif %}"/>
  61. {% endblock ogtagDynamic %}
  62. {% block socialPreview %}
  63.     <img src="{{ absolute_url(media_url(model.preview, 'small_in_stock')) }}" class="d-none">
  64. {% endblock %}
  65. {% block content %}
  66.     {% include '@DcSite/Modules/buy-instock-car-popup.html.twig' with {actPath: 'form_buy_in_stock', model: model} %}
  67.     <div style="display: none" class="breadcrumbs__shadow">
  68.         <section class="breadcrumbs__new">
  69.             <div class="container">
  70.                 <ol class="global_breadcrumbs__new" itemscope itemtype="https://schema.org/BreadcrumbList">
  71.                     <li class="marker__none" itemprop="itemListElement" itemscope
  72.                         itemtype="https://schema.org/ListItem">
  73.                         <a itemprop="item" href="{{ path('peugeot_homepage') }}">
  74.                             <span class="breadcrumbs__link" itemprop="name">Peugeot</span></a>
  75.                         <meta itemprop="position" content="1"/>
  76.                     </li>
  77.                     <div class="arrow-bcs"> ❯</div>
  78.                     <li class="marker__none" itemprop="itemListElement" itemscope
  79.                         itemtype="https://schema.org/ListItem">
  80.                         <a itemprop="item" href="{{ path('peugeot_car_stock') }}">
  81.                             <span class="breadcrumbs__link" itemprop="name">{{ model.fullName }}</span></a>
  82.                         <meta itemprop="position" content="2"/>
  83.                     </li>
  84.                 </ol>
  85.             </div>
  86.         </section>
  87.     </div>
  88.     <section class="breadcrumbs__new">
  89.         <div class="container">
  90.             <ol class="global_breadcrumbs__new">
  91.                 <li class="marker__none">
  92.                     <a href="{{ path('peugeot_homepage') }}">
  93.                         <span class="breadcrumbs__link">Peugeot</span></a>
  94.                 </li>
  95.                 <div class="arrow-bcs"> ❯</div>
  96.                 <li class="marker__none">
  97.                     <a href="{{ path('peugeot_car_stock') }}">
  98.                         <span class="breadcrumbs__link">{{ 'menu.car_in_stocks'|trans({}, 'dc_peugeot') }}</span></a>
  99.                 </li>
  100.                 <div class="arrow-bcs"> ❯</div>
  101.                 <li class="marker__none">
  102.                     <span style="color: #837F7F;" class="breadcrumbs__link">{{ model.fullName }}</span>
  103.                 </li>
  104.             </ol>
  105.         </div>
  106.     </section>
  107.     <div class="bg-gray">
  108.         <section class="test__drive">
  109.             {% include '@DcSite/Modules/car-in-stock/index.html.twig' with {tdPath: 'peugeot_service_consultation', newCreditCalc: true} %}
  110.         </section>
  111.         <div class="container">
  112.             <div class="car__in__stock__btn__wrapper">
  113.                 <a style="background-color: #0A1018" class="car__in__stock-btn"
  114.                    href="{{ path('peugeot_service_consultation') }}">ТЕСТ-ДРАЙВ</a>
  115.                 <button style="background-color: #0A1018" class="car__in__stock-btn" type="button" data-toggle="modal"
  116.                         data-target="#buy-instock-car-modal">{{ 'car_page.get_offer'|trans({}, 'dc_base') }}</button>
  117.                 <a style="background-color: #0A1018" class="car__in__stock-btn"
  118.                    href="{{ path('peugeot_finance_credit') }}">{{ 'car_page.credit_settlement'|trans({},'dc_base') }}</a>
  119.             </div>
  120.         </div>
  121.     </div>
  122.     {% include '@DcSite/Modules/call-me-popup.html.twig' with  {
  123.         'route': path('form_call_me', {'formType': 4}),
  124.     } %}
  125.     {% include '@DcSite/Modules/sps-popup-credit.html.twig'  with  {'homePage' :  path('peugeot_homepage') } %}
  126. {% endblock %}
  127. {% block script %}
  128.     <script src="/dist/{{ MODE }}/dcsite/peugeot/js/peugeotInStockCard.js?{{ VERSION }}"></script>
  129.     <script>
  130.         $(() => {
  131.             window.initCredit({
  132.                 cretidTpl: '{{ path('dc_credit_load_tpl') }}',
  133.                 initUrl: '{{ path('dc_credit_init') }}',
  134.                 brandUrl: '{{ path('dc_credit_load_brands') }}',
  135.                 byDealerUrl: '{{ path('dc_credit_init_by_dealer') }}',
  136.                 programsUrl: '{{ path('dc_credit_programs') }}',
  137.                 saveUrl: '{{ path('dc_credit_save') }}',
  138.                 privacyUrl: '{{ privacyUrl }}',
  139.                 disableCarChange: true,
  140.                 dealer: {{ model.vehicle.dealer.id }},
  141.                 carId: {{ model.vehicle.id }},
  142.                 variationId: {{ model.vehicleItemId }}
  143.             });
  144.             window.initTradeIn({
  145.                 initUrl: '{{ path('dc_ti_init') }}',
  146.                 dealer: {{ model.vehicle.dealer.id }},
  147.                 carId: {{ model.vehicle.id }},
  148.                 variationId: {{ model.vehicleItemId }},
  149.                 agreementUrl: '{{ privacyUrl }}',
  150.             });
  151.             window.initCasco({
  152.                     initUrl: '{{ path('base_casco_init') }}',
  153.                     initByDealerUrl: '{{ path('base_casco_init_by_dealer') }}',
  154.                     optionsUrl: '{{ path('base_casco_options') }}',
  155.                     formUrl: '{{ path('base_casco_save_form') }}',
  156.                     privacyUrl: '{{ privacyUrl }}',
  157.                     dealer: {{ model.vehicle.dealer.id }},
  158.                     carId: {{ model.vehicle.id }},
  159.                     variationId: {{ model.vehicleItemId }},
  160.                     disableCarChange: true
  161.             });
  162.             const obj = new dcsite.peugeotInStockCard.CreditInStock();
  163.             obj.initCreditCalcInStock({
  164.                 getVehicleBrandUrl: '{{ path('dc_credit_find_brand') }}',
  165.                 getVehicleModelUrl: '{{ path('dc_credit_find_model') }}',
  166.                 getVehicleEquipmentUrl: '{{ path('dc_credit_find_equipment') }}',
  167.                 getVehicleVariationUrl: '{{ path('dc_credit_find_variation') }}',
  168.                 getVehicleUrl: '{{ path('dc_credit_get_vehicle') }}',
  169.                 initCreditCalcUrl: '{{ path('dc_finance_credit_init') }}',
  170.                 initTradeInUrl: '{{ path('dc_ti_init') }}',
  171.                 agreementUrl: '{{ path('automarket_personal_data_agreement') }}',
  172.                 loadListDocumentUrl: '{{ path('dc_credit_load_documents') }}',
  173.                 schedulePaymentUrl: '{{ path('dc_credit_load_schedule_credit_pdf') }}',
  174.                 getVehiclesByWalletUrl: '{{ path('dc_finance_credit_by_price') }}',
  175.                 getVehiclesWithMinPriceUrl: '{{ path('dc_finance_credit_by_price_min') }}',
  176.                 getCrmUUIDUrl: '{{ path('dc_finance_crm_lead_by_uuid') }}',
  177.                 getCrmDataUrl: '{{ path('dc_finance_crm_create_lead') }}',
  178.                 sendLeadUrl: '{{ path('dc_credit_save') }}',
  179.                 ks: '{{ 'catalog.k_s'|trans({}, 'portal_base') }}',
  180.                 enginePower: '{{ 'cars.engine'|trans({}, 'portal_base') }}',
  181.                 translate_month: '{{ 'finance.credit.credit_month_short'|trans({}, 'portal_base') }}',
  182.                 translate_under: '{{ 'finance.credit.credit_under'|trans({}, 'portal_base') }}',
  183.                 translate_first_payment: '{{ 'form.first_give'|trans({}, 'portal_base') }}',
  184.                 translate_uah: ' грн',
  185.                 translate_not_enough_money: '{{ 'finance.credit.not_enough_money'|trans({}, 'portal_base') }}',
  186.                 translate_not_estimate_vehicle: '{{ 'finance.credit.not_estimate_vehicle'|trans({}, 'portal_base') }}',
  187.                 translate_min_first_payment_for_car: '{{ 'finance.credit.min_first_payment_for_car'|trans({}, 'portal_base') }}',
  188.                 translate_estimate_vehicle_more_1: '{{ 'finance.credit.translate_estimate_vehicle_more_1'|trans({}, 'portal_base') }}',
  189.                 translate_estimate_vehicle_more_2: '{{ 'finance.credit.translate_estimate_vehicle_more_2'|trans({}, 'portal_base') }}',
  190.                 translate_unfortunately_not_enough: '{{ 'finance.credit.unfortunately_not_enough'|trans({}, 'portal_base') }}',
  191.                 translate_price_of_your_car: '{{ 'finance.credit.price_of_your_car'|trans({}, 'portal_base') }}',
  192.                 translate_min: '{{ 'finance.credit.min'|trans({}, 'portal_base') }}',
  193.                 translate_min_first_payment: '{{ 'finance.credit.min_first_payment'|trans({}, 'portal_base') }}',
  194.                 translate_min_month_payment: '{{ 'finance.credit.min_month_payment'|trans({}, 'portal_base') }}',
  195.                 translate_month_term_credit: '{{ 'finance.credit.month_term_credit'|trans({}, 'portal_base') }}',
  196.                 continue_first_least: '{{ 'finance.credit.continue_first_least'|trans({}, 'portal_base') }}',
  197.                 translate_term_months: '{{ 'finance.credit.term_months'|trans({}, 'portal_base') }}',
  198.                 translate_term_months_short: '{{ 'finance.credit.term_months_short'|trans({}, 'portal_base') }}',
  199.                 translate_price_from: '{{ 'finance.credit.price_from'|trans({}, 'portal_base') }}',
  200.                 privacyUrl: '{{ privacyUrl }}',
  201.                 name: '{{ app.user.name | default(null) }}',
  202.                 phone: '{{ app.user.phone | default(null) }}',
  203.                 unsetUsedTypeVehicle: true,
  204.                 unsetFlow2: true,
  205.                 newCarUrl: 'peugeot_cars_in_stock_card',
  206.                 usedCarUrl: '',
  207.                 brand_id: {{model.brand.id }},
  208.                 dealer_id: {{model.dealer.id}},
  209.                 model_id: {{ model.model.id }},
  210.                 inStockId: {{ model.id }},
  211.                 vehicleItemId: {{ model.vehicleItemId }},
  212.                 vehicleId: '{{ model.vehicle.id }}'
  213.             });
  214.         });
  215.     </script>
  216.     <script type="application/ld+json">
  217.         {{ structuredCarData|raw }}
  218.     </script>
  219. {% endblock script %}