Created
March 29, 2022 15:38
-
-
Save swym-public/b98033cbc4aeed191d60ccd45e9285dc to your computer and use it in GitHub Desktop.
swym-wishlist counter.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script class="swym-wishlist-header-counter-custom"> | |
function renderWishlistCounter(swat) { | |
var counter_elem = document.querySelectorAll(".swym-wishlist-header-counter"); /* Custom header can be added here.*/ | |
if (counter_elem) { | |
for (var i = 0; i < counter_elem.length; i++) { | |
if (swat.renderWishlistCount) { | |
swat.renderWishlistCount(counter_elem[i], function(count, element) { | |
console.log("debug - renderWishlistCount", count, element); | |
}); | |
} | |
} | |
} | |
} | |
if (!window.SwymCallbacks) { | |
window.SwymCallbacks = []; | |
} | |
window.SwymCallbacks.push(renderWishlistCounter); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment