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 ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| 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
| |||
| |||
| nobody? |
|
#3
| |||
| |||
| 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
| |||
| |||
| 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
| |||
| |||
| 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 //////////
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
| |||
| |||
| in which variable is stored in what zone the customer is? |
|
#7
| |||
| |||
| 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
| |||
| |||
| Hey, Thanks for the hack, I was wondering, Quote:
I have solved this by putting some of my 1337 pr0gr4mm1ng sk1llz in: /catalog/includes/modules/order_total/ot_total.php Thanks |
|
#9
| ||||
| ||||
| 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
|
|
#10
| |||
| |||
| he is right, use the fix from the bugtracker first. my fix is only working on my specific shop. |
| Thread Tools | |
| |
| ||||
| 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 |