Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
ecommerce
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
ecommerce
Commits
825af787
Commit
825af787
authored
Feb 03, 2017
by
Marko Jevtic
Committed by
Marko Jevtić
Feb 08, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SOL-2200] Add verification url to the receipt page context
parent
24043b6e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
4 deletions
+12
-4
ecommerce/extensions/checkout/tests/test_views.py
+4
-0
ecommerce/extensions/checkout/views.py
+5
-1
ecommerce/templates/edx/checkout/receipt.html
+2
-2
ecommerce/templates/oscar/checkout/_verification_data.html
+1
-1
No files found.
ecommerce/extensions/checkout/tests/test_views.py
View file @
825af787
...
@@ -8,6 +8,7 @@ from django.core.urlresolvers import reverse
...
@@ -8,6 +8,7 @@ from django.core.urlresolvers import reverse
from
oscar.core.loading
import
get_model
from
oscar.core.loading
import
get_model
from
oscar.test
import
newfactories
as
factories
from
oscar.test
import
newfactories
as
factories
from
ecommerce.core.url_utils
import
get_lms_url
from
ecommerce.coupons.tests.mixins
import
CourseCatalogMockMixin
from
ecommerce.coupons.tests.mixins
import
CourseCatalogMockMixin
from
ecommerce.extensions.checkout.exceptions
import
BasketNotFreeError
from
ecommerce.extensions.checkout.exceptions
import
BasketNotFreeError
from
ecommerce.extensions.checkout.utils
import
get_receipt_page_url
from
ecommerce.extensions.checkout.utils
import
get_receipt_page_url
...
@@ -256,6 +257,9 @@ class ReceiptResponseViewTests(CourseCatalogMockMixin, LmsApiMockMixin, RefundTe
...
@@ -256,6 +257,9 @@ class ReceiptResponseViewTests(CourseCatalogMockMixin, LmsApiMockMixin, RefundTe
'payment_method'
:
None
,
'payment_method'
:
None
,
'fire_tracking_events'
:
False
,
'fire_tracking_events'
:
False
,
'display_credit_messaging'
:
False
,
'display_credit_messaging'
:
False
,
'verification_url'
:
get_lms_url
(
'verify_student/verify-now/{course_id}'
.
format
(
course_id
=
self
.
course
.
id
)
),
}
}
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertEqual
(
response
.
status_code
,
200
)
...
...
ecommerce/extensions/checkout/views.py
View file @
825af787
...
@@ -193,7 +193,11 @@ class ReceiptResponseView(ThankYouView):
...
@@ -193,7 +193,11 @@ class ReceiptResponseView(ThankYouView):
if
verified_course_id
:
if
verified_course_id
:
context
.
update
({
context
.
update
({
'verified_course_id'
:
verified_course_id
,
'verification_url'
:
get_lms_url
(
'verify_student/verify-now/{course_id}'
.
format
(
course_id
=
verified_course_id
)
),
'user_verified'
:
self
.
request
.
user
.
is_verified
(
self
.
request
.
site
),
'user_verified'
:
self
.
request
.
user
.
is_verified
(
self
.
request
.
site
),
})
})
...
...
ecommerce/templates/edx/checkout/receipt.html
View file @
825af787
...
@@ -133,9 +133,9 @@
...
@@ -133,9 +133,9 @@
{% endif %}
{% endif %}
</div>
</div>
{% if verifi
ed_course_id
and not user_verified %}
{% if verifi
cation_url
and not user_verified %}
<div
class=
"nav-wizard row"
>
<div
class=
"nav-wizard row"
>
{% include 'oscar/checkout/_verification_data.html' with
course_id=verified_course_id
%}
{% include 'oscar/checkout/_verification_data.html' with
verification_url=verification_url
%}
</div>
</div>
{% else %}
{% else %}
<div
id=
"dashboard-link"
>
<div
id=
"dashboard-link"
>
...
...
ecommerce/templates/oscar/checkout/_verification_data.html
View file @
825af787
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
data-track-category=
"verification"
data-track-category=
"verification"
data-track-event=
"edx.bi.user.verification.immediate"
data-track-event=
"edx.bi.user.verification.immediate"
data-track-type=
"click"
data-track-type=
"click"
href=
"{{ verif
y_url }}{{ course_id
}}/"
>
href=
"{{ verif
ication_url
}}/"
>
{% trans "Verify Now" %}
{% trans "Verify Now" %}
</a>
</a>
</div>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment