discount
This commit is contained in:
@@ -303,6 +303,11 @@ def confirm_trainingplan_purchase_view(request, id=0):
|
|||||||
url = reverse('promembership')
|
url = reverse('promembership')
|
||||||
return HttpResponseRedirect(url)
|
return HttpResponseRedirect(url)
|
||||||
|
|
||||||
|
if not can_plan(request.user):
|
||||||
|
url = reverse('paidplans_view')
|
||||||
|
messages.info(request,'You need to upgrade to Self-Coach or Coach first. On your training plan purchases you will get a discount.')
|
||||||
|
return HttpResponseRedirect(url)
|
||||||
|
|
||||||
r = request.user.rower
|
r = request.user.rower
|
||||||
|
|
||||||
plan = get_object_or_404(InstantPlan, pk=id)
|
plan = get_object_or_404(InstantPlan, pk=id)
|
||||||
|
|||||||
@@ -2661,6 +2661,13 @@ def rower_view_instantplan(request, id='', userid=0):
|
|||||||
'id': id,
|
'id': id,
|
||||||
})
|
})
|
||||||
return HttpResponseRedirect(url)
|
return HttpResponseRedirect(url)
|
||||||
|
if not can_plan(request.user):
|
||||||
|
messages.error(
|
||||||
|
request, 'You must be on a <a href="/rowers/paidplans">paid plan</a> to use free training plans')
|
||||||
|
url = reverse('rower_view_instantplan', kwargs={
|
||||||
|
'id': id,
|
||||||
|
})
|
||||||
|
return HttpResponseRedirect(url)
|
||||||
|
|
||||||
form = InstantPlanSelectForm(request.POST, targets=targets)
|
form = InstantPlanSelectForm(request.POST, targets=targets)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user