CalcBuilder Forum

no result

User moon_1799 2014-09-08 13:26:19

This is not working for me

http://www.myinternationalshopping.com/advice/calc

I am not getting a result!

Some of the documentation is wrong as well.

Moonsoft support 2014-09-08 13:32:02

Hello,

We checked your site and seems to be a javascript error in module "Email Newsletter":

Uncaught ReferenceError: form is not defined calc:756
(anonymous function) calc:756


Please first fixed javascript errors in your site and test it again.

Regards,

User moon_1799 2014-09-08 13:54:11

I've unpublished the email newsletter and still no result.

Moonsoft support 2014-09-08 14:00:16

Hello,

Your page throws a 500 error when trying to get calc results. This could be an error in code inside your calculator (or firewall, sef...). Please try to clear all inside 'Code' and test it again.

Regards,

User moon_1799 2014-09-08 14:11:49

it did something when I removed the code which is this:
$sum=($length*$width*$height)/$units;


have a look

Moonsoft support 2014-09-08 16:18:57

Hello,

We checked and seems to be ok. Only just add your own code and configure your calculator.

Regards,

User moon_1799 2014-09-08 16:25:03

I've done that and it's not working.

User moon_1799 2014-09-08 16:29:20

Can I send you an export so you can see?

Moonsoft support 2014-09-08 16:32:13

Hi,
if your code doesn't work you will need to investigate where are you introducing the error. The line of code you sent has a right sintax, so you'll need to check if data used for calculations is also right. (For example, that you're not dividing by 0).

we suggest to print at the output the variables being used

##units##
##height##

..etc

, so you can see which values are you using and so you can point out the origin of the issue.

Regards

User moon_1799 2014-09-08 16:47:45

I've tried that.

I may need a refund.

Moonsoft support 2014-09-08 17:52:36

Hi,
did you tried and what did you get?

We just noticed you have created a strange layout, that could be the origin of the wrong calculations.


Seems like you introduced the fields inside a section? Sections are blocks of forms that user can duplicate, think this is not needed for your case. Inputs will be recovered in form of arrays and you are also getting a strange 'del' button at the top.

In this scenario, your inputs would be arrays, and the sintax:

$sum=($height*$width)/$units;


Please remove the section, go to 'form layout' and create a new layout from scratch, its done automatically with the button '1 column layout'.


Then try :


$sum=$length*$with*$height;


to ensure inputs are recovered as expected, and your original expression:


$sum=($length*$width*$height)/$units;


Will be working if you set a numeric value for each option at 'units' field

Hope this helps,regards

User moon_1799 2014-09-08 18:06:57

It is very strange. What is the delete button? Is it not from calc builder?

Will try your suggestions

Moonsoft support 2014-09-08 18:10:10

Hi,
yes, the button is added by the calculator, because you filled the tab 'sections' at your calculator backed and added your fields 'inside'. If you remove the section and create a new layout you should not see any 'del' or 'add' button, they are only intended to add and remove form blocks.

Hope this helps, regards

User moon_1799 2014-09-08 18:23:31

OK, it works!

I think it was the section thing

User moon_1799 2014-09-08 18:28:37

I will have more questions

...
List Manager

Build different lists for your site

Buy now!
...
CalcBuilder

Create dynamic calculators

Buy now!