My Garage

{{ translation.garage }}

'; avScript2.defer = true; avScript2.async = true; document.querySelector('head').insertAdjacentElement('beforeend', avScript2); /* END Your Name | Case # */ /* Bhavin | case 02205905 | Replace logo on home page - 27/01/2023 */ if($('.home').length > 0){ $img_src = 'https://convertusgroupprod-com.cdn-convertus.com/uploads/sites/3/2021/11/image002.png'; $('.group-locations-2 .group-locations-widget .desktop-locations__icon:nth-last-child(2)').find('img').attr('src',$img_src); $('#tns1-item11.location-card.tns-item').find('img').attr('src',$img_src); } /* End | case 02209823 */ /* smooth scrolling */ jQuery($ => { // The speed of the scroll in milliseconds const speed = 1000; $('a[href*="#"]') .filter((i, a) => a.getAttribute('href').startsWith('#') || a.href.startsWith(`${location.href}#`)) .unbind('click.smoothScroll') .bind('click.smoothScroll', event => { const targetId = event.currentTarget.getAttribute('href').split('#')[1]; const targetElement = document.getElementById(targetId); if (targetElement) { event.preventDefault(); $('html, body').animate({ scrollTop: $(targetElement).offset().top }, speed); } }); }); $(function(){ $('.page-id-55127 main a').click(function() { $('html, body').animate({ scrollTop: $( $(this).attr('href') ).offset().top }, 1000); return false; }); }); /*tire-store LP accordian collapsse*/ setTimeout(function(){     $('.TireFacts .convertus-accordion__section').removeClass( "expanded");  }, 500); /*tire-store LP accordian collapsse*/ if(document.querySelector('.page-id-28060')){ setInterval(() => { let steal= document.querySelectorAll('.price-block__label'); steal.forEach(i => { if(i.textContent === 'Dealer Price') { i.textContent = 'Steal Price' } }); }, 1000); } /* Mithila */ /* START - Remove part of title in approved page */ if (document.querySelector('.page-id-88')) { document.querySelector('.no-mobile-padding > .card > h3').childNodes[0].nodeValue = "Myers Certified Pre-Owned, \n"; document.querySelector('.no-mobile-padding > .card > p.mb-md').childNodes[1].nodeValue = " – Over 400 Myers Approved Pre-Owned Cars & Trucks"; document.querySelector('.no-mobile-padding > .card > h5').childNodes[0].nodeValue = "What is Myers Certified? The program includes:"; $('.no-mobile-padding > .card > h5').insertBefore('.no-mobile-padding > .card > p.mb-md'); $('.no-mobile-padding > .card > ul').insertBefore('.no-mobile-padding > .card > p.mb-md'); $('.myers-approved')[0].src = "/wp-content/uploads/sites/3/2020/04/Myers-Certified-Logo.jpg" $('.no-mobile-padding > .card > p.mb-md').append('\n Pre-Owned Vehicles '); $('h3 span')[1].style.fontSize = "3.2rem"; } /* END - Remove part of title in approved page */ /* Mithila */ $( 'select[convertus-data-id="inventory-search__condition-drop-down"]' ).css('display', 'none'); $(window).load(function() { $('select[convertus-data-id="inventory-search__condition-drop-down"] option:first-child').html('All Vehicles'); }); $('footer').prepend('

Myers Automotive Group: We\'re Family

The people on our team are your friends and neighbours. Our kids go to school together, play sports together, and succeed together. We sit on parents\' councils and volunteer with you to make good things happen. We sponsor teams and charity events. We are the community we serve.

'); $('.footer__lower-logo').before('Accessibility · '); // Logic to allow child dealerships Tradesii IDs to be used on the Myers Parent VDPs. let isVdp = document.querySelector('.vdp-wrapper'); if( isVdp ) { let photoGalleryDiv = document.getElementsByClassName('photo-gallery'); let autoverifyWidget = document.getElementsByClassName('autoverify-widget'); //Inserts AutoVerify Widget after Photo Gallery. photoGalleryDiv[0].parentNode.insertBefore(autoverifyWidget[0], photoGalleryDiv[0].parentNode.children[1] ); //List of dealership IDs. let dealershipIDs = [{ "Myers Barrhaven Hyundai": { apiKey: "6da46e29-a7e3-4a5f-85b0-a46ca4146045/de88e229-637d-4ce0-8d38-c567bfe30366", businessID: "f36fdd88-616b-4df6-bec4-ac1b6877884b", }, "Myers Barrhaven Nissan": { apiKey: "6da46e29-a7e3-4a5f-85b0-a46ca4146045/e45c62f5-e0e5-4e21-b0e3-86802e652775", businessID: "5f735f8b-2770-4c02-bab8-ad28e95cfc5f", }, 'Myers Barrhaven Toyota': { apiKey: "6da46e29-a7e3-4a5f-85b0-a46ca4146045/d290237c-9f35-4063-856d-2075fd5ba006", businessID: "db685186-9518-4abb-b773-217b5fbdc396", }, "Myers Cadillac Chev Buick GMC": { apiKey: "6da46e29-a7e3-4a5f-85b0-a46ca4146045/839ac43c-6277-4f06-8255-3aab328f6631", businessID: "a6f8c5ac-9603-44b5-a3eb-fd3c87086696", }, "Myers Infiniti": { apiKey: "6da46e29-a7e3-4a5f-85b0-a46ca4146045/005e8034-c4d0-44f6-a3f2-f700ee451a69", businessID: "1cc6f427-6654-440f-b090-aa3ae94d3cfe", }, "Myers Kanata Chev Buick GMC": { apiKey: "6da46e29-a7e3-4a5f-85b0-a46ca4146045/c8e30173-534f-409f-a24e-d42a01a2074a", businessID: "61bb7236-3779-4954-838a-09fe0ab30818", }, "Myers Kanata Hyundai": { apiKey: "6da46e29-a7e3-4a5f-85b0-a46ca4146045/28fb971a-de8d-444e-a7d7-4feddd80a914", businessID: "e2ea5224-65f8-495a-acf9-40ad40d23905", }, "Myers Kanata Nissan": { apiKey: "6da46e29-a7e3-4a5f-85b0-a46ca4146045/ae8aed05-fe65-4976-8d33-f73f3d7bec32", businessID: "fa9c8be4-c5d2-411c-9536-22d17f683da3", }, "Myers Kemptville Chev Buick GMC": { apiKey: "6da46e29-a7e3-4a5f-85b0-a46ca4146045/1bebf440-9e4d-4a04-8f3f-f66ae1b5270d", businessID: "948f51b6-6c91-4f5d-8f2c-bf7c55ddca35", }, "Myers Manotick Dodge Jeep Ram Chrysler": { apiKey: "6da46e29-a7e3-4a5f-85b0-a46ca4146045/e2ee5012-31c8-4caa-bb65-0665b32346cb", businessID: "48a2def5-51d5-4b3c-9ec7-3109f974202a", }, "Myers Orleans Chev Buick GMC": { apiKey: "6da46e29-a7e3-4a5f-85b0-a46ca4146045/a2cf2f2f-af91-484d-8c95-4becd001e3b4", businessID: "810566c5-87cb-489d-86f9-b0092bc596f1", }, "Myers Orleans Nissan": { apiKey: "6da46e29-a7e3-4a5f-85b0-a46ca4146045/8c1a2c19-2960-4f58-a7da-96d5c643102e", businessID: "1e71ee49-ccec-4561-b1c9-7ced6a07dccb", }, "Myers Ottawa Nissan": { apiKey: "6da46e29-a7e3-4a5f-85b0-a46ca4146045/87e43892-70c5-4ebf-b482-acfc73c862c2", businessID: "e4eba065-c01f-42a2-84d8-78d073a6fc20", }, "Myers Volkswagen": { apiKey: "6da46e29-a7e3-4a5f-85b0-a46ca4146045/5ce8f006-641f-43c2-a0b1-dc44220ed80d", businessID: "a1d5d2cb-7009-4f34-a0cd-e37729026478", }, }]; let vehicleLocation = vehiclesVue.$children[0].vehicle.company_data.company_name; //Loop through dealership IDs and if matches the VDP inventory ID apply that dealership's Tradesii info. for ( dealership in dealershipIDs[0] ) { if( vehicleLocation && vehicleLocation === dealership) { let autoVerifyScript = document.createElement('script'); autoVerifyScript.type = 'text/javascript'; autoVerifyScript.src = `https://sdk.autoverify.com/${dealershipIDs[0][dealership]['apiKey'] }/sdk.min.js`; // autoVerifyScript.src = dealershipIDs[0][dealership]['apiUrl']; autoVerifyScript.id = "autoVerifyScript"; // Append AutoVerify Script to Head. document.getElementsByTagName('head')[0].appendChild(autoVerifyScript); // Change Business ID in the VDP AutoVerify Div. let autoverifyDiv = document.getElementsByClassName( 'av_tradein_root')[0]; if(autoverifyDiv) { autoverifyDiv.dataset.avPartnerBusinessId = dealershipIDs[0][dealership]['businessID']; } }; }; }; $('
').appendTo('.home-page .header'); /* Mithila - 01691555 */ /* START - Add Lease Calculator */ if (document.querySelector('.vdp-wrapper')) { window.addEventListener('load', function() { let script1 = document.createElement('script'); script1.setAttribute('src', 'https://automediaservices.com/apps/calculator/lease_calculator.js'); script1.setAttribute('type','text/javascript'); document.querySelector('head').insertAdjacentElement('afterbegin',script1); let vin = vmsData.vehicle.vin; let division = document.createElement('div'); division.setAttribute('id','aim_lease_calculator'); division.setAttribute('vin', vin); division.setAttribute('widget_background','bf172e'); division.setAttribute('apply_boostrap','0'); division.setAttribute('open_in_window','1'); if (document.querySelector('.button-group')) { document.querySelector('.button-group').insertAdjacentElement('beforebegin',division); } }); } /* END - Add Lease Calculator */ /* Mithila - 01691555 */ /* Mithila - SR00291139 */ /* START - Add Oribi Tracking Script */ let oribiScript = document.createElement("script"); oribiScript.type = "application/javascript"; oribiScript.async = true; oribiScript.innerHTML = `(function(b,o,n,g,s,r,c){if(b[s])return;b[s]={};b[s].scriptToken="XzcyNDk3NTQ1MA";b[s].callsQueue=[];b[s].api=function(){b[s].callsQueue.push(arguments);};r=o.createElement(n);c=o.getElementsByTagName(n)[0];r.async=1;r.src=g;r.id=s+n;c.parentNode.insertBefore(r,c);})(window,document,"script","https://cdn.oribi.io/XzcyNDk3NTQ1MA/oribi.js","ORIBI")`; document.querySelector('head').insertAdjacentElement('beforeend',oribiScript); /* END - Add Oribi Tracking Script */ /* Mithila - SR00291139 */ /* Mithila */ /* START - Change Dropdown option in SRPs */ $(window).load(function() { if (document.querySelector('.srp-wrapper')) { if ($('div[convertus-data-id="srp__filter--Myers Barrhaven Nissan"]')) { $('div[convertus-data-id="srp__filter--Myers Barrhaven Nissan"]')[0].lastChild.textContent = jQuery('div[convertus-data-id="srp__filter--Myers Barrhaven Nissan"]')[0].lastChild.textContent.replace("Barrhaven", "Ottawa"); } } }); /* END - Change Dropdown option in SRPs */ /* Mithila */ if (document.querySelector('.home-page')) { if (document.querySelector('.desktop-locations__icon, #tns1-item12')) { $('.desktop-locations__icon:last-child img').attr('src', '/wp-content/uploads/sites/3/2020/08/Volkswagen-logo-2019-1500x1500-1-e1598549548194.png') $('#tns1-item12 div img').attr('src', '/wp-content/uploads/sites/3/2020/08/Volkswagen-logo-2019-1500x1500-1-e1598549548194.png') } } /* SL01789713 Steal of the week */ /* Yogesh SR00313981 */ window.addEventListener('load', function() { if (window.location.pathname === "/steal-of-the-week/" || window.location.pathname === "/new-steal-of-the-week/") { var vehicleCard = document.querySelectorAll('.show-inventory__wrap .g-vehicle-card .g-vehicle-card__location'); for (var i = 0; i < vehicleCard.length; i++) { let location = vehicleCard[i].innerHTML; switch (location) { case "Myers Barrhaven Nissan": vehicleCard[i].innerHTML = 'www.myersbarrhavennissan.ca'; break; case "Myers Kanata Nissan": vehicleCard[i].innerHTML = 'www.myerskanatanissan.ca'; break; case "Myers Orléans Nissan": vehicleCard[i].innerHTML = 'www.myersnissan.ca'; break; case "Myers Orleans Nissan": vehicleCard[i].innerHTML = 'www.myersnissan.ca'; break; case "Myers Ottawa Nissan": vehicleCard[i].innerHTML = 'www.myersottawanissan.ca'; break; case "Myers Barrhaven Toyota": vehicleCard[i].innerHTML = 'www.myersbarrhaventoyota.ca'; break; case "Myers Barrhaven Hyundai": vehicleCard[i].innerHTML = 'www.myersbarrhavenhyundai.com'; break; case "Myers Kanata Hyundai": vehicleCard[i].innerHTML = 'www.myerskanatahyundai.com'; break; case "Myers Infiniti": vehicleCard[i].innerHTML = 'www.myersinfiniti.ca'; break; case "Myers Manotick Dodge Jeep Ram Chrysler": vehicleCard[i].innerHTML = 'www.myersmanotickdodge.com'; break; case "Myers Orleans Chev Buick GMC": vehicleCard[i].innerHTML = 'www.myersorleansgm.ca'; break; case "Myers Kanata Chev Buick GMC": vehicleCard[i].innerHTML = 'www.myerskanatagm.ca'; break; case "Myers Cadillac Chev Buick GMC": vehicleCard[i].innerHTML = 'www.myerscadillacgm.ca'; break; case "Myers Kemptville Chev Buick GMC": vehicleCard[i].innerHTML = 'www.myerskemptvillegm.ca'; break; case "Myers Kanata Volkswagen": vehicleCard[i].innerHTML = 'www.myersvw.ca'; break; case "Myers Hunt Club Volkswagen": vehicleCard[i].innerHTML = ' https://www.huntclubvw.ca/en'; break; case "Myers Barrhaven Volkswagen": vehicleCard[i].innerHTML = ' https://www.barrhavenvw.ca/en'; break; /* KB | 02088928 - 17/06/2022 */ case "Myers Kanata Chev Buick GMC.": vehicleCard[i].innerHTML = 'www.myerskanatagm.ca/'; break; case "Myers Orléans Chevrolet Buick GMC": vehicleCard[i].innerHTML = 'www.myersorleansgm.ca/'; break; case "Myers Kemptville Chev Buick GMC": vehicleCard[i].innerHTML = 'www.myerskemptvillegm.ca/'; break; case "Myers Cadillac Chev Buick GMC": vehicleCard[i].innerHTML = 'www.myerscadillacgm.ca/'; break; /* END - KB | 02088928 */ /* PO | 02140859 - 30/09/2022 */ case "Myers Cadillac": vehicleCard[i].innerHTML = 'https:www.myerscadillac.ca'; break; /* END - PO | 02140859 */ case 0: vehicleCard[i].HTML = 'nope'; } } } }); /* Yogesh SR00313981 */ /* ES - 01811534 - Start */ if (document.querySelector('.page-template-template-win-your-tires')) { jQuery("#myers-contest-form-container").before('

The contest is closed

') } /* ES - 01811534 - End */ /* NM VDP Disclaimer*/ if(document.querySelector('.vdp-wrapper')) { if(vmsData.vehicle.make === "INFINITI"){ $('.button-group__button[href="https://www.myers.ca/myers-engine-transmission-life/"]').css('display', 'none') } } /* CC300431 * AODA - REPLACE LABEL TEXT * 4/19/21 */ if($('.page-id-42166').length > 0 ){ var target = document.querySelector('body'); console.log(target); var observer = new MutationObserver(function(mutations) { $('.g-vehicle-card__details-list > .g-vehicle-card__details-single:last-child .price-block__label').each(function(){ $(this).text('Myers Price'); }) }) var config = { childList: true, subtree: false, }; observer.observe(target, config); observer.disconnect(); observer.observe(target, config); } /* Yogesh SR00314710 */ if(document.querySelector('.vdp-wrapper')){ if(vmsData.vehicle.make === "INFINITI"){ document.querySelector('.vdp-sidebar-disclaimer').style.display = "none"; } } /* Yogesh SR00314710 */ /* Kayla | SR00324868 - add disclaimer to VDP sidebar */ jQuery('.vdp_button_widget-11.vdp-button-1').after('
*Does not apply to vehicles older than 8 years or vehicles with 140,000 km
'); /* END Kayla | SR00324868 */ /*Azool Hirani 4 july 2022 SR00342656 Adding pre order button*/ let txtSales = document.createElement("a"); txtSales.setAttribute("href", "/pre-order-a-car-or-truck/"); txtSales.setAttribute("class", "text-us txt-button"); txtSales.setAttribute("id", "text-sales"); txtSales.setAttribute("data-style", "default"); txtSales.setAttribute("data-type", "default"); txtSales.setAttribute("data-language", "en-CA"); txtSales.innerText = "Don't see what you want? Pre-Order Now!"; if (document.querySelector('.srp-wrapper')) { if (vmsData.saleClass === "new"){ document.querySelector('header').insertAdjacentElement('afterend',txtSales); } } /* Styling for detailing-services page - Daoxi Sun - 2022/Oct/11 */ $(".page-id-57772 .hero_widget-8.hero-1 .hero-widget .icon-buttons__single").attr('target', '_blank'); /* Make buttons open in new tabs */ /*End */ /*Azool Hirani SR00346303 21 october*/ const a=$(".vdp_button_widget-13 a").find(); a.prevObject[0].style.backgroundColor="green"; a.prevObject[0].style.border="0px solid green"; const b=$(".vdp_button_widget-2 a").find(); b.prevObject[0].style.backgroundColor="green"; b.prevObject[0].style.border="0px solid green"; const c=$(".vdp_button_widget-9 a").find(); c.prevObject[0].style.backgroundColor="#d41f38"; c.prevObject[0].style.border="0px solid #d41f38"; c.prevObject[0].style.color="white"; const d=$(".vdp_button_widget-5 a").find(); d.prevObject[0].style.backgroundColor="#d41f38"; d.prevObject[0].style.border="0px solid #d41f38"; d.prevObject[0].style.color="white"; const e=$(".vdp_button_widget-6 a").find(); e.prevObject[0].style.backgroundColor="#d41f38"; e.prevObject[0].style.border="0px solid #d41f38"; e.prevObject[0].style.color="white"; /*End Azool Hirani SR00346303 21 october*/ });