Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- (function() {
- var waitPageTriggerElement = setInterval(function() {
- var totalCartValue = document.querySelector('#header_cart .sum_all_items_price .pos_1');
- if (totalCartValue) {
- clearInterval(waitPageTriggerElement);
- totalCartValue = totalCartValue.textContent.replace('₪', '');
- window.localStorage.setItem('adoricTotalCartSum', totalCartValue);
- } else {
- window.localStorage.setItem('adoricTotalCartSum', 0);
- }
- console.log(window.localStorage.getItem('adoricTotalCartSum'));
- }, 500);
- setTimeout(function() {
- clearInterval(waitPageTriggerElement);
- }, 10000);
- })();
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement