I just fixed this myself in 1.57c after seeing the rounding problem. The issue is that $currencies, which is a global, appears not to have been declared as global and therefore a local copy is used instead, which doesn't contain anything. I assume in previous Zen Cart versions it was declared global in some code that included the template (I've only previously tried it up to 1.55f so I can't comment on 1.56 versions).
The solution for me was to edit the template file includes/templates/YOUR_TEMPLATE/templates/tpl_modules_order_totals.php as follows.
Original:
Code:
<?php
/**
* Displays order-totals modules' output
*/
for ($i=0; $i<$size; $i++) { ?>
to:
Code:
<?php
/**
* Displays order-totals modules' output
*/
global $currencies;
for ($i=0; $i<$size; $i++) { ?>
Having found and fixed the problem, however, I may now just delete the template override altogether as I think I prefer never to display the subtotal with VAT, even when showing prices invclusive of VAT to our UK customers. Including VAT in the subtotal and then showing the VAT on a separate line on the invoice prompts periodic queries from customers who think they have been charged VAT twice and haven't actually tried totting up the numbers to see that they haven't. I currently get around this by changing the "VAT: £x.xx" line to read "(Includes VAT £x.xx)" but it is conventional for the subtotal not to include VAT.
Bookmarks