NikolayBezay

Hotmobile(total cart price)

Dec 14th, 2020
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.55 KB | None | 0 0
  1.  
  2. <script>
  3. (function() {
  4.     var checkingTheCart = setInterval(function() {
  5.         var cartPriseElement = document.querySelector('.cart-totals-wrapper tfoot SPAN.price');
  6.         if (cartPriseElement && adoric) {
  7.            clearInterval(checkingTheCart);
  8.             var cartTotalPrice = cartPriseElement.textContent.replace('₪', '').replace(',','');
  9.             window.adoricCartTotalPrice = parseInt(cartTotalPrice);
  10.         }
  11.  
  12.     }, 1000);
  13.     setTimeout(function() {
  14.         clearInterval(checkingTheCart);
  15.     }, 10000);
  16. })();
  17. </script>
Advertisement
Add Comment
Please, Sign In to add comment