Forum


Calc Builder Support

Calc Builder support
Forums
Public write access is disabled. Please login

Number format 19.05.2014 09:05

We need to apply a number format to the calculator in the cost table. This is the format we want to follow:

1,000
10,000
100,000
1,000,000

I saw an old post where you showed someone how to do it in PHP (which we don't want to do since our calc is now quite complicated) - but with the new version you have a section on number format for decimal and '000' spacing - why is there no button to turn this on?

Please help!
Moonsoft Team
www.moonsoft.es

Re: Number format 19.05.2014 09:11

Hi,
the format parameters you can see at the backend configure the numeric format allowed for users to type at the input form. It's applied to any input field typed 'number'. In order to configure the output format you must use the number_format function at the code section.

For your specific calculator, you have the results assigned at the last line of the calculator:


$$key=$value;


so you only need to add the numeric format before that line:

$value=number_format($value,0,".",",");
$$key=$value;


//You can change 0 for the number of decimal positions you want to force at the results.


Hope this helps, regards
Moonsoft Team
www.moonsoft.es
Are you satisfied with our products/services/support?
Please help us to keep improving, add a review at  joomla extensions site and  magento connect

Our clients' feedback