osCmax v2.5 User Manual
Results 1 to 10 of 10

TAX removed at total

This is a discussion on TAX removed at total within the osCmax v2 Installation issues forums, part of the osCmax v2.0 Forums category; when i order a product worth 100$, with 19% tax it cost 119$ in the shop. i order it, everything ...

      
  1. #1
    Member
    Join Date
    Sep 2004
    Posts
    62
    Rep Power
    0


    Default TAX removed at total

    when i order a product worth 100$, with 19% tax it cost 119$ in the shop.

    i order it, everything goes fine, but at order total it calculates 100$ + shipping = 105$.

    it leaves the tax away!!

    why?

  2. #2
    Member
    Join Date
    Sep 2004
    Posts
    62
    Rep Power
    0


    Default RE: TAX removed at total

    nobody?

  3. #3
    Lurker
    Join Date
    Jun 2005
    Posts
    1
    Rep Power
    0


    Default RE: TAX removed at total

    Hi

    In the Order Total Module, check that the Sort Order for Total is higher than Tax, so for example, Sub-Total is 1, Shipping is 2, Tax is 3, Total is 4. If Total is 4 and Tax is 5, or Total is 3 and Tax is 4, then it will not calculate it.

    Sorry if this is something you have already covered, but I am new to this too.

    Cheers

  4. #4
    Member
    Join Date
    Sep 2004
    Posts
    62
    Rep Power
    0


    Default RE: TAX removed at total

    No, thanks for the answer but this was already the case, problem is that it takes the actual product with out TAX already, and it never adds it back.

    Even though it is displayed with tax in the shop..

  5. #5
    Member
    Join Date
    Sep 2004
    Posts
    62
    Rep Power
    0


    Default RE: TAX removed at total

    I have solved this by putting some of my 1337 pr0gr4mm1ng sk1llz in:

    in /catalog/includes/modules/order_total from line 36 add:
    Code:
    ////////// TAX CALCULATIONS START //////////
    
    $query = "SELECT tax_rate FROM tax_rates WHERE tax_rates_id = 1";
    $result = mysql_query($query) or die("query failed : " . mysql_error());
    $table = mysql_fetch_array($result);
    $tax_rate = stripslashes($table['tax_rate']);
    
    $tax_rate2 = '1.' . $tax_rate;
    $total = $order->info['subtotal'] * $tax_rate2;
    $percent = 100;
    $tax = $total / $percent * $tax_rate;
    
    $_SESSION['total'] = number_format($total, 2, '.', ',');
    $_SESSION['tax'] = number_format($tax, 2, '.', ',');
    
    ////////// TAX CALCULATIONS END //////////
    this takes one defined tax rate in oscommerce with id = 1
    i will built in support for countries later



    in ot_total.php you replace the first part with this piece:

    Code:
        var $title, $output;
    
        function ot_total() {
          $this->code = 'ot_total';
          $this->title = MODULE_ORDER_TOTAL_TOTAL_TITLE;
          $this->description = MODULE_ORDER_TOTAL_TOTAL_DESCRIPTION;
          $this->enabled = ((MODULE_ORDER_TOTAL_TOTAL_STATUS == 'true') ? true : false);
          $this->sort_order = MODULE_ORDER_TOTAL_TOTAL_SORT_ORDER;
          $this->title1 = MODULE_ORDER_TOTAL_TAX_TITLE;
    
          $this->output = array();
        }
    
        function process() {
          global $order, $currencies;
    
          $this->output[] = array('title' => $this->title1 . ':',
                                  'text' => $_SESSION['tax'] . 'EUR',
                                  'value' => $order->info['total']);
    
          $this->output[] = array('title' => $this->title . ':',
                                  'text' => '<b>' . $_SESSION['total'] . 'EUR</b>',
                                  'value' => $order->info['total']);
        }

    now tax shows up in the confirmation and in the email u get too

  6. #6
    Member
    Join Date
    Sep 2004
    Posts
    62
    Rep Power
    0


    Default RE: TAX removed at total

    in which variable is stored in what zone the customer is?

  7. #7
    Member
    Join Date
    Sep 2004
    Posts
    62
    Rep Power
    0


    Default RE: TAX removed at total

    forget it i already found it, changed this for tax selection based on country:

    Code:
    // decide whether customer is in the netherlands or not
    if ($_SESSION['customer_country_id'] == 150) { $zone = nl; } else { $zone = other; }
    
    // switch the query based upon country
    switch($zone) {
    CASE other:
    	$query = "SELECT tax_rate FROM tax_rates WHERE tax_rates_id = 2";
    	$result = mysql_query($query) or die("query failed : " . mysql_error());
    	$table = mysql_fetch_array($result);
    	$tax_rate = stripslashes($table['tax_rate']);
    	break;
    DEFAULT:
    	$query = "SELECT tax_rate FROM tax_rates WHERE tax_rates_id = 1";
    	$result = mysql_query($query) or die("query failed : " . mysql_error());
    	$table = mysql_fetch_array($result);
    	$tax_rate = stripslashes($table['tax_rate']);
    }

  8. #8
    New Member
    Join Date
    Jun 2005
    Posts
    12
    Rep Power
    0


    Default RE: TAX removed at total

    Hey, Thanks for the hack, I was wondering,

    I have solved this by putting some of my 1337 pr0gr4mm1ng sk1llz in:

    in /catalog/includes/modules/order_total from line 36 add:
    What file's the file? "order_total" is a directory.. did you mean:
    I have solved this by putting some of my 1337 pr0gr4mm1ng sk1llz in:

    /catalog/includes/modules/order_total/ot_total.php

    Thanks

  9. #9
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    Default RE: TAX removed at total

    Do not use this workaround, as it does not actually address the bug that causes the tax problem in the first place.

    This bug has been resolved and you can get the official fix here:
    http://bugtrack.oscmax.com/view.php?id=29
    Michael Sasek
    osCMax Developer


    osCmax Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    Stay Up To Date with everything osCMax:
    Free osCmax Newsletters - Security notices, New Releases, osCMax News
    osCmax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  10. #10
    Member
    Join Date
    Sep 2004
    Posts
    62
    Rep Power
    0


    Default RE: TAX removed at total

    he is right, use the fix from the bugtracker first.

    my fix is only working on my specific shop.

Similar Threads

  1. Removed the /install directory but the warning still appears
    By oling in forum osCmax v2 Installation issues
    Replies: 1
    Last Post: 08-24-2006, 06:23 PM
  2. 2co showing total as $0, please please please help me
    By pete76uk in forum osCommerce 2.2 Installation Help
    Replies: 0
    Last Post: 11-14-2004, 06:57 AM
  3. That old Tax problem again! :( - Tax removed at checkout
    By JJJ in forum osCMax v1.7 Installation
    Replies: 0
    Last Post: 06-21-2004, 09:28 AM
  4. Price Breaks -- Were they removed from MAX?
    By Anonymous in forum osCmax v1.7 Discussion
    Replies: 8
    Last Post: 03-17-2004, 03:00 AM
  5. shipping total help
    By Raysworld in forum osCmax v1.7 Discussion
    Replies: 0
    Last Post: 03-02-2004, 07:10 AM

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
  •