//promo start/end date var startDate = isDateBeforeToday(new Date("Sun Apr 14 2024")); var endDate = isDateAfterToday(new Date("Thu May 2 2024")); //get url to check language var url = location.href; var id = '<%= product.mpn %>'; var repo = document.getElementById("repo").getAttribute("flag"); //mpn cashback $100 var prod0 = "3380C002"; var prod1 = "3380C132"; var prod2 = "6128C002"; var prod3 = "x"; //mpn cashback $150 var prod4 = "5137C002"; var prod5 = "5137C009"; var prod6 = "5668C002"; function isDateBeforeToday(date) { return new Date(date.toDateString()) < new Date(new Date().toDateString()); } function isDateAfterToday(date) { return new Date(date.toDateString()) > new Date(new Date().toDateString()); } if (startDate && endDate) { if (repo == "on") { if (id == prod0 || id == prod1 || id == prod2 || id == prod3) { canonCashback100(); } else if (id == prod4 || id == prod5 || id == prod6) { canonCashback150(); } } } //create image element function canonCashback100 () { var elem = document.createElement("img"); if (url.toString().includes("magasin")) { elem.setAttribute("src", "https://cdn.prod.website-files.com/5cdb2c0ad519d739e4dedf1e/661d4afb590d7cd9cb2c1890_canonCashback100.png"); } else { elem.setAttribute("src", "https://cdn.prod.website-files.com/5cdb2c0ad519d739e4dedf1e/661d4afb590d7cd9cb2c1890_canonCashback100.png"); } elem.setAttribute("height", "188"); elem.setAttribute("width", "200"); elem.setAttribute("alt", "Canon Promo Badge"); elem.setAttribute("class", "canonPromoBadge"); document.getElementsByClassName("dakis-product-images")[0].appendChild(elem); document.getElementById("demo").setAttribute("repo", "off"); } function canonCashback150 () { var elem = document.createElement("img"); if (url.toString().includes("magasin")) { elem.setAttribute("src", "https://cdn.prod.website-files.com/5cdb2c0ad519d739e4dedf1e/661d4afb92866134194fdec0_canonCashback150.png"); } else { elem.setAttribute("src", "https://cdn.prod.website-files.com/5cdb2c0ad519d739e4dedf1e/661d4afb92866134194fdec0_canonCashback150.png"); } elem.setAttribute("height", "188"); elem.setAttribute("width", "200"); elem.setAttribute("alt", "Canon Promo Badge"); elem.setAttribute("class", "canonPromoBadge"); document.getElementsByClassName("dakis-product-images")[0].appendChild(elem); document.getElementById("demo").setAttribute("repo", "off"); } function canonFreeClass () { var elem = document.createElement("img"); if (url.toString().includes("magasin")) { elem.setAttribute("src", "https://irp.cdn-website.com/14aefc77/dms3rep/multi/canon-course-badge-fr.png"); } else { elem.setAttribute("src", "https://irp.cdn-website.com/14aefc77/dms3rep/multi/canon-course-badge-fr.png"); } elem.setAttribute("height", "200"); elem.setAttribute("width", "250"); elem.setAttribute("alt", "Canon Promo Badge"); elem.setAttribute("class", "canonPromoBadge"); document.getElementsByClassName("dakis-product-images")[0].appendChild(elem); document.getElementById("demo").setAttribute("repo", "off"); } function canonFreeBattery () { var elem = document.createElement("img"); if (url.toString().includes("magasin")) { elem.setAttribute("src", "https://irp.cdn-website.com/14aefc77/dms3rep/multi/canon-battery-badge-fr.png"); } else { elem.setAttribute("src", "https://irp.cdn-website.com/14aefc77/dms3rep/multi/canon-battery-badge-fr.png"); } elem.setAttribute("height", "200"); elem.setAttribute("width", "250"); elem.setAttribute("alt", "Canon Promo Badge"); elem.setAttribute("class", "canonPromoBadge"); document.getElementsByClassName("dakis-product-images")[0].appendChild(elem); document.getElementById("demo").setAttribute("repo", "off"); }

Spécifications du produit

//promo start/end date var startDate = isDateBeforeToday(new Date("Fri Aug 16 2024")); var endDate = isDateAfterToday(new Date("Thu Sep 26 2024")); //get url to check language var url = location.href; var id = '<%= product.mpn %>'; var repo = document.getElementById("repo").getAttribute("flag"); //mpn cashback $250 var prod0 = "3987C002"; var prod1 = "4514C002"; var prod2 = "4318C002"; var prod3 = "5776C002"; var prod4 = "3792C002"; var prod5 = "4112C002"; var prod6 = "3380C002"; var prod7 = "3380C132"; function isDateBeforeToday(date) { return new Date(date.toDateString()) < new Date(new Date().toDateString()); } function isDateAfterToday(date) { return new Date(date.toDateString()) > new Date(new Date().toDateString()); } if (startDate && endDate) { if (repo == "on") { if (id == prod0 || id == prod1 || id == prod2 || id == prod3) { canonCashback250(); } else if (id == prod4 || id == prod5 || id == prod6 || id == prod7) { canonCashback250(); } } } //create image element function canonCashback250 () { var elem = document.createElement("img"); if (url.toString().includes("magasin")) { elem.setAttribute("src", "https://cdn.prod.website-files.com/5cdb2c0ad519d739e4dedf1e/66c48e95fe49b376ad54007f_canonCashback250.jpg"); } else { elem.setAttribute("src", "https://cdn.prod.website-files.com/5cdb2c0ad519d739e4dedf1e/66c48e95fe49b376ad54007f_canonCashback250.jpg"); } elem.setAttribute("height", "150"); elem.setAttribute("width", "150"); elem.setAttribute("alt", "Canon Promo Badge"); elem.setAttribute("class", "canonPromoBadge"); document.getElementsByClassName("dakis-product-images")[0].appendChild(elem); document.getElementById("demo").setAttribute("repo", "off"); }
<% console.log(product) %>

.

.
.
Prix:
Financement disponible par logo financement flexiti
var totalPrice = <%= product.finalPrice %>; if(totalPrice > 299.99) { $("#flexitidiv").css("display", "block"); }
Ajouter au panier

GARANTIE DE PRIX - ÉCRIVEZ-NOUS POUR AVOIR LE MEILLEUR PRIX!

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
var prodName = '<%= product.name %>'; var prodUrl = '<%= url %>'; document.getElementById("Product-URL").value = prodUrl; document.getElementById("Product-Name").value = prodName;