Commit 228c513d by chrisndodge

Merge pull request #5678 from edx/cdodge/shoppingcart-rewrite-hotfix1

css fix of remove icon and Fixed a bug where the discount coupon applied...
parents 7dc13508 b0802aaf
......@@ -223,14 +223,21 @@ class Order(models.Model):
if is_order_type_business:
for cart_item in cart_items:
if hasattr(cart_item, 'paidcourseregistration'):
CourseRegCodeItem.add_to_order(self, cart_item.paidcourseregistration.course_id, cart_item.qty)
course_reg_code_item = CourseRegCodeItem.add_to_order(self, cart_item.paidcourseregistration.course_id, cart_item.qty)
# update the discounted prices if coupon redemption applied
course_reg_code_item.list_price = cart_item.list_price
course_reg_code_item.unit_cost = cart_item.unit_cost
course_reg_code_item.save()
items_to_delete.append(cart_item)
else:
for cart_item in cart_items:
if hasattr(cart_item, 'courseregcodeitem'):
PaidCourseRegistration.add_to_order(self, cart_item.courseregcodeitem.course_id)
paid_course_registration = PaidCourseRegistration.add_to_order(self, cart_item.courseregcodeitem.course_id)
# update the discounted prices if coupon redemption applied
paid_course_registration.list_price = cart_item.list_price
paid_course_registration.unit_cost = cart_item.unit_cost
paid_course_registration.save()
items_to_delete.append(cart_item)
# CourseRegCodeItem.add_to_order
for item in items_to_delete:
item.delete()
......
......@@ -479,6 +479,9 @@
pointer-events: none;
}
}
.no-width {
width: 0px !important;
}
.col-3{
width: 100px;
float: right;
......
......@@ -58,7 +58,7 @@ from django.utils.translation import ugettext as _
</div>
</div>
<div class="col-3">
<div class="col-3 no-width">
<a href="#" class="btn-remove" data-item-id="${item.id}"><i class="icon-remove-sign"></i></a>
</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