I'm using the following code to execute a value update based on a code entered. But it returns wrong.
Ex: If the promo code is to reduce the price by 10, and the current total is 100, this returns 80. which should be 90.
jQuery(document).ready(function() {
$('#promo-code').keyup(function() {
if ($("input:text[name='promo-code']").val() == "intro") {
var promoval = parseFloat($("input:text[name='total']").val());
$("#total").val(promoval-10);
}
});