CalcBuilder Forum

calculation in array of values:

User bsnline 2015-06-05 11:54:55

Hi,

problem calculation in array of values.

field: weight , width , length , height .

for quote shipping cost, i have more packages to calculate the total volume and total weight

suggestion ?

$result='WeightDimensions';
for($i=0;$i
$result.='<tr>';
$result.='<td>'.$weight.'</td>';
$result.='<td>';
$result.='<td>'.$width.'*'.$length.'*'.$height.'</td>';
$result.='</tr>';
}
$result.='</tbody></table>';

## calculate volume for field array.

volume=0
if($i=0;$volume=(>$i($width*$length*$height));$i++){
$volume=($width*$length*$height);
}'

Edited by bsnline - 05.06.2015 12:01

Moonsoft support 2015-06-05 12:00:28

Hi,
the forum strips some tags, so if you have a question regarding code please open a ticket using your helpdesk instead. Please specify which is exactly the problem (the code has an error?), and paste your code there.

Thanks, regards

User bsnline 2015-06-06 17:34:13

No error, but not result calc array.

code:

$volume0=($lungo*$largo*$alto);
$volume1=($lungo*$largo*$alto);
$volume2=($lungo*$largo*$alto);
$volume3=($lungo*$largo*$alto);
$volume4=($lungo*$largo*$alto);
$volume_sped=($volume0+$volume1+$volume2+$volume3+$volume4)
$volume_sped=$volume.' m3';

Moonsoft support 2015-06-08 08:32:34

Hi,

Maybe the last 2 lines should be slightly different:

$volume=($volume0+$volume1+$volume2+$volume3+$volume4);
$volume_sped=$volume.' m3';

Regards,

User bsnline 2015-06-14 18:54:11

Okay, Thank you

...
List Manager

Build different lists for your site

Buy now!
...
Support/development 40 hours

With the peace of mind of having a professional team at your service (20% discount)

Buy now!