Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
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
edx-platform
Commits
000ad0a3
Commit
000ad0a3
authored
Mar 25, 2016
by
Matt Drayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mattdrayer/theme-ecommerce-url: Add theme support for ECOMMERCE_PUBLIC_URL_ROOT setting
parent
0ad9eb91
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
3 deletions
+7
-3
lms/djangoapps/commerce/signals.py
+3
-1
lms/djangoapps/commerce/utils.py
+2
-1
lms/templates/dashboard/_dashboard_credit_info.html
+2
-1
No files found.
lms/djangoapps/commerce/signals.py
View file @
000ad0a3
...
...
@@ -16,6 +16,7 @@ from microsite_configuration import microsite
from
request_cache.middleware
import
RequestCache
from
student.models
import
UNENROLL_DONE
from
openedx.core.djangoapps.commerce.utils
import
ecommerce_api_client
,
is_commerce_service_configured
from
openedx.core.djangoapps.theming.helpers
import
get_value
log
=
logging
.
getLogger
(
__name__
)
...
...
@@ -196,7 +197,8 @@ def generate_refund_notification_body(student, refund_ids): # pylint: disable=i
"To process this request, please visit the link(s) below."
)
.
format
(
username
=
student
.
username
,
email
=
student
.
email
)
refund_urls
=
[
urljoin
(
settings
.
ECOMMERCE_PUBLIC_URL_ROOT
,
'/dashboard/refunds/{}/'
.
format
(
refund_id
))
ecommerce_url_root
=
get_value
(
'ECOMMERCE_PUBLIC_URL_ROOT'
,
settings
.
ECOMMERCE_PUBLIC_URL_ROOT
)
refund_urls
=
[
urljoin
(
ecommerce_url_root
,
'/dashboard/refunds/{}/'
.
format
(
refund_id
))
for
refund_id
in
refund_ids
]
return
'{msg}
\n\n
{urls}'
.
format
(
msg
=
msg
,
urls
=
'
\n
'
.
join
(
refund_urls
))
...
...
lms/djangoapps/commerce/utils.py
View file @
000ad0a3
...
...
@@ -55,7 +55,8 @@ class EcommerceService(object):
Example:
http://localhost:8002/basket/single_item/
"""
return
urljoin
(
settings
.
ECOMMERCE_PUBLIC_URL_ROOT
,
self
.
config
.
single_course_checkout_page
)
ecommerce_url_root
=
helpers
.
get_value
(
'ECOMMERCE_PUBLIC_URL_ROOT'
,
settings
.
ECOMMERCE_PUBLIC_URL_ROOT
)
return
urljoin
(
ecommerce_url_root
,
self
.
config
.
single_course_checkout_page
)
def
checkout_page_url
(
self
,
sku
):
""" Construct the URL to the ecommerce checkout page and include a product.
...
...
lms/templates/dashboard/_dashboard_credit_info.html
View file @
000ad0a3
...
...
@@ -18,8 +18,9 @@
credit_msg_class = "credit-eligibility-msg"
credit_btn_class = "purchase-credit-btn"
credit_btn_label = _("Get Credit")
ecommerce_url_root = static.get_value('ECOMMERCE_PUBLIC_URL_ROOT', settings.ECOMMERCE_PUBLIC_URL_ROOT)
credit_btn_href = '{root}/credit/checkout/{course_id}/'.format(
root=
settings.ECOMMERCE_PUBLIC_URL_ROOT
,
root=
ecommerce_url_root
,
course_id=credit_status['course_key'])
if credit_status["purchased"]:
...
...
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