From 7c34b09597d0aab5be1a416006c222e6feb21cbc Mon Sep 17 00:00:00 2001 From: Rodney Figaro Date: Mon, 29 May 2017 17:22:23 +0200 Subject: [PATCH] 13365 - fix prices displayed in cart popup --- themes/site/js/modules/blockcart/ajax-cart.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/site/js/modules/blockcart/ajax-cart.js b/themes/site/js/modules/blockcart/ajax-cart.js index 467e732c..ab9bd371 100755 --- a/themes/site/js/modules/blockcart/ajax-cart.js +++ b/themes/site/js/modules/blockcart/ajax-cart.js @@ -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());