Skip to content

Instantly share code, notes, and snippets.

@kalenjordan
Last active November 19, 2015 20:34
Show Gist options
  • Save kalenjordan/8d3da90ef7ebca6b44d1 to your computer and use it in GitHub Desktop.
Save kalenjordan/8d3da90ef7ebca6b44d1 to your computer and use it in GitHub Desktop.
<script>
MageMailData = typeof(MageMailData) != 'undefined' ? MageMailData : {};
MageMailData.beforeInit = function() {
var cookies = new MageMail_Cookies();
var coupon = cookies.get('mm_coupon');
if (!coupon || coupon == '') {
MageMail_Magento.applyCouponToCart('BLACK_FRIDAY_10_OFF', 'custom_javascript');
cookies.set('mm_countdown', '2015-11-07T04:00:00+00:00'); // UTC
MageMail_Magento.setupCountdownTimer();
}
};
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment