I'm just wondering where is the total calculated (ie, subtotal + shipping). I am referring to Checkout Step 2 that displays the Total amount. I mean which file is it calculated in?
Thanks
I'm just wondering where is the total calculated (ie, subtotal + shipping). I am referring to Checkout Step 2 that displays the Total amount. I mean which file is it calculated in?
Thanks
includes/modules/order_total/ot_total.php
Kuroi Web Design and Development | Twitter
(Questions answered in the forum only - so that any forum member can benefit - not by personal message)
Are you having a problem with the way the total is calculated?
Please do not PM for support issues: a private solution doesn't benefit the community.
Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.
I wanted to recalculate the total price with the insurance if the customer selected it during checkout. I managed to get it working by modifying the includes/modules/order_total/ot_total.php file. I modified the process() function like this:
function process() {
global $order, $currencies;
///////////// added this: //////////
if (isset($_SESSION['opt_insurance'])) {
$order->info['total'] += $_SESSION['opt_insurance'];
}
//////////////
$this->output[] = array('title' => $this->title . ':',
'text' => $currencies->format($order->info['total'], true, $order->info['currency'], $order->info['currency_value']),
'value' => $order->info['total']);
}
I am looking for a better way to do this without modifying the ot_total.php file. Do you know a better way to do this?
Thanks