Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2006
    Posts
    45
    Plugin Contributions
    0

    Default Where is the "Total" calculated?

    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

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Where is the "Total" calculated?

    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)

  3. #3
    Join Date
    Jun 2003
    Posts
    33,720
    Plugin Contributions
    0

    Default Re: Where is the "Total" calculated?

    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.

  4. #4
    Join Date
    Jan 2006
    Posts
    45
    Plugin Contributions
    0

    Default Re: Where is the "Total" calculated?

    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

 

 

Similar Threads

  1. v137 0.00 Order total is set to "Pending" not "Delivered"
    By radius9999 in forum Managing Customers and Orders
    Replies: 2
    Last Post: 28 Apr 2013, 01:58 AM
  2. v151 Where is the code for the product listing sort "up" and "down' arrow?
    By rcrosier in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 30 Jan 2013, 06:38 PM
  3. Shopping cart - trying to turn off "Total Items" "Weight" and "Price"
    By deshojo in forum Templates, Stylesheets, Page Layout
    Replies: 11
    Last Post: 4 Apr 2011, 07:15 PM
  4. Where do I change the status of "Shipped" to "Dispatched"?
    By safeg in forum Built-in Shipping and Payment Modules
    Replies: 9
    Last Post: 31 Mar 2010, 02:09 PM
  5. How can I get Taxes to display on the Checkout_Payment within the "Your Total" box?
    By jbarrick in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 0
    Last Post: 9 Jul 2009, 09:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg