hotfix/2015-09-16-2: Credit Fixes
- Updated checkout page to disallow purchase of credit seats (the credit payment page is hosted in ecommerce) - Corrected path to providers endpoint - Cleaned receipt page styling - Updated receipt page copy - Added provider thumbnail to receipt page ECOM-2172
This commit is contained in:
committed by
Matt Drayer
parent
05a2b54b5a
commit
011062e570
@@ -273,7 +273,7 @@ class PayAndVerifyView(View):
|
||||
# separate out the payment flow and use the product SKU to figure out what
|
||||
# the user is trying to purchase.
|
||||
#
|
||||
# Nonethless, for the time being we continue to make the really ugly assumption
|
||||
# Nonetheless, for the time being we continue to make the really ugly assumption
|
||||
# that at some point there was a paid course mode we can query for the price.
|
||||
relevant_course_mode = self._get_paid_mode(course_key)
|
||||
|
||||
@@ -509,9 +509,12 @@ class PayAndVerifyView(View):
|
||||
# Retrieve all the modes at once to reduce the number of database queries
|
||||
all_modes, unexpired_modes = CourseMode.all_and_unexpired_modes_for_courses([course_key])
|
||||
|
||||
# Retrieve the first unexpired, paid mode, if there is one
|
||||
# Retrieve the first mode that matches the following criteria:
|
||||
# * Unexpired
|
||||
# * Price > 0
|
||||
# * Not credit
|
||||
for mode in unexpired_modes[course_key]:
|
||||
if mode.min_price > 0:
|
||||
if mode.min_price > 0 and not CourseMode.is_credit_mode(mode):
|
||||
return mode
|
||||
|
||||
# Otherwise, find the first expired mode
|
||||
|
||||
@@ -64,6 +64,7 @@ var edx = edx || {};
|
||||
providerDiv = this.$el.find("#receipt-provider");
|
||||
context.course_key = this.courseKey;
|
||||
context.username = this.username;
|
||||
context.platformName = this.$el.data('platform-name');
|
||||
providerDiv.html(_.template(templateHtml, context)).removeClass('hidden');
|
||||
},
|
||||
|
||||
@@ -301,7 +302,7 @@ function completeOrder (event) {
|
||||
);
|
||||
|
||||
$.ajax({
|
||||
url: '/api/credit/v1/provider/' + providerId + '/request/',
|
||||
url: '/api/credit/v1/providers/' + providerId + '/request/',
|
||||
type: 'POST',
|
||||
headers: {
|
||||
'X-CSRFToken': $.cookie('csrftoken')
|
||||
|
||||
@@ -246,42 +246,33 @@
|
||||
}
|
||||
.report-receipt-provider {
|
||||
@extend %ui-window;
|
||||
border-top: 3px solid $credit-color-base;
|
||||
padding: ($baseline*0.75) $baseline;
|
||||
|
||||
.provider-wrapper {
|
||||
width: 70%;
|
||||
@include float(left);
|
||||
padding-left: $baseline;
|
||||
|
||||
.provider-info {
|
||||
padding: $baseline $baseline $baseline 0;
|
||||
margin-bottom: $baseline;
|
||||
font-weight: 600;
|
||||
}
|
||||
.provider-more-info {
|
||||
}
|
||||
.provider-instructions {
|
||||
}
|
||||
}
|
||||
|
||||
.provider-buttons-logos {
|
||||
width: 30%;
|
||||
@include float(right);
|
||||
@include text-align(center);
|
||||
|
||||
.provider-logo {
|
||||
padding: $baseline;
|
||||
}
|
||||
.provider-logo image {
|
||||
width: 100px;
|
||||
.provider-logo img {
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.complete-order {
|
||||
@include text-align(center);
|
||||
padding: $baseline;
|
||||
}
|
||||
.complete-order button {
|
||||
@extend %btn-pl-primary-base;
|
||||
white-space: nowrap;
|
||||
|
||||
button {
|
||||
@extend %btn-pl-primary-base;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<div class="provider-wrapper">
|
||||
<div class="provider-info">
|
||||
<%= interpolate(gettext("You still need to visit %s to complete the credit process."), [display_name]) %>
|
||||
<%= interpolate(gettext("You still need to visit the %s website to complete the credit process."), [display_name]) %>
|
||||
</div>
|
||||
<div class="provider-more-info">
|
||||
<%= interpolate(gettext("In order to learn credit, %s requires learner to:"), [display_name]) %>
|
||||
<%= interpolate(gettext("To finalize course credit, %s requires %s learners to submit a credit request."), [provider_id.toUpperCase(), platformName]) %>
|
||||
</div>
|
||||
<div class="provider-instructions">
|
||||
<%= fulfillment_instructions %>
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
<div class="provider-buttons-logos">
|
||||
<div class="provider-logo">
|
||||
<%= interpolate("<img src='%s' alt='%s'></image>", ["", display_name]) %>
|
||||
<%= interpolate("<img src='%s' alt='%s'></image>", [thumbnail_url, display_name]) %>
|
||||
</div>
|
||||
<div class="complete-order">
|
||||
<%= interpolate('<button data-provider="%s" data-course-key="%s" data-username="%s" class="complete-course" onClick=completeOrder(this)>%s</button>', [provider_id, course_key, username, gettext( "Complete Order")]) %>
|
||||
|
||||
Reference in New Issue
Block a user