Forum


Calc Builder Support

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

Some values are incorrect? 27.04.2012 15:27

Ok I have no idea what I am doing wrong. I have been working on this for awhile and it is getting annoying. There is NO preview button so I have to keep going back into the website to view if its working.

Variable ap1 is number default at 500
Variable nb1 is number default is 10% or .1
Variable num1 is number NO default


$commissions=$ap1*$nb1;
$inc1=$commissions*$num1;

$commissions2=$ap2*$nb2;
$inc2=$commissions2*$num2;

$sum=$inc1+$inc2*.6

This results in some values are incorrect??

Re: Some values are incorrect? 27.04.2012 15:32

Can the math be done with out having a field set up.

Such as $resultA=$num1+$num2; Then $sum=$resultA*10%

So it never shows $resultA and there is no variable for it? Only num1 and num2

Thanks

Re: Some values are incorrect? 27.04.2012 17:34

Hello,

If you see "some values are incorrect" message, maybe the issue is not in code. Please check in Preferences section inside calculator in Backend; Frontend Number format -> Decimal and Thousand parameters are correctly set.

Hope this helps,
Moonsoft Team
www.moonsoft.es

Re: Some values are incorrect? 27.04.2012 17:39

Hello,

You can add/use new variables in code without a field created.

Although, you must note this is not correct:

$sum=$resultA*10%

Maybe this should be

$sum=$resultA*0.1;

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