Simple math?
Posted: Sun Jun 21, 2015 6:53 pm
Can someone please explain why there is such a basic math error at checkout, and how to fix it?


OpenCart Community Forum - Discuss shopping cart and e-commerce solutions.
https://forum.opencart.com/
Code: Select all
foreach ($total_data as $key => $value) {
$sort_order[$key] = $value['sort_order'];
}
Code: Select all
$total_data[$key] = round($value['value'],2);
Code: Select all
foreach ($total_data as $key => $value) {
$total_data[$key] = round($value['value'],2);
$sort_order[$key] = $value['sort_order'];
}
Thanks, but that was already set to two decimal places.deepvision wrote:System -> Localisation -> Currencies -> USD -> Decimal places
Thanks. I have given that a try, so we'll see...chulcha wrote:may by
try it
First! Backup catalog/controller/checkout/cart.php
Second! Backup catalog/controller/checkout/cart.php
catalog/controller/checkout/cart.php
find code
insert into body of circleCode: Select all
foreach ($total_data as $key => $value) { $sort_order[$key] = $value['sort_order']; }
final codeCode: Select all
$total_data[$key] = round($value['value'],2);
Code: Select all
foreach ($total_data as $key => $value) { $total_data[$key] = round($value['value'],2); $sort_order[$key] = $value['sort_order']; }