If you agree with my assertion that the rounding should occur after the per-product-price is multiplied by the cart quantity, then the following changes will move the processing on the shopping_cart page into line with the ot_subtotal calculation. All line numbers are relative to an unmodified v1.5.1 version of the specified file.
First, /includes/classes/shopping_cart.php, starting at line #850:
Code:
// $this->total += zen_round(zen_add_tax($productTotal, $products_tax), $decimalPlaces) * $qty;
$this->total += zen_round(zen_add_tax($productTotal, $products_tax) * $qty, $decimalPlaces); //-lat9-correct rounding issue
Then, /includes/pages/shopping_cart/header_php.php starting at line #141
Code:
//-bof-lat9-fix rounding issue
// $ppe = zen_round(zen_add_tax($ppe, zen_get_tax_rate($products[$i]['tax_class_id'])), $currencies->get_decimal_places($_SESSION['currency']));
// $ppt = $ppe * $products[$i]['quantity'];
$ppe = zen_add_tax($ppe, zen_get_tax_rate($products[$i]['tax_class_id']));
$ppt = zen_round ($ppe * $products[$i]['quantity'], $currencies->get_decimal_places($_SESSION['currency']));
//-eof-lat9
Bookmarks