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
c74da2d7
Commit
c74da2d7
authored
Jan 18, 2017
by
Vedran Karacic
Committed by
Vedran Karačić
Jan 27, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add basket order details message.
SOL-2195
parent
1273f544
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
1 deletions
+18
-1
ecommerce/extensions/basket/views.py
+8
-1
ecommerce/static/sass/partials/views/_basket.scss
+4
-0
ecommerce/templates/oscar/basket/partials/client_side_checkout_basket.html
+6
-0
No files found.
ecommerce/extensions/basket/views.py
View file @
c74da2d7
...
@@ -147,7 +147,7 @@ class BasketSummaryView(BasketView):
...
@@ -147,7 +147,7 @@ class BasketSummaryView(BasketView):
display_verification_message
=
False
display_verification_message
=
False
lines_data
=
[]
lines_data
=
[]
show_voucher_form
=
True
show_voucher_form
=
True
switch_link_text
=
partner_sku
=
''
switch_link_text
=
partner_sku
=
order_details_msg
=
None
for
line
in
lines
:
for
line
in
lines
:
product_class_name
=
line
.
product
.
get_product_class
()
.
name
product_class_name
=
line
.
product
.
get_product_class
()
.
name
...
@@ -156,9 +156,15 @@ class BasketSummaryView(BasketView):
...
@@ -156,9 +156,15 @@ class BasketSummaryView(BasketView):
if
(
getattr
(
line
.
product
.
attr
,
'id_verification_required'
,
False
)
and
if
(
getattr
(
line
.
product
.
attr
,
'id_verification_required'
,
False
)
and
line
.
product
.
attr
.
certificate_type
!=
'credit'
):
line
.
product
.
attr
.
certificate_type
!=
'credit'
):
display_verification_message
=
True
display_verification_message
=
True
order_details_msg
=
_
(
'You will be automatically enrolled in the course upon completing your order.'
)
elif
product_class_name
==
'Enrollment Code'
:
elif
product_class_name
==
'Enrollment Code'
:
line_data
=
self
.
_get_course_data
(
line
.
product
)
line_data
=
self
.
_get_course_data
(
line
.
product
)
show_voucher_form
=
False
show_voucher_form
=
False
order_details_msg
=
_
(
'You will receive an email at {user_email} with your enrollment code(s).'
)
.
format
(
user_email
=
self
.
request
.
user
.
email
)
else
:
else
:
line_data
=
{
line_data
=
{
'product_title'
:
line
.
product
.
title
,
'product_title'
:
line
.
product
.
title
,
...
@@ -187,6 +193,7 @@ class BasketSummaryView(BasketView):
...
@@ -187,6 +193,7 @@ class BasketSummaryView(BasketView):
context_updates
=
{
context_updates
=
{
'display_verification_message'
:
display_verification_message
,
'display_verification_message'
:
display_verification_message
,
'order_details_msg'
:
order_details_msg
,
'partner_sku'
:
partner_sku
,
'partner_sku'
:
partner_sku
,
'show_voucher_form'
:
show_voucher_form
,
'show_voucher_form'
:
show_voucher_form
,
'switch_link_text'
:
switch_link_text
'switch_link_text'
:
switch_link_text
...
...
ecommerce/static/sass/partials/views/_basket.scss
View file @
c74da2d7
...
@@ -514,6 +514,10 @@
...
@@ -514,6 +514,10 @@
.remove-voucher
{
.remove-voucher
{
color
:
#337ab7
;
color
:
#337ab7
;
}
}
#order-details
{
margin
:
50px
0
;
}
}
}
}
}
}
}
...
...
ecommerce/templates/oscar/basket/partials/client_side_checkout_basket.html
View file @
c74da2d7
...
@@ -92,6 +92,12 @@
...
@@ -92,6 +92,12 @@
<span
class=
"price"
>
{{ order_total.incl_tax|currency:basket.currency }}
</span>
<span
class=
"price"
>
{{ order_total.incl_tax|currency:basket.currency }}
</span>
</div>
</div>
</fieldset>
</fieldset>
{% if order_details_msg %}
<div
id=
"order-details"
>
<p
class=
"title"
>
{% trans "ORDER DETAILS" %}
</p>
<p>
{{ order_details_msg }}
</p>
</div>
{% endif %}
</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