Page 1 of 1

how to round() the total of each order?

Posted: Wed Mar 06, 2019 11:06 am
by philodance
in which file is the calculation of the total ?
which line do i have to change for the total to be rounded?

Re: how to round() the total of each order?

Posted: Wed Mar 06, 2019 5:29 pm
by paulfeakins
Look in /catalog/model/checkout/order.php

Re: how to round() the total of each order?

Posted: Thu Mar 07, 2019 6:21 am
by philodance
i tried to round() here:
'comment' => $order_query->row['comment'],
'total' => $order_query->row['total'],
'order_status_id' => $order_query->row['order_status_id'],

...and here twice:
if (isset($data['totals'])) {
foreach ($data['totals'] as $total) {

it doesnt work. where exactly is the total calculated? the total is also viewable on top right button, so i'm not sure if order.php is the right file...

Re: how to round() the total of each order?

Posted: Thu Mar 07, 2019 6:18 pm
by paulfeakins
philodance wrote:
Thu Mar 07, 2019 6:21 am
so i'm not sure if order.php is the right file...
Possibly not, see here:
viewtopic.php?t=192112

Re: how to round() the total of each order?

Posted: Mon Mar 11, 2019 5:06 pm
by philodance
Thank you!