13365 - fix prices displayed in cart popup

This commit is contained in:
Rodney Figaro 2017-05-29 17:22:23 +02:00
parent 24c6105024
commit 7c34b09597

View File

@ -715,7 +715,7 @@ var ajaxCart = {
//Override #10402
//Ca ne prend pas en compte la quantité
//$('#layer_cart_product_price').text($('#our_price_display').html());
const price = parseFloat($('#our_price_display').html().substr(0, $('#our_price_display').html().length - 2).replace(',', '.')) * $('#quantity_wanted').val();
const price = parseFloat($('#our_price_display').html().substr(0, $('#our_price_display').html().length - 2).replace(' ', '').replace(',', '.')) * $('#quantity_wanted').val();
const currency = $('#our_price_display').html().substr($('#our_price_display').html().length - 2, $('#our_price_display').html().length);
$('#layer_cart_product_price').text(price.toFixed(2) + currency);
@ -723,7 +723,7 @@ var ajaxCart = {
//Override #10402
//Ca ne prend pas en compte la quantité
//$('#layer_cart_product_old_price').text($('#old_price_display').html());
const price_old = parseFloat($('#old_price_display').html().substr(0, $('#old_price_display').html().length - 2).replace(',', '.')) * $('#quantity_wanted').val();
const price_old = parseFloat($('#old_price_display').html().substr(0, $('#old_price_display').html().length - 2).replace(' ', '').replace(',', '.')) * $('#quantity_wanted').val();
$('#layer_cart_product_old_price').text(price_old.toFixed(2) + currency);
$('#layer_cart_product_reduc').text($('#reduction_percent_display').html());