Created
March 3, 2015 11:41
-
-
Save msmithstubbs/6f2a9d1f8a3d601c56ae to your computer and use it in GitHub Desktop.
Set customer email address for Back in Stock modal
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
{% if customer.email %} | |
<script> | |
$(document).load(function() { // wait for app JS to load | |
BISPopover.ready.then(function() { // wait for Back in Stock to create the iframe | |
var iframe = $('#BIS_frame').get(0); // find the iframe | |
if (iframe) { | |
$(iframe.contentDocument).find("#email_address").val('{{customer.email}}'); // set the email address field in the iframe | |
} | |
}) | |
}) | |
</script> | |
{% endif } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment