The amount shown reflects an estimate of the amount that you can expect to pay in Canadian dollars and includes freight and PDI. Taxes are excluded (unless selected otherwise). Photos for illustration purposes only, and may not reflect exact vehicle (including vehicle colour, trim, options, or other specifications). Some data and prices are provided by a third-party and we cannot guarantee their accuracy.
Drivetrain
All Wheel Drive
Engine
Intercooled Turbo Gas/Electric I-4
Transmission
Automatic w/OD
Fuel Type
Gasoline
Estimated Fuel Economy
for the 2024 Volvo S90
City
10.6 L/100 km
Highway
7.6 L/100 km
Combined
9.2 L/100 km
Actual mileage may vary with options, driving conditions, driving habits, and vehicle's condition.
Our {$MAKEMODELNOYEAR} {$MODELMODELNOYEAR} in stock!
Photos for illustration purposes only, and may not reflect exact vehicle (including vehicle colour, trim, options, or other specifications). Some vehicles may be shown with optional equipment or equipment not available in Canada. Specifications, equipment, options and prices are subject to change without notice. Although we endeavour to ensure that the information contained on this website is accurate, the website provider and the dealership are not responsible for any errors or omissions that may occur from time to time. Some data and prices are provided by a third-party and we cannot guarantee their accuracy. Please contact your dealer for verification or if you would like more information on this vehicle.
Your request was sent successfully!
Your request has been sent successfully. A representative will contact you shortly.
Your request has been sent successfully. A representative will contact you shortly.
Build & Price Your 2024 Volvo S90 Plus Bright Theme Now!
You can build & price your own 2024 Volvo S90 including the style, color & options to get an exact price, with our promotions and rebates and availability in stock.
';
}
if (typeof $('#' + titleKey).attr('id') != 'undefined')
$('#' + titleKey).remove();
if (typeof $('#' + dataKey).attr('id') != 'undefined')
$('#' + dataKey).remove();
var divToAppend = (equipSection == true ? 'mainEquipCompareView' : 'mainCompareView');
$(html).appendTo('#' + divToAppend);
removeEmptyRows();
},
setupTrimGroupsScrolling: function (container) {
container = container || $("#styles-container");
if(container && container.find('.trim-group-list').length > 0) {
var scroller = new Scroller(container[0], {
listSelector: ".trim-group-list",
onUpdateScroll: function () {
//DWP-12480: Adjust the positioning of the tech specs popup when scrolling
var currentMenuTechSpecs = container.find('.specSheet .menu-tech-specs');
if (currentMenuTechSpecs.length) {
var specSheetOriginalLeft = currentMenuTechSpecs.data('original-left');
if (!specSheetOriginalLeft) {
specSheetOriginalLeft = currentMenuTechSpecs.position().left;
currentMenuTechSpecs.data('original-left', specSheetOriginalLeft);
}
currentMenuTechSpecs.css('left', specSheetOriginalLeft - this._list.scrollLeft);
}
}
});
}
// var list = container.find(".trim-group-list");
//
// // if the content is smaller or the same size as the outer width, don't display scrolling
// if (list[0].scrollWidth <= list.outerWidth()) {
// return;
// }
// //DWP-12480: set graybox position absolute z-index 1 if there is a scrollbar to prevent trim hover overlapping CTAs
// var grayBox = document.querySelector('body#NEWCARDETAILS .graybox');
// if (grayBox && grayBox.style) {
// grayBox.style.position = "absolute";
// grayBox.style.zIndex = 1;
// }
// var scroll = {
// position: 0,
// speed : 0,
// max : (list[0].scrollWidth - list.innerWidth()) + 15,
// };
//
// var showScroll = function () {
// if (list[0].scrollLeft > 0) {
// container.find("span[class*='left']").removeClass("hidden");
// } else {
// container.find("span[class*='left']").addClass("hidden");
// }
//
// if (list[0].scrollLeft < scroll.max) {
// container.find("span[class*='right']").removeClass("hidden");
// } else {
// container.find("span[class*='right']").addClass("hidden");
// }
// };
//
// showScroll();
//
// container.find("span[class*='left']")
// .on('mouseover', function () { scroll.speed = -15; })
// .on ('mouseleave', function() { scroll.speed = 0; });
//
// container.find("span[class*='right']")
// .on('mouseover', function () { scroll.speed = 15; })
// .on ('mouseleave', function() { scroll.speed = 0; });
//
// var updateScroll = function () {
// if (scroll.speed !== 0) {
// scroll.position += scroll.speed / 5;
//
// if (scroll.position < 0) {
// scroll.position = 0;
// }
//
// if (scroll.position > scroll.max) {
// scroll.position = scroll.max;
// }
//
// list.scrollLeft(scroll.position);
// }
// //DWP-12480: Adjust the positioning of the tech specs popup when scrolling
// var currentMenuTechSpecs = container.find('.specSheet .menu-tech-specs');
// if (currentMenuTechSpecs.length) {
// var specSheetOriginalLeft = currentMenuTechSpecs.data('original-left');
// if (!specSheetOriginalLeft) {
// specSheetOriginalLeft = currentMenuTechSpecs.position().left;
// currentMenuTechSpecs.data('original-left', specSheetOriginalLeft);
// }
// currentMenuTechSpecs.css('left', specSheetOriginalLeft - list.scrollLeft());
// }
// showScroll();
// window.requestAnimationFrame(updateScroll);
// };
//
// window.requestAnimationFrame(updateScroll);
},
getSelectedTrimGroup: function () {
var container = $("#styles-container");
var trimName = container.find("span.active").data("trim");
if(typeof trimName === 'undefined' || trimName == null) {
trimName = "all";
}
return trimName;
},
/**
* Filtered vehicle styles
*
* This method will return a filtered list of styles depending on the selected trim
* group (if show all or a specific one) and then will re-order the list according
* to their price.
*
* @param styles
*
* @return {*}
*/
filteredVehicleStyles: function (styles) {
var group = newcarDetails.getSelectedTrimGroup();
var filteredStyles = styles.filter(function (val) {
let cmp = val.englishTrim;
//Mazda 2021.5 trim exception
let match = val.CFStyleName.match(/(2021[,|.]5)/);
if(match){
cmp += (' ' + match[0] || '').replace(',','.');
}
return (['all', cmp].includes(group));
});
filteredStyles.sort(function (a, b) {
return a.msrpAllIn > b.msrpAllIn;
});
return filteredStyles;
},
/**
* Get override style ID
*
* This method will find the override style ID if necessary. It will either return the
* one in the URL or look for it as a trim group name. When found it will also add the
* 'overrideStyleID' attribute to the newcarDetails object.
*
* @return {any|number}
*/
getOverrideStyleId: function () {
var pathname = window.location.pathname;
var htmlFile = decodeURIComponent(pathname.substring(pathname.lastIndexOf('/') + 1));
var group = newcarDetails.getSelectedTrimGroup();
if (htmlFile.indexOf('-id') === -1 && group === "all") {
return newcarDetails.getInitialCompareFirstId();
}
if (group !== "all") {
var styles = newcarDetails.filteredVehicleStyles(newcarDetails.activeModel.styles);
return styles[0].id;
}
var urlStyleID = htmlFile.match("-id(.*).html");
if (urlStyleID === null) {
return newcarDetails.getInitialCompareFirstId();
}
return urlStyleID[1];
},
getInitialCompareFirstId: function() {
if($('#initcomparestyles').length){
var id = $('#initcomparestyles').val().split('|||')[0];
if(id) return id;
}
return 0;
},
getStylesToCompare: function () {
// get the first 4 styles in the list
var result = newcarDetails.activeModel.styles.slice(0, 4);
// if there is an override style, put it first in list
if (newcarDetails.overrideStyleID > 0) {
result = result.filter(
function (val){
return (val.id != newcarDetails.overrideStyleID);
});
var style = newcarDetails.activeModel.styles.filter(function (val) { return (val.id == newcarDetails.overrideStyleID); });
if (style.length) {
result.unshift(style[0]);
}
}
return result.slice(0, 4);
},
getVehicleURL: function (extras) {
var make = newcarDetails.activeModel.make;
var model = newcarDetails.activeModel.model;
var year = newcarDetails.activeModel.year;
var extraParam = extras.join("");
if (newcarDetails.overrideStyleID != null && !isNaN(newcarDetails.overrideStyleID) && newcarDetails.overrideStyleID > 0) {
make = ($('#textMakeOverride').val() !== '') ? $('#textMakeOverride').val() : make;
model = ($('#textModelOverride').val() !== '') ? $('#textModelOverride').val() : model;
year = ($('#textYearOverride').val() !== '') ? $('#textYearOverride').val() : year;
}
make = make.replace(/-/g, '_');
model = model.replace(/[-\s]/g, '_');
if ($('#textLanguage').val() === "ENGLISH") {
return year + '-' + make + '-' + model + extraParam + '.html';
} else {
return make + '-' + model + '-' + year + extraParam + '.html';
}
},
showSpecTooltip: function(styleid, self) {
var currentSpecSheet = self.find('.menu-tech-specs');
if (currentSpecSheet && currentSpecSheet.length){
currentSpecSheet.css('opacity', '1');
currentSpecSheet.css('z-index', '12');
return;
}
var template = $('#menu-specs-template').clone();
$(template).find('.arrow').remove();
$(template).css('display', 'block');
$(template).css('visibility', 'visible');
$(template).css('opacity', '1');
$(template).css('left', '0');
$(template).css('top', '20px');
$(template).css('z-index', '12');
const escapeHTML = str => str.replace(/[&<>"']/g, char => ({'&': '&', '<': '<', '>': '>', '"': '"', "'": '''}[char]));
var make = escapeHTML(newcarDetails.activeModel.make);
var model = escapeHTML(newcarDetails.activeModel.model);
var year = escapeHTML(newcarDetails.activeModel.year);
var trimImage = '
';
$(template).find('h4').after(trimImage);
var trim = self.attr('data-trim');
var trimTitle = $('body').hasClass('ENGLISH') ? year + ' ' + model + ' ' + trim : model + ' ' + trim + ' ' + year;
$(template).find('h4').css('text-align', 'center');
$(template).find('h4').text(trimTitle);
//New VDP page link for trim
var specLink = self.find('a').attr('href');
$(template).find('.menu-spec-link').attr('href', specLink);
$(template).find('.menu-spec-link').parent().css('text-align', 'center');
//BnP page link for trim
var bnpLink = $('#BuildAndPriceActionBoxLink').length ? $('#BuildAndPriceActionBoxLink').attr('href') : '';
if (bnpLink)
{
var bnpLang = $("html").attr("lang");
var bnpRegex = (bnpLang == 'en'
? /\/build-and-price\/(\d{4}-(\w+)-(\w+).*\.html).*/
: /\/configuration-et-prix\/((\w+)-(\w+)-\d{4}).*\.html/);
var bnpMatch = bnpLink.match(bnpRegex); // check if this is local link, if it has this then it's not external.
// Support for Ford/Lincoln external BNP
if ($("#d2c-bnp-linkrules-textarea").length > 0
&& !($("#d2c-bnp-linkrules-textarea").val() == "")
&& !($("#d2c-bnp-linkrules-textarea").val() == "##LINKRULES##")
&& (bnpMatch === null))
{
$(template).find('.menu-spec-bnp').attr('target', "_blank");
} else {
bnpLink = bnpLink.replace('?step=version', '');
bnpLink = bnpLink.replace(/-id[0-9]*/, '');
bnpLink += '?styleid='+styleid;
}
$(template).find('.menu-spec-bnp').attr('href', bnpLink);
var modelTitle = $('body').hasClass('FRENCH') ? escapeHTML(newcarDetails.activeModel.modelfr) : escapeHTML(newcarDetails.activeModel.model);
$(template).find('.menu-spec-bnp').html($(template).find('.menu-spec-bnp').html().replace('$MODEL', modelTitle+' '+trim));
$(template).find('.menu-spec-bnp').parent().css('text-align', 'center');
} else {
$(template).find('.menu-spec-bnp').parent().remove();
}
//Get current style
var currentStyle = newcarDetails.getStyleById(styleid);
//Price
var rpl = $('body').hasClass('FRENCH') ? '$1 ' : '$1,';
var price = parseInt(currentStyle.msrpAllIn);
if(typeof newcarDetails.activeModel.customFeeIncentive !== 'undefined'){
$.each(newcarDetails.activeModel.customFeeIncentive[currentStyle.id], function(index, value){
if(value.type == 'incentive'){
/*rebate += value.cash_amount;
discountAmountTooltip += "" + ($('body').hasClass('FRENCH') ? atob(value.descFR) : atob(value.descEN));*/
} else {
price += parseInt(value.cash_amount);
}
});
}
price = Number(price).toFixed(0);
var modelid = newcarDetails.activeModel.id;
var priceText = price.toString().replace(/(.)(?=(\d{3})+$)/g,rpl);
priceText = $('body').hasClass('FRENCH') ? priceText + ' $' : '$'+priceText;
if($('#ADMIN_NEW_DONT_SHOW_PRICES').val() == '1' || $('#ADMIN_NEW_DONT_SHOW_PRICE_MODELS').val().includes(modelid)){
priceText = $('#NEW_PRICE_TEXT').val();
}
$(template).find('.menu-spec-price').html(priceText);
$(template).find('.menu-price-text').text($(template).find('.menu-price-text').text().replace('##MENUYEAR##', currentStyle.year).replace('##MENUMODEL##', currentStyle.name).replace('##MENUTRIM##', currentStyle.trim));
//Horsepower
var specHp = newcarDetails.getSpecInfoForStyle(currentStyle, 48);
$(template).find('.menu-spec-hp').text(specHp);
//Cylinder
var specPower = newcarDetails.getSpecInfoForStyle(currentStyle, 42);
$(template).find('.menu-spec-power').text(specPower);
//Fuel city
var specFuelCity = newcarDetails.getSpecInfoForStyle(currentStyle, 26);
$(template).find('.menu-spec-fuel-city').text(specFuelCity);
//Fuel highway
var specFuelHighway = newcarDetails.getSpecInfoForStyle(currentStyle, 27);
$(template).find('.menu-spec-fuel-highway').text(specFuelHighway);
//Drivetrain
var specDrivetrain = newcarDetails.getSpecInfoForStyle(currentStyle, 6);
$(template).find('.menu-spec-drivetrain').text(specDrivetrain);
//set an initial position, because tabs can horizontally scroll, position will get updated later when scrolling
if (self.closest('.trim-group-list').length) {
var left = -1 * $('.trim-group-list')[0].scrollLeft;
$(template).css('left', left);
$(template).data('original-left', left);
}
self.find('.specSheet').append(template);
},
getStyleById: function(styleid){
var retValue = '';
$.each(newcarDetails.allStyles, function(index, value){
if(value.id == styleid){
retValue = value;
return false;
}
});
return retValue;
},
getSpecInfoForStyle: function(style, specId){
var retValue = '';
$.each(style.specs, function(index, value){
if(value.id == specId){
retValue = value.value;
return false;
}
});
return retValue;
},
getBestPriceBanner: () => {
let lang = ($('#activesitelanguage').val() == 'ENGLISH') ? 'en' : 'fr';
// let carData = JSON.stringify({
// make: newcarDetails.activeModel.make,
// model: newcarDetails.activeModel.model,
// year: newcarDetails.activeModel.year,
// styleId : newcarDetails.overrideStyleID || newcarDetails.activeModel.mainstyle,
// });
$.ajax({
url: `/${lang}/ajax/getBestPricesBanner`,
dataType: 'JSON',
type: 'POST',
data: {
make: newcarDetails.activeModel.make,
model: newcarDetails.activeModel.model,
year: newcarDetails.activeModel.year,
styleId : newcarDetails.overrideStyleID || newcarDetails.activeModel.mainstyle,
}
}).done( function(data) {
let wrapper = document.getElementById('bestPriceBanner');
wrapper.innerHTML = data.html;
});
}
};
return newcarDetails;
})();
function handlePromoBtnClick(){
if($('#promo_title').length>0){
$(document).scrollTop($('#promo_title').offset().top - 100);
}
if(!Cookies.get('popupFormFilled')){
showPopupWidget();
}
}
function changeCompareView(view){
if(view == 'specs'){
$('#compareControl div.button_cmp_left').removeClass('button_cmp_inact');
$('#compareControl div.button_cmp_left').addClass('button_cmp_act');
$('#compareControl div.button_cmp_right').removeClass('button_cmp_act');
$('#compareControl div.button_cmp_right').addClass('button_cmp_inact');
$('#mainEquipCompareView').hide();
$('#mainCompareView').show();
} else {
removeEmptyRows();
$('#compareControl div.button_cmp_left').removeClass('button_cmp_act');
$('#compareControl div.button_cmp_left').addClass('button_cmp_inact');
$('#compareControl div.button_cmp_right').removeClass('button_cmp_inact');
$('#compareControl div.button_cmp_right').addClass('button_cmp_act');
$('#mainCompareView').hide();
$('#mainEquipCompareView').show();
}
}
function removeEmptyRows(){
var nonEmptyCols;
$('#mainEquipCompareView div.box940_line').each(function(){
nonEmptyCols = 0;
$('div', this).each(function(){
nonEmptyCols += (trim($(this).text()) == 'n/d' || trim($(this).text()) == 'n/a' || trim($(this).text()) == '' ? 0 : 1);
});
if(nonEmptyCols < 1) $(this).remove();
});
}
function submitSpecsNewPdfRequest(){
// Send Mail and open pdf with rebate coupon
var subject = $('.emailSubject', '#popupTechSpecsNewDiv').text();
var body = $('.emailBody', '#popupTechSpecsNewDiv').html();
var clientEmail = $("#clientEmail", "#popupTechSpecsNewDiv").val();
var clientPhone = $("#clientSms", "#popupTechSpecsNewDiv").val();
var clientName = $("#clientName", "#popupTechSpecsNewDiv").val();
var make = $('input.brandemail').val() != 'undefined' ? $('input.brandemail').val() : '';
var model = $('input.modelemail').val() != 'undefined' ? $('input.modelemail').val() : '';
var year = $('input.yearemail').val() != 'undefined' ? $('input.yearemail').val() : '';
body = body.replace(/{\$CLIENTEMAIL}/g, clientEmail);
body = body.replace(/{\$CLIENTPHONE}/g, clientPhone);
body = body.replace(/{\$NAME}/g, clientName);
emailHandler.subject = subject;
emailHandler.body = body;
emailHandler.sendTo = $("#textSendToEmail").val();
emailHandler.sendToADFFormat = $("#textSendToEmailADF").val();
emailHandler.mailID = 'SpecsRequestNew';
emailHandler.userEmail = clientEmail;
emailHandler.userPhone = clientPhone;
emailHandler.userFirstName = clientName;
emailHandler.condition = 'New';
if (make.length > 0) emailHandler.make = make;
if (model.length > 0) emailHandler.model = model;
if (year.length > 0) emailHandler.year = year;
//document.forms['emailmsgfrm_popupTechSpecsNewDiv'].submit();
var thismailSentHandler = getMailSentHandler('_popupTechSpecsNewDiv');
emailHandler.callback = function(Success)
{
if (Success){
if (typeof thismailSentHandler != 'undefined')
{
thismailSentHandler.showSuccess();
}
} else {
if (typeof thismailSentHandler != 'undefined')
{
thismailSentHandler.showFail();
}
}
};
emailHandler.sendMail();
// Close new spec popup
$("#popupTechSpecsNewDiv").popupize().close();
}
function sendSpecsNewPdfRequest(){
$.validity.start();
var isSMS = $("#clientSms", "#popupTechSpecsNewDiv").val().length>0?true:false;
if(isSMS){
$("#clientSms", "#popupTechSpecsNewDiv").require().validateMobile();
}else{
$("#clientEmail", "#popupTechSpecsNewDiv").require().validEmailAddress();
}
var result = $.validity.end();
if (!result.valid) {
alert($('#invalidEmailMessage').val() + '!');
return;
}
var url = '';
var data = {};
if(!isSMS){
data.email=$("#clientEmail", "#popupTechSpecsNewDiv").val();
url = $('#printPage', "#popupTechSpecsNewDiv").val()+'&email='+data.email; // email lead
}else{
url = ($('#textLanguage').val()=="ENGLISH"?'/en':'/fr')+'/ajax/SendSms?wswidth=0'; // sms
}
data.phone = $("#clientSms", "#popupTechSpecsNewDiv").val();
data.make = $('[name="brand"]').val();
data.model = $('[name="model"]').val();
data.year = $('[name="year"]').val();
$.ajax({
async:false,
url: url,
data: data,
success: function(data){
var res = JSON.parse(data);
if(typeof res.message !=='undefined'){
console.log(res.message); // if dealer has no phone number sms supprt no sms will be sent but lead created anyway (submitSpecsNewPdfRequest)
}
$('#emailSuccessMessage_popupTechSpecsNewDiv span.success').html($('#REQUEST_SENT').val());
submitSpecsNewPdfRequest();
},
failure: function(errMsg) {
var msg = saveHandler.failMessage + "\n" + errMsg;
console.log('ajax failure',msg);
$('#popupTechSpecsNewDiv .close-reveal-modal').trigger('click');
},
error:function (xhr, ajaxOptions, thrownError){
$('#popupTechSpecsNewDiv .close-reveal-modal').trigger('click');
console.log('ajax error',xhr.responseText);
}
});
}
function showSpecsRequestNewPopup() {
$("#popupTechSpecsNewDiv").popupize().setTrigger("click").open();
}
function onYouTubeIframeAPIReadySlider() {
yt_players = {};
$(".ytplayer").each(function() {
yt_players[this.id] = new YT.Player(this.id, {events:{'onStateChange': onPlayerStateChange}});
});
}
function onYouTubeIframeAPIReady() {
if($('#newVdpFullwidthVideoIframe').length == 0){
onYouTubeIframeAPIReadySlider();
} else {
onYouTubeIframeAPIReadyFullwidth();
}
}
function pauseAllVideos(){
$.each(yt_players, function(){
this.pauseVideo();
});
$(".mp4player").each(function(){
$(this)[0].pause();
});
}
function trackVideoPlay(event) {
var title = $('.brandemail[name="brand"]').val() + '-' + $('.modelemail[name="model"]').val() + '-' + $('.yearemail').val();
var category = 'Videos';
trackEvent(category, 'Neufs', title);
}
function videoPause(event) {
var title = $('.brandemail[name="brand"]').val() + '-' + $('.modelemail[name="model"]').val() + '-' + $('.yearemail').val();
trackEvent('Pause', title);
}
function videoEnd(event) {
var title = $('.brandemail[name="brand"]').val() + '-' + $('.modelemail[name="model"]').val() + '-' + $('.yearemail').val();
trackEvent('Ended', title);
}
function trackVirtualTour(){
var title = $('.brandemail[name="brand"]').val() + '-' + $('.modelemail[name="model"]').val() + '-' + $('.yearemail').val();
var category = 'Visites virtuelles';
trackEvent(category, 'Neufs', title);
}
function trackEvent(category, action, title) {
//@DWP-10393: 24-11-2022, GA4 wont use send_to, so event will be pushed to all accouns when not mentionning specific one
gaTrack('_trackEvent', category, action, title, 1);
}
function promoAlerts(){
if( $('#promoAlert_enabled').length < 1 || !$('#promoAlert_enabled').val()){
return false;
}
var promoAlert = {
message: $('#promoAlert_msg').val(),
redirect: $('#promoAlert_url').val(),
bg_color: $('#promoAlert_bgcolor').val().replace('#', ''),
txt_color: $('#promoAlert_txtcolor').val()
}
var hexToRgb = function(hex) {
var bigint = parseInt(hex, 16);
var r = (bigint >> 16) & 255;
var g = (bigint >> 8) & 255;
var b = bigint & 255;
return r + "," + g + "," + b;
}
var showMessage = function( message ){
if( $('#sliderPromoAlert').length > 0 ){
$('#sliderPromoAlert').html( 'X' + message);
} else {
if( $('#slider-pro-12 .slide-wrapper').length > 0 ){
$('#slider-pro-12 .slide-wrapper').append('');
$('#sliderPromoAlert').html( '' + message);
}
}
var width = $('.slide-wrapper').width() - 16; // can be 2 sliders (banner slider and wehicle image slider.
$('#sliderPromoAlert').css({
position: 'absolute',
background: 'rgba(' + hexToRgb(promoAlert.bg_color) + ',0.75)',
zIndex: 99,
color: promoAlert.txt_color,
padding:'8px',
top:'0px',
right:'0px',
left:'0px',
cursor:'pointer'
}).on('click', function(){
if(promoAlert.redirect.length > 5){
window.location.href = promoAlert.redirect;
} else {
showPopupWidget()
}
});
$('#sliderPromoAlert .closeAlert').css({
color: promoAlert.txt_color,
'text-decoration': 'none',
'float': 'right'
}).one('click', function(){
$('#sliderPromoAlert').slideUp();
return false;
});
return true;
}
showMessage(promoAlert.message);
}
window.addEventListener("message",
function (e) {
if(e.origin !== window.location.origin) return;
if(e.data=='gwdBannerClicked'){
dynamicBannerClicked(1);
}
if(e.data=='gwdBannerClickedInv'){
dynamicBannerClicked(2);
}
});
function dynamicBannerClicked(action){
var title = $('.brandemail[name="brand"]').val() + '-' + $('.modelemail[name="model"]').val() + '-' + $('.yearemail').val();
//@DWP-10393: 24-11-2022, GA4 wont use send_to, so event will be pushed to all accouns when not mentionning specific one
gaTrack('_trackEvent', 'New-VDP-Outbound-clicks', 'Banniere du haut', title);
//@DWP-10393: 24-11-2022, GA4 wont use send_to, so event will be pushed to all accouns when not mentionning specific one
gaTrack('_trackEvent', 'Cliques Banniere', 'Neuf-VDP', 'Popup', 1);
if(action==2){
showInventoryPopup();
}else{
showPopupWidget();
}
}
function showPopupTrim(trim){
emailHandler.trim = trim;
showPopupWidget();
}
function addPromoBtns(){
var trimsBtn = [];
var price_table = $('#price_table');
$('.divHeading .compareTableTrimTitle', price_table).each(function(i,v){
if(i>0) trimsBtn[i] = $(this).html().replace(/'/g,'\'').replace(/"/g,'\"');
});
$('.divRow .divCell[cell-id!="0"]', price_table).each(function(ii,vv){
var obj = $(this);
obj.html( getPriceHTML( obj ) );
if( $('#carPrice').hasClass('strike-price') ) {
obj.addClass('strikeadded');
}
if($('#promoDiscoverButton').length){
obj.append('