osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

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 ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v2.0 Forums > osCMax v2 Installation issues

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 06-29-2005, 12:20 AM
Member
 
Join Date: Sep 2004
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Sander
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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #2  
Old 07-04-2005, 02:29 AM
Member
 
Join Date: Sep 2004
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Sander
Default RE: TAX removed at total

nobody?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3  
Old 07-04-2005, 05:12 AM
Lurker
 
Join Date: Jun 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
feemark
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #4  
Old 07-04-2005, 10:51 PM
Member
 
Join Date: Sep 2004
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Sander
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..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #5  
Old 07-05-2005, 02:17 AM
Member
 
Join Date: Sep 2004
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Sander
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #6  
Old 07-05-2005, 02:25 AM
Member
 
Join Date: Sep 2004
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Sander
Default RE: TAX removed at total

in which variable is stored in what zone the customer is?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #7  
Old 07-05-2005, 03:16 AM
Member
 
Join Date: Sep 2004
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Sander
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']);
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #8  
Old 07-19-2005, 06:34 PM
New Member
 
Join Date: Jun 2005
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
coeus
Default RE: TAX removed at total

Hey, Thanks for the hack, I was wondering,

Quote:
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #9  
Old 07-20-2005, 09:38 AM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,329
Thanks: 68
Thanked 322 Times in 305 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
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 Templates - Hundreds of premium quality templates. New designs every month!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host.

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #10  
Old 08-25-2005, 01:51 AM
Member
 
Join Date: Sep 2004
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Sander
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -8. The time now is 11:04 AM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax