',queueOver:"Thanks for waiting! Our full site is now available for online shopping.",browseModeWithWebForm:'
We’re sorry, our site is unable to accept online orders at this time. You can continue to browse this site and have been placed in a queue. You will be notified when our full site becomes available.
To request a phone order click here.
'},fr:{browseModeNoWebForm:"
Nous sommes désolés, notre site n'est pas en mesure d'accepter les commandes en ligne pour le moment. Vous pouvez continuer à naviguer sur ce site et vous avez été placé(e) dans une file d'attente. Nous vous informerons lorsque notre site sera complètement disponible.
",queueOver:"Merci d’avoir patienté! Notre site peut maintenant recevoir des commandes en ligne.",browseModeWithWebForm:'
Nous sommes désolés, notre site n\'est pas en mesure d\'accepter les commandes en ligne pour le moment. Vous pouvez continuer à naviguer sur ce site et vous avez été placé(e) dans une file d\'attente. Nous vous informerons lorsque notre site sera complètement disponible.
cliquez ici afin de passer une commande par téléphone.
'}};window.CTC_BROWSEMODE.BM.browseMode=P,window.CTC_BROWSEMODE.BM.addStores=function(e){sessionStorage.setItem("browsemodestoretolinkmap",JSON.stringify(e)),h=e,w&&"waiting"===x&&Q()};var x=null;window.CTC_BROWSEMODE.BM.reReadValuesFromStorage=function(){r=sessionStorage.getItem("maxwaittimetoshow")||30,p=sessionStorage.getItem("averageSessionDuration")||10,O=JSON.parse(sessionStorage.getItem("browsemodemessageoverride"))||O},window.CTC_BROWSEMODE.BM.updateWaitingMessage=Q;var C,k,S,T=!1;if(window.location.href.indexOf("pivpohs=true")>=0||document.cookie.indexOf(i)>=0)return console.log("CTC BM - VIP mode"),void M(i,"true",120);window.location.href.indexOf("bm=true")>=0||document.cookie.indexOf("browseonlyshopping=true")>=0?(console.log("CTC BM - forced BM"),q(),M(e,"true",15),s=!0,F()):document.cookie.indexOf(o)>=0&&document.cookie.indexOf(t)0&&(S=k[2]),S),10),F(),W()):document.cookie.indexOf(n)>=0&&document.cookie.indexOf(t)=0&&(console.log("CTC BM - Wait room disabled"),M(t,"true",5))}function M(e,o,t){if(t){var i=new Date(Date.now()+60*t*1e3);document.cookie=e+"="+o+";expires="+i.toGMTString()+";path=/"}else document.cookie=e+"="+o+";path=/"}function W(){c=15,l=!0,d=setInterval(D,1e3),y()}function y(){!function(e,t){u=!0;var i=a[e];if(i)try{i.abort()}catch(e){}a[e]=new XMLHttpRequest,"withCredentials"in(i=a[e])?i.withCredentials=!0:i=new XDomainRequest;i.open("GET",t,!0),E()||i.setRequestHeader("x-td-content","json");i.onload=function(t){switch(a[e]=null,t.currentTarget.status){case 200:B(),z();break;default:break;case 503:if(E())M(o,r+1,10),F();else{var i=t.currentTarget.response||t.target.responseText,n=JSON.parse(i);if(!(m=n)||!m.QueuePosition||0>=m.QueuePosition)return void N();!function(){if(!m)return;!function(){if(!m)return;m.QueuePosition=Math.max(m.QueuePosition,1),m.QueuePosition>m.QueueLength&&(m.QueuePosition=m.QueueLength)}();var e=-1;0==m.PoolSize&&(e=r+1);if(m.PoolSize>0&&m.QueuePosition>0){var t=Math.round(m.QueuePosition/m.PoolSize*p);e=t0&&(M(o,e,10),F())}()}}u&&R()},i.send()}("poolinfo","https://wwwcanadiantireca.tdefender.net")}function E(){return/Edge/.test(navigator.userAgent)}function N(){l=!1,c=15,clearInterval(d),W()}function B(){l=!1,c=0}function R(e){c=e||15,l=!0}function D(){l&&0>--c&&(B(),y())}function q(){if(!b){var e=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");e.appendChild(o),o.type="text/css",o.appendChild(document.createTextNode('.stock-status--out-of-stock, .stock-status__need-more, .auto-sku-selector__input-wrapper--quantity, .email-signup__link, .mobile-megamenu__wishlist, .global-header__main-bar__utility-nav__flyer-toggle--wishlist, .wishlist-popup__atc-btn, .wishlist-header__atc-btn, .featured-product-item__add-to-cart, .store-availability-current-item__set-current-store-btn, .enterprise-mobile-account, .mobile-megamenu__ct-money, .mobile-megamenu__account, [data-facet-toggle="in-store-items"], .srp-sidebar__accordion-container #showonly, .global-header__main-bar__utility-nav__flyer-toggle--myctmoney, .component-toc, .enterprise-account__menu, .add-to-cart__button, .pdp-buy-box__tertiary-section, .sku-selectors__input-wrapper--quantity, .product-tile__action-link_add-to-cart, .search-result-product-tile_add-to-card_message, .delivery-options, .secondary-actions__button-text, .global-header__main-bar__utility-nav__user-cart__link, .product-tile-srp__action-link__inner, stock-status__action-links, .product-tile-srp__heart-icon, .shopping-list-item__sales-alert-button { display:none !important; } ')),b=!0}}function F(){v&&clearTimeout(v),window.$&&window.CTC&&CTC.getService?P():v=setTimeout(F,100)}function P(){if(w)Q();else{q();var e=function(){Q()};CTC.getService("core.communication.mediator").subscribe(CTC.EVENTS.STORE_CHANGE,e),w=!0,e()}}function I(){if(!g){var e=$('
');f=$('
');var o=$('
');-1==window.location.href.indexOf("/en/shopping-cart.html")&&-1==window.location.href.indexOf("/fr/panier-dachats.html")&&-1==window.location.href.indexOf("/fr/commande.html")&&-1==window.location.href.indexOf("/en/checkout.html")&&$("body").append(e),e.append(o),e.append(f),$(".browse-bar-close > span").click((function(){e.hide(),"allow"==x&&J()})),g=!0}}function V(e){var o=CTC.getService("core.data.store").getFavouriteStoreData();o&&!1===o.onlineOrdering?$(".browse-mode-bar-container").hide():($(".browse-mode-bar-container").show(),"waiting"===e&&x===e||(x=e,$(".browse-mode-bar-container").show()))}function Q(){var e,t=Math.ceil($.cookie(o)),i=CTC.getService("core.data.store").getFavouriteStoreData();if(window.location.href.indexOf("/en/")>=0||window.location.href.indexOf("/en.html")>=0){var n=O.en.browseModeNoWebForm;i&&h[i.storeNumber]&&(n=O.en.browseModeWithWebForm.replace(_,h[i.storeNumber])),s||!t||t>r?e='
'+n+"
":t>0&&(e='
'+n+'
approx time
'+t+" min
")}if(window.location.href.indexOf("/fr/")>=0||window.location.href.indexOf("/fr.html")>=0){n=O.fr.browseModeNoWebForm;i&&h[i.storeNumber]&&(n=O.fr.browseModeWithWebForm.replace(_,h[i.storeNumber])),s||!t||t>r?e='
'+n+"
":t>0&&(e='
'+n+'
temps approx.
'+t+" min
")}e&&(I(),f.html(e),V("waiting"))}function z(){if(b){if(v&&clearTimeout(v),!window.$||!$.cookie)return void(v=setTimeout(z,100));if(A(),function(){if(T)return;$.cookie(n,"true",{expires:new Date(Date.now()+3e5),path:"/"}),T=!0}(),I(),window.location.href.indexOf("/en/")>=0||window.location.href.indexOf("/en.html")>=0){var e='
'+O.en.queueOver+'
';f.html(e)}if(window.location.href.indexOf("/fr/")>=0||window.location.href.indexOf("/fr.html")>=0){e='
'+O.fr.queueOver+'
';f.html(e)}V("allow"),$(".browse-mode-goToFullSite").click(J)}}function J(){A(),location.reload()}function A(){$.cookie(e,"",{expires:-1,path:"/"}),$.cookie(o,"",{expires:-1,path:"/"})}}();
Filter