Skip to main content
CalcBuilder logo
CalcBuilder Forum

calculation in array of values:

User bsnline

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

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

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

Hi,

Maybe the last 2 lines should be slightly different:

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

Regards,

User bsnline

Okay, Thank you

...
List Manager

Build different lists for your site

Buy now!
...
Support/development 10 hours

Get a bigger amount of hours for more complex tasks and get a 10% discount

Buy now!