Tried this module on a 1.5.6c install and I'm getting incorrect values in checkout.
Line item shows £59.72
Sub Total shows £60.00 Ex VAT, £71.94 Inc VAT
UK VAT (20%) £11.94
Total £71.66
I've identified it as an issue with the following code in tpl_modules_order_totals.php
foreach($products as $product) {
$cartShowTotalIncTax+=(zen_round($product['final_price'], $currencies->currencies[DEFAULT_CURRENCY]['decimal_places']) + zen_calculate_tax($product['final_price'], zen_get_tax_rate($product['tax_class_id'])))$product['quantity'];
$cartShowTotalExTax+=(zen_round($product['final_price'], $currencies->currencies[DEFAULT_CURRENCY]['decimal_places']))$product['quantity'];
}
where $currencies->currencies[DEFAULT_CURRENCY]['decimal_places'] is returning no value. If i replace that specific part of the code with a hardcoded 2 then it displays the correct values.
DEFAULT_CURRENCY is being correctly identified as GBP.
Echoing $currencies->currencies[DEFAULT_CURRENCY]['decimal_places'] in shopping cart page will output '2', but nothing during checkout.
Not found a reason for this yet. Has anybody else experienced this issue, and how did you resolve it?
Zen Cart developer since 2009 — Zen Cart Solutions
Ecommerce development, integrations & automation — Junction Solutions