Fixed wrong calculated price when comma is used instead of dot.
This commit is contained in:
committed by
Julien Chanseaume
parent
0310dce719
commit
12e84afdf8
@@ -794,10 +794,16 @@
|
|||||||
captureLength: 1,
|
captureLength: 1,
|
||||||
wait : 300,
|
wait : 300,
|
||||||
callback : function () {
|
callback : function () {
|
||||||
|
var price = $(this).val();
|
||||||
|
$(this).val(sanitizeFloat(price));
|
||||||
update_price($(this).val(), $(this).data('price-type'), $(this).data('rel-price'));
|
update_price($(this).val(), $(this).data('price-type'), $(this).data('rel-price'));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function sanitizeFloat(numVal) {
|
||||||
|
return numVal.replace(",", ".");
|
||||||
|
};
|
||||||
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
{/block}
|
{/block}
|
||||||
|
|||||||
@@ -363,10 +363,16 @@ $(function() {
|
|||||||
captureLength: 1,
|
captureLength: 1,
|
||||||
wait : 300,
|
wait : 300,
|
||||||
callback : function () {
|
callback : function () {
|
||||||
update_price($(this).val(), $(this).data('price-type'), $(this).data('rel-price'));
|
var price = $(this).val();
|
||||||
|
$(this).val(sanitizeFloat(price));
|
||||||
|
update_price($(this).val(), $(this).data('price-type'), $(this).data('rel-price'));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function sanitizeFloat(numVal) {
|
||||||
|
return numVal.replace(",", ".");
|
||||||
|
};
|
||||||
|
|
||||||
// Count generated combinations in real time
|
// Count generated combinations in real time
|
||||||
function countGeneratedCombinations() {
|
function countGeneratedCombinations() {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user