Forum


Calc Builder Support

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

calculation in array of values: 05.06.2015 11:54

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[$i].'</td>';
$result.='<td>';
$result.='<td>'.$width[$i].'*'.$length[$i].'*'.$height[$i].'</td>';
$result.='</tr>';
}
$result.='</tbody></table>';

## calculate volume for field array.

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

Edited by bsnline - 05.06.2015 12:01

Re: calculation in array of values: 05.06.2015 12:00

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
Moonsoft Team
www.moonsoft.es

Re: calculation in array of values: 06.06.2015 17:34

No error, but not result calc array.

code:

$volume0=($lungo[0]*$largo[0]*$alto[0]);
$volume1=($lungo[1]*$largo[1]*$alto[1]);
$volume2=($lungo[2]*$largo[2]*$alto[2]);
$volume3=($lungo[3]*$largo[3]*$alto[3]);
$volume4=($lungo[4]*$largo[4]*$alto[4]);
$volume_sped=($volume0+$volume1+$volume2+$volume3+$volume4)
$volume_sped=$volume.' m3';

Re: calculation in array of values: 08.06.2015 08:32

Hi,

Maybe the last 2 lines should be slightly different:

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

Regards,
Moonsoft Team
www.moonsoft.es

Re: calculation in array of values: 14.06.2015 18:54

Okay, Thank you
Are you satisfied with our products/services/support?
Please help us to keep improving, add a review at  joomla extensions site and  magento connect
FaLang translation system by Faboba

Our clients' feedback