• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: RSForm!Pro and PayPal numbers after the comma prob

RSForm!Pro and PayPal numbers after the comma prob 11 years 7 months ago #24954

Hi,

I followd the following instruction RSForm!Pro and PayPal and everything worked well. There is only one thing i can not get to work.
Round amounts as 10, 20, 100 etc.. work fine but when i want to use amounts with a decimal, for example 4,50 or 5,95 etc.. the script makes it as a round number, i have tried to us 4.95 and 4,95 and 4.950 but it does not work. So how can i use this script with numbers after the comma?

--cheers--
The administrator has disabled public write access.

RSForm!Pro and PayPal numbers after the comma prob 11 years 7 months ago #24964

Hello,

The example in question assumes integers are used for product quantities. To enable floating point (decimal) quantities, simply replace the calculateTotal function from the example with the following:
function calculateTotal()
{
	var products = new Array("Product10","Product20","Product30");
	var i=0;
	var total = 0;
	for(i;iif(document.getElementById(products[i]).checked)
	total  = total + parseFloat(document.getElementById(products[i]).value) * parseFloat(document.getElementById('QuantityProd'+(i+1)).value);
 
	document.getElementById('Total').value = total;
}
Please remember that my responses aren't considered customer support, to receive customer support please submit a new customer support ticket, and we will gladly assist you.

Best Regards,
Cristian Nicolae.
The administrator has disabled public write access.
The following user(s) said Thank You: iamdefiler
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!