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

Open in your IDE?
  1. {% extends '@DcSite/Morris_Garage/template.html.twig' %}
  2. {% block head %}
  3.     <title>
  4.         {% if model.seoTitle(app.request.locale) is empty %}
  5.             {{ model.seoTitle(app.request.locale) }}
  6.         {% else %}
  7.             {{ 'car.car_in_stock.seo.title'|trans({
  8.                 '%car%' : model.fullName,
  9.                 '%year%' : model.year,
  10.                 '%color%' : model.color,
  11.                 '%price%' : model.price|price,
  12.                 '%transmission%' : model.transmissionTypeName(app.request.locale),
  13.                 '%fuel%' : model.fuelTypeName(app.request.locale),
  14.                 '%dealer%' : dealer.nameByLocale(app.request.locale),
  15.                 '%volume%' :  model.getEngineVolume(app.request.locale) != '-' ? model.getEngineVolume(app.request.locale) ~ ' cм3' : ''
  16.             }, 'dc_base')|raw }}
  17.         {% endif %}
  18.     </title>
  19.     <meta name="description" content="{% if model.seoDescription(app.request.locale) is empty %} {{ model.seoDescription(app.request.locale) }} {% else %} {{ 'car.car_in_stock.seo.description'|trans({ '%brand%' : model.model.brand, '%car%' : model.fullName, '%year%' : model.year, '%color%' : model.color, '%price%' : model.price|price, '%transmission%' : model.transmissionTypeName(app.request.locale), '%fuel%' : model.fuelTypeName(app.request.locale), '%dealer%' : dealer.nameByLocale(app.request.locale), '%volume%' : model.getEngineVolume(app.request.locale) != '-' ? model.getEngineVolume(app.request.locale) ~ ' cм3' : '' }, 'dc_base')|raw }} {% endif %}"/>
  20.     {% if model.seoKeywords(app.request.locale) %}
  21.         <meta name="keywords" content="{{ model.seoKeywords(app.request.locale) }}"/>
  22.     {% endif %}
  23.     <link rel="stylesheet" type="text/css" href="/dist/{{ MODE }}/dcsite/mg/css/mgInStockCard.css?{{ VERSION }}">
  24. {% endblock %}
  25. {% block ogtagDynamicImage %}
  26.     <meta property="og:image" content="{{ absolute_url(media_url(model.preview, 'small_in_stock')) }}"/>
  27. {% endblock %}
  28. {% block ogtagDynamic %}
  29.     <meta property="og:title" content="{% if model.seoTitle(app.request.locale) is empty %} {{ model.seoTitle(app.request.locale) }} {% else %} {{ 'car.car_in_stock.seo.title'|trans({ '%car%' : model.fullName, '%year%' : model.year, '%transmission%' : model.transmissionTypeName(app.request.locale), '%fuel%' : model.fuelTypeName(app.request.locale), '%dealer%' : dealer.nameByLocale(app.request.locale), '%volume%' : model.getEngineVolume(app.request.locale) }, 'dc_base')|raw }} {% endif %}"/>
  30.     <meta property="og:description" content="{% if model.seoDescription(app.request.locale) is empty %} {{ model.seoDescription(app.request.locale) }} {% else %} {{ 'car.car_in_stock.seo.description'|trans({ '%brand%' : model.model.brand, '%car%' : model.fullName, '%year%' : model.year, '%transmission%' : model.transmissionTypeName(app.request.locale), '%fuel%' : model.fuelTypeName(app.request.locale), '%dealer%' : dealer.nameByLocale(app.request.locale), '%volume%' : model.getEngineVolume(app.request.locale) }, 'dc_base')|raw }} {% endif %}"/>
  31. {% endblock %}
  32. {% block socialPreview %}
  33.     <img src="{{ absolute_url(media_url(model.preview, 'small_in_stock')) }}" class="d-none">
  34. {% endblock %}
  35. {% block content %}
  36.     {% include '@DcSite/Morris_Garage/breadcrumbs.html.twig' with {
  37.         catName: 'pages.car_in_stock.breadcrumb_title'|trans({}, 'dc_morris'),
  38.         catUrl: 'mg_car_stock',
  39.         pageName: model.fullName
  40.     } %}
  41.     {% include '@DcSite/Modules/car-in-stock/index.html.twig' with {tdPath: 'mg_service_consultation', newCreditCalc: true} %}
  42.     <div class="container">
  43.         <div class="car__in__stock__btn__wrapper">
  44.             <a style="background-color: #000000; border-radius: 50px; padding: 13px 20px;" class="car__in__stock-btn" href="{{ path('mg_service_consultation') }}">ТЕСТ-ДРАЙВ</a>
  45.             <button style="background-color: #000000; border-radius: 50px; padding: 13px 20px;" class="car__in__stock-btn" type="button" data-toggle="modal" data-target="#buy-instock-car-modal">{{ 'car_page.get_offer'|trans({}, 'dc_base') }}</button>
  46.             <a style="background-color: #000000; border-radius: 50px; padding: 13px 20px;" class="car__in__stock-btn" href="{{ path('mg_finance_credit') }}">{{ 'car_page.credit_settlement'|trans({},'dc_base') }}</a>
  47.         </div>
  48.     </div>
  49.     {% include '@DcSite/Modules/buy-instock-car-popup.html.twig' with {actPath: 'form_buy_in_stock', model: model}  %}
  50.     {% include '@DcSite/Modules/call-me-popup.html.twig' with  {
  51.         'route': path('form_call_me', {'formType': 4}),
  52.     } %}
  53.     {% include '@DcSite/Modules/sps-popup-credit.html.twig'  with  {'homePage' :  path('mg_homepage') } %}
  54. {% endblock %}
  55. {% block script %}
  56.     <script src="/dist/{{ MODE }}/dcsite/mg/js/mgInStockCard.js?{{ VERSION }}"></script>
  57.     <script type="application/ld+json">
  58.         {{ structuredCarData|raw }}
  59.     </script>
  60.     <script>
  61.         $(() => {
  62.             window.initCredit({
  63.                 cretidTpl: '{{ path('dc_credit_load_tpl')  }}',
  64.                 initUrl: '{{ path('dc_credit_init') }}',
  65.                 brandUrl: '{{ path('dc_credit_load_brands') }}',
  66.                 byDealerUrl: '{{ path('dc_credit_init_by_dealer') }}',
  67.                 programsUrl: '{{ path('dc_credit_programs') }}',
  68.                 saveUrl: '{{ path('dc_credit_save') }}',
  69.                 privacyUrl: '{{ privacyUrl }}',
  70.                 disableCarChange: true,
  71.                 dealer: {{ model.vehicle.dealer.id }},
  72.                 carId: {{ model.vehicle.id }},
  73.                 variationId: {{ model.vehicleItemId }}
  74.             });
  75.             window.initTradeIn({
  76.                 initUrl: '{{ path('dc_ti_init') }}',
  77.                 dealer: {{ model.vehicle.dealer.id }},
  78.                 carId: {{ model.vehicle.id }},
  79.                 variationId: {{ model.vehicleItemId }},
  80.                 agreementUrl: '{{ privacyUrl }}',
  81.             });
  82.             window.initCasco({
  83.                 initUrl : '{{ path('base_casco_init') }}',
  84.                 initByDealerUrl : '{{ path('base_casco_init_by_dealer') }}',
  85.                 optionsUrl : '{{ path('base_casco_options') }}',
  86.                 formUrl : '{{ path('base_casco_save_form') }}',
  87.                 privacyUrl: '{{ privacyUrl }}',
  88.                 dealer: {{ model.vehicle.dealer.id }},
  89.                 carId: {{ model.vehicle.id }},
  90.                 variationId: {{ model.vehicleItemId }},
  91.                 disableCarChange: true
  92.             });
  93.             const obj = new dcsite.mgInStockCard.CreditInStock();
  94.             obj.initCreditCalcInStock({
  95.                 getVehicleBrandUrl: '{{ path('dc_credit_find_brand') }}',
  96.                 getVehicleModelUrl: '{{ path('dc_credit_find_model') }}',
  97.                 getVehicleEquipmentUrl: '{{ path('dc_credit_find_equipment') }}',
  98.                 getVehicleVariationUrl: '{{ path('dc_credit_find_variation') }}',
  99.                 getVehicleUrl: '{{ path('dc_credit_get_vehicle') }}',
  100.                 initCreditCalcUrl: '{{ path('dc_finance_credit_init') }}',
  101.                 initTradeInUrl: '{{ path('dc_ti_init') }}',
  102.                 agreementUrl: '{{ path('automarket_personal_data_agreement') }}',
  103.                 loadListDocumentUrl: '{{ path('dc_credit_load_documents') }}',
  104.                 schedulePaymentUrl: '{{ path('dc_credit_load_schedule_credit_pdf') }}',
  105.                 getVehiclesByWalletUrl: '{{ path('dc_finance_credit_by_price') }}',
  106.                 getVehiclesWithMinPriceUrl: '{{ path('dc_finance_credit_by_price_min') }}',
  107.                 getCrmUUIDUrl: '{{ path('dc_finance_crm_lead_by_uuid') }}',
  108.                 getCrmDataUrl: '{{ path('dc_finance_crm_create_lead') }}',
  109.                 sendLeadUrl: '{{ path('dc_credit_save') }}',
  110.                 ks: '{{ 'catalog.k_s'|trans({}, 'portal_base') }}',
  111.                 enginePower: '{{ 'cars.engine'|trans({}, 'portal_base') }}',
  112.                 translate_month: '{{ 'finance.credit.credit_month_short'|trans({}, 'portal_base') }}',
  113.                 translate_under: '{{ 'finance.credit.credit_under'|trans({}, 'portal_base') }}',
  114.                 translate_first_payment: '{{ 'form.first_give'|trans({}, 'portal_base') }}',
  115.                 translate_uah: ' грн',
  116.                 translate_not_enough_money: '{{ 'finance.credit.not_enough_money'|trans({}, 'portal_base') }}',
  117.                 translate_not_estimate_vehicle: '{{ 'finance.credit.not_estimate_vehicle'|trans({}, 'portal_base') }}',
  118.                 translate_min_first_payment_for_car: '{{ 'finance.credit.min_first_payment_for_car'|trans({}, 'portal_base') }}',
  119.                 translate_estimate_vehicle_more_1: '{{ 'finance.credit.translate_estimate_vehicle_more_1'|trans({}, 'portal_base') }}',
  120.                 translate_estimate_vehicle_more_2: '{{ 'finance.credit.translate_estimate_vehicle_more_2'|trans({}, 'portal_base') }}',
  121.                 translate_unfortunately_not_enough: '{{ 'finance.credit.unfortunately_not_enough'|trans({}, 'portal_base') }}',
  122.                 translate_price_of_your_car: '{{ 'finance.credit.price_of_your_car'|trans({}, 'portal_base') }}',
  123.                 translate_min: '{{ 'finance.credit.min'|trans({}, 'portal_base') }}',
  124.                 translate_min_first_payment: '{{ 'finance.credit.min_first_payment'|trans({}, 'portal_base') }}',
  125.                 translate_min_month_payment: '{{ 'finance.credit.min_month_payment'|trans({}, 'portal_base') }}',
  126.                 translate_month_term_credit: '{{ 'finance.credit.month_term_credit'|trans({}, 'portal_base') }}',
  127.                 continue_first_least: '{{ 'finance.credit.continue_first_least'|trans({}, 'portal_base') }}',
  128.                 translate_term_months: '{{ 'finance.credit.term_months'|trans({}, 'portal_base') }}',
  129.                 translate_term_months_short: '{{ 'finance.credit.term_months_short'|trans({}, 'portal_base') }}',
  130.                 translate_price_from: '{{ 'finance.credit.price_from'|trans({}, 'portal_base') }}',
  131.                 privacyUrl: '{{ privacyUrl }}',
  132.                 name: '{{ app.user.name | default(null) }}',
  133.                 phone: '{{ app.user.phone | default(null) }}',
  134.                 unsetUsedTypeVehicle: true,
  135.                 unsetFlow2: true,
  136.                 newCarUrl: 'mg_card_car',
  137.                 usedCarUrl: '',
  138.                 brand_id: {{model.brand.id }},
  139.                 dealer_id: {{model.dealer.id}},
  140.                 model_id: {{ model.model.id }},
  141.                 inStockId: {{ model.id }},
  142.                 vehicleItemId: {{ model.vehicleItemId }},
  143.                 vehicleId: '{{ model.vehicle.id }}'
  144.             });
  145.         });
  146.     </script>
  147. {% endblock %}