Add payment methods to subscribe dialog

And update level counts in subscription breakdown.
This commit is contained in:
Matt Lott 2015-04-07 15:54:55 -07:00
parent 8e715560c2
commit f3c973b945
4 changed files with 37 additions and 2 deletions

View file

@ -399,9 +399,9 @@
subscribe: subscribe:
comparison_blurb: "Sharpen your skills with a CodeCombat subscription!" comparison_blurb: "Sharpen your skills with a CodeCombat subscription!"
feature1: "60+ basic levels across 4 worlds" feature1: "80+ basic levels across 4 worlds" # {change}
feature2: "7 powerful <strong>new heroes</strong> with unique skills!" feature2: "7 powerful <strong>new heroes</strong> with unique skills!"
feature3: "30+ bonus levels" feature3: "50+ bonus levels" # {change}
feature4: "<strong>3500 bonus gems</strong> every month!" feature4: "<strong>3500 bonus gems</strong> every month!"
feature5: "Video tutorials" feature5: "Video tutorials"
feature6: "Premium email support" feature6: "Premium email support"
@ -429,6 +429,10 @@
parents_blurb1: "With CodeCombat, your child learns by writing real code. They start by learning simple commands, and progress to more advanced topics." parents_blurb1: "With CodeCombat, your child learns by writing real code. They start by learning simple commands, and progress to more advanced topics."
parents_blurb2: "For $9.99 USD/mo, they get new challenges every week and personal email support from professional programmers." parents_blurb2: "For $9.99 USD/mo, they get new challenges every week and personal email support from professional programmers."
parents_blurb3: "No Risk: 100% money back guarantee, easy 1-click unsubscribe." parents_blurb3: "No Risk: 100% money back guarantee, easy 1-click unsubscribe."
payment_methods: "Payment Methods"
payment_methods_title: "Accepted Payment Methods"
payment_methods_blurb1: "We currently accept credit cards, Alipay, and bitcoins."
payment_methods_blurb2: "If you require an alternate form of payment, please contact"
stripe_description: "Monthly Subscription" stripe_description: "Monthly Subscription"
subscription_required_to_play: "You'll need a subscription to play this level." subscription_required_to_play: "You'll need a subscription to play this level."
unlock_help_videos: "Subscribe to unlock all video tutorials." unlock_help_videos: "Subscribe to unlock all video tutorials."

View file

@ -118,6 +118,20 @@
font-family: $headings-font-family font-family: $headings-font-family
font-size: 18px font-size: 18px
//- Payment methods info popover link
#payment-methods-info
position: absolute
right: 38px
top: 389px
text-decoration: underline
cursor: pointer
font-weight: bold
line-height: 18px
color: black
font-family: $headings-font-family
font-size: 18px
//- Purchase button //- Purchase button
.purchase-button .purchase-button

View file

@ -71,6 +71,7 @@
td.center-ok td.center-ok
span.glyphicon.glyphicon-ok span.glyphicon.glyphicon-ok
#parents-info(data-i18n="subscribe.parents") #parents-info(data-i18n="subscribe.parents")
#payment-methods-info(data-i18n="subscribe.payment_methods")
button.btn.btn-lg.btn-illustrated.purchase-button(data-i18n="subscribe.subscribe_title") button.btn.btn-lg.btn-illustrated.purchase-button(data-i18n="subscribe.subscribe_title")
button.btn.btn-lg.btn-illustrated.parent-button(data-i18n="subscribe.parent_button") button.btn.btn-lg.btn-illustrated.parent-button(data-i18n="subscribe.parent_button")

View file

@ -37,6 +37,7 @@ module.exports = class SubscribeModal extends ModalView
super() super()
@setupParentButtonPopover() @setupParentButtonPopover()
@setupParentInfoPopover() @setupParentInfoPopover()
@setupPaymentMethodsInfoPopover()
setupParentButtonPopover: -> setupParentButtonPopover: ->
popoverTitle = $.i18n.t 'subscribe.parent_email_title' popoverTitle = $.i18n.t 'subscribe.parent_email_title'
@ -85,6 +86,21 @@ module.exports = class SubscribeModal extends ModalView
).on 'shown.bs.popover', => ).on 'shown.bs.popover', =>
application.tracker?.trackEvent 'Subscription parent hover' application.tracker?.trackEvent 'Subscription parent hover'
setupPaymentMethodsInfoPopover: ->
popoverTitle = $.i18n.t('subscribe.payment_methods_title')
popoverContent = "<p>" + $.i18n.t('subscribe.payment_methods_blurb1') + "</p>"
popoverContent += "<p>" + $.i18n.t('subscribe.payment_methods_blurb2') + " <a href='mailto:support@codecombat.com'>support@codecombat.com</a>."
@$el.find('#payment-methods-info').popover(
animation: true
html: true
placement: 'top'
trigger: 'click'
title: popoverTitle
content: popoverContent
container: @$el
).on 'shown.bs.popover', =>
application.tracker?.trackEvent 'Subscription payment methods hover'
onClickParentSendButton: (e) -> onClickParentSendButton: (e) ->
# TODO: Popover sometimes dismisses immediately after send # TODO: Popover sometimes dismisses immediately after send