This thread might give you a clue: http://www.zen-cart.com/showthread.p...94#post1254894
This thread might give you a clue: http://www.zen-cart.com/showthread.p...94#post1254894
Just looked at your thread. Interesting. I'll give your code changes a go and see if it resolves the issue.
TBH, if this issue really has been around since 2008 it's ridiculous that a major flaw such as this has not been addressed!
Devs, If this is the case, care to comment why this hasn't been resolved?
I made the edits listed by frank18 to a vanilla 1.5.3 and it didn't fix the admin displayed price issue so further help is going to be needed.
The store side is showing the correct price of 6.99 but admin stubbornly shows 7.00
Making the Net price only 2 decimal places wouldn't fix the problem as 20% tax on 5.82 is 6.984
It will only work if it uses the full 5.825 value.
It must be feasible as the store side can calculate it from the figure stored in the database.
Searching through my live 1.5.3 site I noticed that I had made one other change in admin/functions/functions_prices.php
starting around line 90
Didn't think that was relevant for your purpose as it deals with specials - but worth a try in your vanilla 1.5.3 installationPHP Code:if (!$special_price) {
return number_format($sale_product_price, 2, '.', ''); // number_format changed from 4 to 2 decimals - frank18
} else {
switch($sale->fields['sale_specials_condition']){
case 0:
return number_format($sale_product_price, 2, '.', '');
break;
case 1:
return number_format($special_price, 2, '.', '');
break;
case 2:
return number_format($sale_special_price, 2, '.', '');
break;
default:
return number_format($special_price, 2, '.', '');
}
}
Sorry to reinvigorate an old thread, but this still ranks well for 'zen cart admin price rounding'.
I encountered this issue today on 1.5.5, and my fix was as follows:
In /ADMIN-DIR/includes/functions/general.php, within the zen_add_tax function, change...
...to...PHP Code:return zen_round($price, $currencies->currencies[DEFAULT_CURRENCY]['decimal_places']) + zen_calculate_tax($price, $tax);
PHP Code:return zen_round( ( $price + zen_calculate_tax($price, $tax) ), $currencies->currencies[DEFAULT_CURRENCY]['decimal_places'] );
It does not work in my 1.55e shop. I enter the amount including 21% so the price is 25,00 euro. Once I go back into the product in admin it is then updated automatically to 25.0001
This is giving my real issues in the gift certificate I sell for 25 euro.