Commit c74da2d7 by Vedran Karacic Committed by Vedran Karačić

Add basket order details message.

SOL-2195
parent 1273f544
...@@ -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
......
...@@ -514,6 +514,10 @@ ...@@ -514,6 +514,10 @@
.remove-voucher { .remove-voucher {
color: #337ab7; color: #337ab7;
} }
#order-details {
margin: 50px 0;
}
} }
} }
} }
......
...@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment