Forum


Calc Builder Support

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

Conditional Output 19.09.2012 12:32

I have created a couple of calculators for a site but my client would like to output a text line rather than the normal output when one of the results is negative.

I had a quick look at the 'Javascript events' but I am not sure if this is the area where I should be looking.

I see that in the guide there is a 'Ship costs' calculation that used Java but I can't find it to download and look at.

Thank you for a great component.

Re: Conditional Output 19.09.2012 15:28

Hello,
in fact, you don't need to add javascript code for that. You can create conditional output using the default code section where you have placed your calculations. Once you have finished with the math (and before making number formatting, if any), you can handle your variable (for ex, $result), using the conditional, this way:

if(0>$result){
$result="This is the new output";
}


Hope this helps, regards

Edited by MSTeam - 19.09.2012 15:29
Moonsoft Team
www.moonsoft.es

Re: Conditional Output 21.09.2012 10:51

Thanks very much.

I am beginning to learn that there is very little that I will not be able to do with your component.

Fantastic!

Re: Conditional Output 21.09.2012 11:10

That's the idea ;)

Great it helped you!
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