<!--settings{"comment":"","cartClass":"mycart","priceClass":"myprice","amountClass":"mycount","emptyCartLink":"https://7emenovi4.ru/","textBeforePrice":"сумма:","showAmountOfZero":"0","showPriceOfZero":"0","showIconCartMobile":"0","useStandartPriceLabel":"0","scaleOnHoverOff":""}settingsend--> <style> .mycount, .myprice { display: none; user-select: none; } .mycart { height: inherit; cursor: pointer; } @media screen and (min-width: 981px) { .t706__carticon-wrapper, .t706__carticon { display: none; } } .t706__carticon-wrapper, .t706__carticon { display: none !important; } .nolimElem { pointer-events: none; } .cartcopyanim { -webkit-animation: nolim__pulse-anim 0.6s; animation: nolim__pulse-anim 0.6s; } @-webkit-keyframes nolim__pulse-anim { 0% { -webkit-transform: scale(1) } 60% { -webkit-transform: scale(1.25) } 100% { -webkit-transform: scale(1) } } @keyframes nolim__pulse-anim { 0% { -webkit-transform: scale(1); transform: scale(1) } 60% { -webkit-transform: scale(1.25); transform: scale(1.25) } 100% { -webkit-transform: scale(1); transform: scale(1) } } </style> <script> (function(){ function t_ready(e) { "loading" != document.readyState ? e() : document.addEventListener ? document.addEventListener("DOMContentLoaded", e) : document.attachEvent("onreadystatechange", (function() { "loading" != document.readyState && e() } )) } t_ready(function() { var totalCart; var hideMode = false; var counthide = 0; var pricehide = 0; let a = setInterval(function() { let myCartElemsAtomList = document.querySelectorAll('.mycart .tn-atom'); if (myCartElemsAtomList.length > 0) { clearInterval(a); findCart010(); } }, 50); setTimeout(function() { clearInterval(a); }, 10000); function findCart010() { let myCartElemsList = document.querySelectorAll(".mycart"); let myCartElemsAtomList = document.querySelectorAll('.mycart .tn-atom'); let amountElemsList = []; let amountElemsAtomList = []; let priceElemsList = []; let priceElemsAtomList = []; myCartElemsList.forEach(function(item) { if (item.getAttribute("data-elem-type") == "image") { let img = item.querySelector(".tn-atom__img"); item.style.height = img.height + "px"; } if (item.getAttribute("data-elem-type") == "vector") { let vector = item.querySelector(".tn-atom__vector svg"); let rect = vector.getBoundingClientRect(); item.style.height = rect.height + "px"; } }); myCartElemsList.forEach(function(item) { item.addEventListener('click', function(e) { e.preventDefault(); let int = setInterval(function() { if (window.tcart){ clearInterval(int); if (window.tcart.total == 0) { if ("https://7emenovi4.ru/" && document.querySelectorAll('[href="https://7emenovi4.ru/"]')) { document.querySelectorAll('[href="https://7emenovi4.ru/"]')[0].click(); } } else { tcart__openCart(); } } }, 50); }); }); function checkCartCursor() { let int = setInterval(function() { if (window.tcart) { clearInterval(int); if (window.tcart.total == 0 && !"https://7emenovi4.ru/") { myCartElemsList.forEach(function(item) { item.style.pointerEvents = 'none'; }); } else { myCartElemsList.forEach(function(item) { item.style.pointerEvents = 'all'; }); } } }, 50); } checkCartCursor(); function checkAmount() { let int = setInterval(function() { if (window.tcart) { clearInterval(int); let chCounter = window.tcart.total; if (chCounter == 0) { if (counthide == 1) { amountElemsList.forEach(function(item) { item.style.setProperty("display", "none", "important"); }); } else { amountElemsList.forEach(function(item) { item.style.setProperty("display", "table", "important"); }); } } else { amountElemsList.forEach(function(item) { item.style.setProperty("display", "table", "important"); }); } amountElemsAtomList.forEach(function(item) { item.innerHTML = chCounter; }); if (chCounter == '') { amountElemsAtomList.forEach(function(item) { item.innerHTML = '0'; }); } } }, 50); } function checkPrice() { let int = setInterval(function() { if (window.tcart) { clearInterval(int); let chCounter = window.tcart.total; let chPrice = window.tcart.prodamount; if (chPrice == 0) { if (pricehide == 1) { priceElemsList.forEach(function(item) {
item.style.setProperty("display", "none", "important"); }); } else { priceElemsList.forEach(function(item) { item.style.setProperty("display", "table", "important"); }); } priceElemsAtomList.forEach(function(item) { item.innerHTML = 'сумма: ' + ' 0' + window.tcart.currency_txt_r; }); } else { priceElemsList.forEach(function(item) { item.style.setProperty("display", "table", "important"); }); priceElemsAtomList.forEach(function(item) { item.textContent = 'сумма: ' + chPrice + window.tcart.currency_txt_r; }); } if (chCounter == 0) { priceElemsAtomList.forEach(function(item) { item.classList.add('nolimElem'); }); } else { priceElemsAtomList.forEach(function(item) { item.classList.remove('nolimElem'); }); } } }, 50); } let cartInt = setInterval(function() { if (window.tcart) { if (totalCart == undefined) { totalCart = window.tcart.total; } else { let totalCart2 = window.tcart.total; if (totalCart2 != totalCart) { totalCart = totalCart2; setTimeout(function() { checkCartCursor(); if (amountElemsAtomList.length > 0) { checkAmount(); } if (priceElemsAtomList.length > 0) { checkPrice(); } myCartElemsAtomList.forEach(function(item) { item.classList.add('cartcopyanim'); }); setTimeout(function() { myCartElemsAtomList.forEach(function(item) { item.classList.remove('cartcopyanim'); }); }, 1000); }, 100); } } } }, 50); let b = setInterval(function() { if (document.querySelectorAll('.mycount .tn-atom').length > 0) { clearInterval(b); amountElemsList = document.querySelectorAll('.mycount'); amountElemsAtomList = document.querySelectorAll('.mycount .tn-atom'); checkAmount(); } }, 50); setTimeout(function() { clearInterval(b); }, 10000); let c = setInterval(function() { if (document.querySelectorAll('.myprice .tn-atom').length > 0) { clearInterval(c); priceElemsList = document.querySelectorAll('.myprice'); priceElemsAtomList = document.querySelectorAll('.myprice .tn-atom'); priceElemsAtomList.forEach(function(item) { if (item.textContent == 'Click to order') { item.textContent = ''; } }); checkPrice(); } }, 50); setTimeout(function() { clearInterval(c); }, 10000); } }); })() </script> <a href="https://7emenovi4.ru/" style="display:block"></a>