Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<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