Zen Cart Logo
Forums / General Questions / Two Sales Tax Fields

Two Sales Tax Fields

Locked

Views: 2,018

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
7 Jun 2006, 12:37 PM
#1
audradh avatar

audradh

Zen Follower

Join Date:
Oct 2005
Location:
Eastern US
Posts:
429
Plugin Contributions:
0

Two Sales Tax Fields

I have two sales tax fields that show up. One is correctly defined in english.php as it shows up as "Sales Tax: $0.00". Functionally, it doesn't do anything, the value is always zero.
The 2nd field is not defined properly as it shows up during checkout as " : $x.xx". No verbiage. Functionally, it calculates sales tax correctly, and it only shows up during checkout if there is a taxable item in the cart.
I thought I had solved this problem a while back, but alas, no.

Any ideas where to begin troubleshooting this will be much appreciated:smile:

Thanks,
Audra

7 Jun 2006, 6:14 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Two Sales Tax Fields

audradh:

I thought I had solved this problem a while back, but alas, no.

  1. You are suggesting that there is a history to this .... please elaborate.
  2. I can't tell from your post whether you desire to have 2 tax fields, but they're not working as expected, or whether one needs to be removed etc
  3. What mods have you installed on your site?
  4. You recently did a site upgrade. Was that the same site? What's the URL?
7 Jun 2006, 7:34 PM
#3
audradh avatar

audradh

Zen Follower

Join Date:
Oct 2005
Location:
Eastern US
Posts:
429
Plugin Contributions:
0

Re: Two Sales Tax Fields

DrByte:

  1. You are suggesting that there is a history to this .... please elaborate.

Just that it has been going on for a while. I did not notice it until later, so I'm not sure when it happenned.

  1. I can't tell from your post whether you desire to have 2 tax fields, but they're not working as expected, or whether one needs to be removed etc

Sorry. What I need is one 5% MA sales tax.
What I have is:
one 5% MA sales tax that needs a language define (but I'm not sure what it is that needs defining)
and one "Sales Tax: $0.00" field that is always there and always $0.00, which I do not need.

  1. What mods have you installed on your site?

Sales Report
Super Orders
Column Layout
Paypal Sessions Viewer
Product With Attributes Stock
Master Password
GeoTrust
Backup MySQL Admin
Ad Manager
Froogle (without SEFU)
Subscribe
Subscription Removal
Zen PDF Creator

  1. You recently did a site upgrade. Was that the same site? What's the URL?

Yes, the same site. The upgrade is not my live shop, but that is where I am doing the testing and trying to fix this problem. The URL is https://www.naturewearorganics.com/new_shop

Thanks for your time:smile:

Audra

7 Jun 2006, 7:37 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Two Sales Tax Fields

What's configured in Admin->Locations/Taxes->Tax Rates ?

7 Jun 2006, 8:45 PM
#5
audradh avatar

audradh

Zen Follower

Join Date:
Oct 2005
Location:
Eastern US
Posts:
429
Plugin Contributions:
0

Re: Two Sales Tax Fields

Tax Class Title:
Taxable Goods

Zone:
Massachusetts

Tax Rate (%):
5.0000

Description:

Tax rates at the same priority are added, others are compounded.

Priority:
1

8 Jun 2006, 3:37 AM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Two Sales Tax Fields

umm ... you are Down for Maintenance ... and we cannot peek ... :cry:

8 Jun 2006, 10:18 AM
#7
audradh avatar

audradh

Zen Follower

Join Date:
Oct 2005
Location:
Eastern US
Posts:
429
Plugin Contributions:
0

Re: Two Sales Tax Fields

:p :p

Picky picky...OK, no longer down for maintenance. The databases will be upgraded again before going live, so feel free to create accounts and place orders if needed to view the problem in action.

BTW, as I mentioned, most of my products are not taxable, everything in the category, Sigg Bottles, is taxable and should show the trouble if added to your cart.

FWIW, this is the define in /includes/languages/my_template/english.php```
define('TEXT_UNKNOWN_TAX_RATE', 'Sales Tax');


I have intermittent trouble w/ my developers tool kit, but I will try and follow that lead right now.

Thanks!
Audra
8 Jun 2006, 10:31 AM
#8
audradh avatar

audradh

Zen Follower

Join Date:
Oct 2005
Location:
Eastern US
Posts:
429
Plugin Contributions:
0

Re: Two Sales Tax Fields

Here is the associated code I was able to find in /includes/functions/functions_taxes.php```
// Return the tax description for a zone / class
// TABLES: tax_rates;
function zen_get_tax_description($class_id, $country_id, $zone_id) {
global $db;
$tax_query = "select tax_description
from " . TABLE_TAX_RATES . " tr
left join " . TABLE_ZONES_TO_GEO_ZONES . " za on (tr.tax_zone_id = za.geo_zone_id)
left join " . TABLE_GEO_ZONES . " tz on (tz.geo_zone_id = tr.tax_zone_id)
where (za.zone_country_id is null or za.zone_country_id = '0'
or za.zone_country_id = '" . (int)$country_id . "')
and (za.zone_id is null
or za.zone_id = '0'
or za.zone_id = '" . (int)$zone_id . "')
and tr.tax_class_id = '" . (int)$class_id . "'
order by tr.tax_priority";

$tax = $db->Execute($tax_query);

if ($tax->RecordCount() > 0) {
  $tax_description = '';
  while (!$tax->EOF) {
    $tax_description .= $tax->fields['tax_description'] . ' + ';
    $tax->MoveNext();
  }
  $tax_description = substr($tax_description, 0, -3);

  return $tax_description;
} else {
  return TEXT_UNKNOWN_TAX_RATE;
}

}


Since it is an erroneous field I suppose I could play around w/ commenting lines out, but, rather than break it, I think I will wait for somebody who can actually read php to glance at it for me if they are so inclined.

Thanks to all of you knowledgeables out there who have been so helpful,
Audra
12 Jun 2006, 7:52 PM
#9
audradh avatar

audradh

Zen Follower

Join Date:
Oct 2005
Location:
Eastern US
Posts:
429
Plugin Contributions:
0

Re: Two Sales Tax Fields

I have solved the missing define: admin interface: Locations/Taxes->Tax Rates->Define Zones->definition

I still have the erroneous tax field however.

I commented out ```
return TEXT_UNKNOWN_TAX_RATE;


I'm off to test that again because it just doesn't sound right to me.

OK, I verified this. If the working sales tax field is defined, then commenting out the above code only makes the define for the erroneous tax field disappear. If the working sales tax field in not defined, and the above code is commented out, then the entire erroneous sales tax field disappears.

Any ideas?

Audra
21 Jul 2006, 2:48 PM
#10
angel17846 avatar

angel17846

New Zenner

Join Date:
Dec 2005
Posts:
57
Plugin Contributions:
0

Re: Two Sales Tax Fields

I am having the same problem all of a sudden. It was working fine before, but I cannot remember changing anything.

Did you ever find a solution? Right now I am showing AL TAX 4% as well as a Sales Tax: 0 field.

thanks,
Angel

21 Jul 2006, 3:01 PM
#11
angel17846 avatar

angel17846

New Zenner

Join Date:
Dec 2005
Posts:
57
Plugin Contributions:
0

Re: Two Sales Tax Fields

My problem is solved. Somehow my products were no longer assigned to a tax class. When I went in to edit a product, it said "none" in the tax class dropdown. I have no idea how that happened. They were all assigned to the same tax class and all was working just yesterday.

Anyway, at least I know what the problem was now.

Angel