Offering free trial even if you already have an account, as long as rate plan is 0.
This commit is contained in:
parent
69eb61a02b
commit
9b7d9ef184
|
@ -463,7 +463,7 @@ class Users( object ):
|
|||
)
|
||||
|
||||
return dict(
|
||||
form = button % ( user_id, 0 ) # 0 = new signup, not modifying an existing subscription
|
||||
form = button % ( user_id, 0 ) # 0 = new subscription, 1 = modify an existing subscription
|
||||
)
|
||||
|
||||
@expose()
|
||||
|
|
|
@ -319,12 +319,12 @@ class Upgrade_page( Product_page ):
|
|||
return Tr(
|
||||
[ Td(
|
||||
Div(
|
||||
# 1 = modifying an existing subscription rather than a new signup
|
||||
# 1 = modifying an existing subscription, 0 = new subscription
|
||||
user and user.username not in ( u"anonymous", None ) and user.rate_plan != index \
|
||||
and ( yearly and ( plan.get( u"yearly_button" ) and plan.get( u"yearly_button" ).strip() and
|
||||
plan.get( u"yearly_button" ) % ( user.object_id, 1 ) or None ) or \
|
||||
plan.get( u"yearly_button" ) % ( user.object_id, user.rate_plan and 1 or 0 ) or None ) or \
|
||||
( plan.get( u"button" ) and plan.get( u"button" ).strip() and
|
||||
plan.get( u"button" ) % ( user.object_id, 1 ) or None ) ) or None,
|
||||
plan.get( u"button" ) % ( user.object_id, user.rate_plan and 1 or 0 ) or None ) ) or None,
|
||||
( not user or user.username in ( u"anonymous", None ) ) and A(
|
||||
Img( src = u"/static/images/sign_up_button.png", width = "76", height = "23" ),
|
||||
href = u"/sign_up?plan=%s&yearly=%s" % ( index, yearly ),
|
||||
|
|
Reference in New Issue