configuring price column to include a shipping calculation
Within my site, on each item's detail page, I have the price displayed including shipping (which is a calculation based on cubes and cost per cube), calculated in the code using math functions as follows.
<?php
$x = $row_rsDetails['price'];
$y = $row_rsDetails['ShippingCubes'] * $row_rsDetails['CostperCube'];
$a = $row_rsPackageShipping['ShipSum'];
$b = $y + $a;
echo bcadd($x, $b, 2);
?>
I need to be able to configure the price column of my add to cart object to use this calculation as the price, rather than the price binding from my database. Can someone guide me as to how to configure my price column to use this calculation? Thanks in advance