Commit b9f4902e by Douglas Hall

Merge pull request #12636 from edx/douglashall/WL-494

WL-494 Fix JQuery data attribute type conversion bug for shopping cart
parents d7da5f0a 1d23b806
......@@ -372,14 +372,14 @@ from openedx.core.lib.courses import course_image_url
var newQty = parseInt(newQty);
var unit_cost = parseFloat(unit_cost);
return (( newQty - prevQty ) * unit_cost + prevTotal)
return (( newQty - prevQty ) * unit_cost + parseFloat(prevTotal));
}
function update_user_cart(ItemId, newQty, prevQty, unit_cost, wasbusinessType, isbusinessType){
var post_url = "${reverse('shoppingcart.views.update_user_cart')}";
var typeChanged = false;
var prevTotal = $('#total-amount').data('amount')
var prevTotal = $('#total-amount').data('amount');
var newTotal = getNewTotal(prevQty, newQty, unit_cost, prevTotal);
$('#total-amount').html('$'+newTotal.toFixed(2)+' USD');
$('#total-amount').data('amount', newTotal);
......
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