Skip to content

Instantly share code, notes, and snippets.

@msmithstubbs
Created January 6, 2013 18:03
Show Gist options
  • Select an option

  • Save msmithstubbs/4469055 to your computer and use it in GitHub Desktop.

Select an option

Save msmithstubbs/4469055 to your computer and use it in GitHub Desktop.
Back In Stock integration for http://www.babeetalk.com/
<script>
var create_callback = function(data) {
if (data.status == 'OK')
{ alert(data.message) }
else {
var msg = [];
for (var i in data.errors) {
msg.push(data.errors[i]);
}
alert(msg.join("\n"));
}
}
$('#notify_button').click(function() {
BISPopover.create($('#notify_email').val(), {{product.variants.first.id}}, {{product.id}}).then(create_callback);
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment