Added MakerSquare email offer. Not emailing subscribers with next-steps offers.

This commit is contained in:
Nick Winter 2015-03-24 17:08:50 -07:00
parent 7ebb2d0200
commit 5bc58ce996

View file

@ -723,12 +723,14 @@ sendNextStepsEmail = (user, now, daysAgo) ->
'talent-buddy': isAdult 'talent-buddy': isAdult
'coding-campus': isAdult and Math.random() < 0.5 # TODO: geodetect UT and give priority 'coding-campus': isAdult and Math.random() < 0.5 # TODO: geodetect UT and give priority
'viking': isAdult and isFast 'viking': isAdult and isFast
'maker-square': isAdult and isFast
#'mv-code-club': isKid # TODO: geodetect, get landing page URL #'mv-code-club': isKid # TODO: geodetect, get landing page URL
nAdditionalOffers = 4 - _.filter(offers).length nAdditionalOffers = 4 - _.filter(offers).length
possibleAdditionalOffers = ['code-school', 'one-month', 'learnable', 'pluralsight'] possibleAdditionalOffers = ['code-school', 'one-month', 'learnable', 'pluralsight']
for offer in _.sample possibleAdditionalOffers, nAdditionalOffers for offer in _.sample possibleAdditionalOffers, nAdditionalOffers
offers[offer] = true offers[offer] = true
# TODO: adjust template to not include any offers if user.isPremium() if user.isPremium()
offers = null
# TODO: do something with the preferredLanguage? # TODO: do something with the preferredLanguage?
context = context =
email_id: sendwithus.templates.next_steps_email email_id: sendwithus.templates.next_steps_email