Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2007
    Posts
    54
    Plugin Contributions
    0

    Default I want an order-total module to display total w/o tax

    Hi,

    I need to duplicate the ot_total module and modify it to display total (products+shipping+discounts,fees,everything) but without tax,

    so the end result would be something like

    (...)
    subtotal
    discounts
    fees
    shipping
    -
    total (with tax)
    -
    total without tax
    total tax

    can anyone give some pointers about modifying the ot_total please?

    thanks

  2. #2
    Join Date
    Mar 2009
    Posts
    8
    Plugin Contributions
    0

    Default Re: I want an order-total module to display total w/o tax

    Sounds like you have a similar problem to mine:

    http://www.zen-cart.com/forum/showthread.php?t=140416

    So I'm guessing it's not possible without code modification.

    I think I'll be looking into making that module myself. If I do I'll let you know.

  3. #3
    Join Date
    Dec 2007
    Posts
    54
    Plugin Contributions
    0

    Default Re: I want an order-total module to display total w/o tax

    Quote Originally Posted by rozner View Post
    Sounds like you have a similar problem to mine:

    http://www.zen-cart.com/forum/showthread.php?t=140416

    So I'm guessing it's not possible without code modification.

    I think I'll be looking into making that module myself. If I do I'll let you know.
    im sure it is a relatively simple modification (as is the case with virtuemart)

    i tried to pull it off in the invoice.php, but it won't work, so the only option is to copy&modify the existing total module...and this I don't know how to do

    please do let me know, thanks

  4. #4
    Join Date
    Mar 2009
    Posts
    8
    Plugin Contributions
    0

    Default Re: I want an order-total module to display total w/o tax

    actually I was playing with this yesterday but I didn't have time to test it. But for those who are interested...

    PHP Code:
    <?php
    /**
     * ot_total order-total module
     *
     * @package orderTotal
     * @copyright Copyright 2003-2007 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: ot_subtotal.php 6101 2007-04-01 10:30:22Z wilt $
     */
      
    class ot_subtotal_no_tax {
        var 
    $title$output;

        function 
    ot_subtotal_no_tax() {
          
    $this->code 'ot_subtotal_no_tax';
          
    $this->title MODULE_ORDER_TOTAL_SUBTOTAL_TITLE;
          
    $this->description MODULE_ORDER_TOTAL_SUBTOTAL_DESCRIPTION
          
    $this->sort_order MODULE_ORDER_TOTAL_SUBTOTAL_SORT_ORDER;

          
    $this->output = array();
        }

        function 
    process() {
          global 
    $order$currencies;

          
    $this->output[] = array('title' => $this->title ':',
                                  
    'text' => $currencies->format($order->info['subtotal'], true$order->info['currency'], $order->info['currency_value']),
                                  
    'value' => $order->info['subtotal'] - $order->info['tax']);
        }

        function 
    check() {
          global 
    $db;
          if (!isset(
    $this->_check)) {
            
    $check_query $db->Execute("select configuration_value from " TABLE_CONFIGURATION " where configuration_key = 'MODULE_ORDER_TOTAL_SUBTOTAL_NO_TAX_STATUS'");
            
    $this->_check $check_query->RecordCount();
          }

          return 
    $this->_check;
        }

        function 
    keys() {
          return array(
    'MODULE_ORDER_TOTAL_SUBTOTAL_NO_TAX_STATUS''MODULE_ORDER_TOTAL_SUBTOTAL_NO_TAX_SORT_ORDER');
        }

        function 
    install() {
          global 
    $db;
          
    $db->Execute("insert into " TABLE_CONFIGURATION " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('This module is installed', 'MODULE_ORDER_TOTAL_SUBTOTAL_NO_TAX_STATUS', 'true', '', '6', '1','zen_cfg_select_option(array(\'true\'), ', now())");
          
    $db->Execute("insert into " TABLE_CONFIGURATION " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ORDER_TOTAL_SUBTOTAL_NO_TAX_SORT_ORDER', '99', 'Sort order of display.', '6', '2', now())");
        }

        function 
    remove() {
          global 
    $db;
          
    $db->Execute("delete from " TABLE_CONFIGURATION " where configuration_key in ('" implode("', '"$this->keys()) . "')");
        }
      }
    ?>
    Although I haven't tested it yet, probably will later today if I get around to it.

  5. #5
    Join Date
    Dec 2007
    Posts
    54
    Plugin Contributions
    0

    Default Re: I want an order-total module to display total w/o tax

    Quote Originally Posted by rozner View Post
    actually I was playing with this yesterday but I didn't have time to test it. But for those who are interested...

    PHP Code:
    <?php

          $this
    ->output[] = array('title' => $this->title ':',
                                  
    'text' => $currencies->format($order->info['subtotal'], true$order->info['currency'], $order->info['currency_value']),
                                  
    'value' => $order->info['subtotal'] - $order->info['tax']);
        }
    'value' => $order->info['subtotal'] - $order->info['tax']);

    this should be subtotal + shipping + discount - tax , or something similar, shouldn't it?

 

 

Similar Threads

  1. Incorrect Total after tax (VAT) display (exclusive total is the same as inclusive)
    By miggz in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 1
    Last Post: 27 Jan 2013, 11:41 AM
  2. Help with Cart total / order sub total
    By philip937 in forum General Questions
    Replies: 3
    Last Post: 19 Dec 2012, 11:46 AM
  3. Zencart order total does not match total at monsterpay
    By momoftwo in forum Addon Payment Modules
    Replies: 1
    Last Post: 12 Mar 2010, 02:33 PM
  4. Sub Total not matching actual total of products in order
    By PadreHomer in forum General Questions
    Replies: 0
    Last Post: 10 Sep 2008, 11:54 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR