Tricofix
Tricofix
parseInt(maximo)) || (parseInt(units_added)+parseInt(c) > parseInt(maximo))){
thestyle = 'block';
if (!opc){
var maxavailable = parseInt(maximo) - parseInt(units_added);
if (maxavailable<1) maxavailable = 1;
cantidadfield.value = maxavailable;
}
can_continue = false;
}else{
thestyle = 'none';
}
}
}
if (avisofield!=null) avisofield.style.display = thestyle;
return can_continue;
}
function check_units_added(cart_quantity_field_id){
var qtyfield = $("#"+cart_quantity_field_id);
var units_added = qtyfield.attr("data-units-added");
var qty = qtyfield.val();
if (units_added!=null && typeof(units_added)!="undefined") units_added=parseInt(units_added) + parseInt(qty);
else units_added = qty;
qtyfield.attr("data-units-added",units_added);
}