Last active
February 7, 2017 07:38
-
-
Save makfruit/505436554f63efd01d7c to your computer and use it in GitHub Desktop.
An HTML/JS snippet for Ecwid to display wholesale pricing block (bulk pricing) explanded by default on the product detail pages
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
<!-- | |
An HTML/JS snippet for Ecwid to display wholesale pricing block (bulk pricing) explanded by default on the product detail pages | |
Put this code after Ecwid integration code on your site | |
--> | |
<script src="https://code.jquery.com/jquery-1.11.3.js"></script> | |
<script type="text/javascript"> | |
Ecwid.OnPageLoaded.add(function(page){ | |
if (page.type == "PRODUCT") { | |
setTimeout( | |
function () { | |
jQuery(".ecwid-productBrowser-details-wholesale-qty").first().trigger('click'); | |
}, | |
1000 | |
); | |
} | |
}) | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment