{% extends '@DcSite/Morris_Garage/template.html.twig' %}
{% block head %}
<title>
{% 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,
'%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 %}
</title>
<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 %}"/>
{% if model.seoKeywords(app.request.locale) %}
<meta name="keywords" content="{{ model.seoKeywords(app.request.locale) }}"/>
{% endif %}
<link rel="stylesheet" type="text/css" href="/dist/{{ MODE }}/dcsite/mg/css/mgInStockCard.css?{{ VERSION }}">
{% endblock %}
{% block ogtagDynamicImage %}
<meta property="og:image" content="{{ absolute_url(media_url(model.preview, 'small_in_stock')) }}"/>
{% endblock %}
{% block ogtagDynamic %}
<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 %}"/>
<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 %}"/>
{% endblock %}
{% block socialPreview %}
<img src="{{ absolute_url(media_url(model.preview, 'small_in_stock')) }}" class="d-none">
{% endblock %}
{% block content %}
{% include '@DcSite/Morris_Garage/breadcrumbs.html.twig' with {
catName: 'pages.car_in_stock.breadcrumb_title'|trans({}, 'dc_morris'),
catUrl: 'mg_car_stock',
pageName: model.fullName
} %}
{% include '@DcSite/Modules/car-in-stock/index.html.twig' with {tdPath: 'mg_service_consultation', newCreditCalc: true} %}
<div class="container">
<div class="car__in__stock__btn__wrapper">
<a style="background-color: #000000; border-radius: 50px; padding: 13px 20px;" class="car__in__stock-btn" href="{{ path('mg_service_consultation') }}">ТЕСТ-ДРАЙВ</a>
<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>
<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>
</div>
</div>
{% include '@DcSite/Modules/buy-instock-car-popup.html.twig' with {actPath: 'form_buy_in_stock', model: model} %}
{% include '@DcSite/Modules/call-me-popup.html.twig' with {
'route': path('form_call_me', {'formType': 4}),
} %}
{% include '@DcSite/Modules/sps-popup-credit.html.twig' with {'homePage' : path('mg_homepage') } %}
{% endblock %}
{% block script %}
<script src="/dist/{{ MODE }}/dcsite/mg/js/mgInStockCard.js?{{ VERSION }}"></script>
<script type="application/ld+json">
{{ structuredCarData|raw }}
</script>
<script>
$(() => {
window.initCredit({
cretidTpl: '{{ path('dc_credit_load_tpl') }}',
initUrl: '{{ path('dc_credit_init') }}',
brandUrl: '{{ path('dc_credit_load_brands') }}',
byDealerUrl: '{{ path('dc_credit_init_by_dealer') }}',
programsUrl: '{{ path('dc_credit_programs') }}',
saveUrl: '{{ path('dc_credit_save') }}',
privacyUrl: '{{ privacyUrl }}',
disableCarChange: true,
dealer: {{ model.vehicle.dealer.id }},
carId: {{ model.vehicle.id }},
variationId: {{ model.vehicleItemId }}
});
window.initTradeIn({
initUrl: '{{ path('dc_ti_init') }}',
dealer: {{ model.vehicle.dealer.id }},
carId: {{ model.vehicle.id }},
variationId: {{ model.vehicleItemId }},
agreementUrl: '{{ privacyUrl }}',
});
window.initCasco({
initUrl : '{{ path('base_casco_init') }}',
initByDealerUrl : '{{ path('base_casco_init_by_dealer') }}',
optionsUrl : '{{ path('base_casco_options') }}',
formUrl : '{{ path('base_casco_save_form') }}',
privacyUrl: '{{ privacyUrl }}',
dealer: {{ model.vehicle.dealer.id }},
carId: {{ model.vehicle.id }},
variationId: {{ model.vehicleItemId }},
disableCarChange: true
});
const obj = new dcsite.mgInStockCard.CreditInStock();
obj.initCreditCalcInStock({
getVehicleBrandUrl: '{{ path('dc_credit_find_brand') }}',
getVehicleModelUrl: '{{ path('dc_credit_find_model') }}',
getVehicleEquipmentUrl: '{{ path('dc_credit_find_equipment') }}',
getVehicleVariationUrl: '{{ path('dc_credit_find_variation') }}',
getVehicleUrl: '{{ path('dc_credit_get_vehicle') }}',
initCreditCalcUrl: '{{ path('dc_finance_credit_init') }}',
initTradeInUrl: '{{ path('dc_ti_init') }}',
agreementUrl: '{{ path('automarket_personal_data_agreement') }}',
loadListDocumentUrl: '{{ path('dc_credit_load_documents') }}',
schedulePaymentUrl: '{{ path('dc_credit_load_schedule_credit_pdf') }}',
getVehiclesByWalletUrl: '{{ path('dc_finance_credit_by_price') }}',
getVehiclesWithMinPriceUrl: '{{ path('dc_finance_credit_by_price_min') }}',
getCrmUUIDUrl: '{{ path('dc_finance_crm_lead_by_uuid') }}',
getCrmDataUrl: '{{ path('dc_finance_crm_create_lead') }}',
sendLeadUrl: '{{ path('dc_credit_save') }}',
ks: '{{ 'catalog.k_s'|trans({}, 'portal_base') }}',
enginePower: '{{ 'cars.engine'|trans({}, 'portal_base') }}',
translate_month: '{{ 'finance.credit.credit_month_short'|trans({}, 'portal_base') }}',
translate_under: '{{ 'finance.credit.credit_under'|trans({}, 'portal_base') }}',
translate_first_payment: '{{ 'form.first_give'|trans({}, 'portal_base') }}',
translate_uah: ' грн',
translate_not_enough_money: '{{ 'finance.credit.not_enough_money'|trans({}, 'portal_base') }}',
translate_not_estimate_vehicle: '{{ 'finance.credit.not_estimate_vehicle'|trans({}, 'portal_base') }}',
translate_min_first_payment_for_car: '{{ 'finance.credit.min_first_payment_for_car'|trans({}, 'portal_base') }}',
translate_estimate_vehicle_more_1: '{{ 'finance.credit.translate_estimate_vehicle_more_1'|trans({}, 'portal_base') }}',
translate_estimate_vehicle_more_2: '{{ 'finance.credit.translate_estimate_vehicle_more_2'|trans({}, 'portal_base') }}',
translate_unfortunately_not_enough: '{{ 'finance.credit.unfortunately_not_enough'|trans({}, 'portal_base') }}',
translate_price_of_your_car: '{{ 'finance.credit.price_of_your_car'|trans({}, 'portal_base') }}',
translate_min: '{{ 'finance.credit.min'|trans({}, 'portal_base') }}',
translate_min_first_payment: '{{ 'finance.credit.min_first_payment'|trans({}, 'portal_base') }}',
translate_min_month_payment: '{{ 'finance.credit.min_month_payment'|trans({}, 'portal_base') }}',
translate_month_term_credit: '{{ 'finance.credit.month_term_credit'|trans({}, 'portal_base') }}',
continue_first_least: '{{ 'finance.credit.continue_first_least'|trans({}, 'portal_base') }}',
translate_term_months: '{{ 'finance.credit.term_months'|trans({}, 'portal_base') }}',
translate_term_months_short: '{{ 'finance.credit.term_months_short'|trans({}, 'portal_base') }}',
translate_price_from: '{{ 'finance.credit.price_from'|trans({}, 'portal_base') }}',
privacyUrl: '{{ privacyUrl }}',
name: '{{ app.user.name | default(null) }}',
phone: '{{ app.user.phone | default(null) }}',
unsetUsedTypeVehicle: true,
unsetFlow2: true,
newCarUrl: 'mg_card_car',
usedCarUrl: '',
brand_id: {{model.brand.id }},
dealer_id: {{model.dealer.id}},
model_id: {{ model.model.id }},
inStockId: {{ model.id }},
vehicleItemId: {{ model.vehicleItemId }},
vehicleId: '{{ model.vehicle.id }}'
});
});
</script>
{% endblock %}