[email protected] Posted February 22, 2007 Share Posted February 22, 2007 This might be a dumb question, but all I'm looking to do is charge a set amount of sales tax for people if their shipping address is in the state of Ohio, and nothing else. Is this possible through OS Commerce or do I need a module (and if it is possible through OS Commerce right off the bat, how do you set it up?). Thanks for the help if you can provide it. Link to comment Share on other sites More sharing options...
Velveeta Posted February 22, 2007 Share Posted February 22, 2007 This might be a dumb question, but all I'm looking to do is charge a set amount of sales tax for people if their shipping address is in the state of Ohio, and nothing else. Is this possible through OS Commerce or do I need a module (and if it is possible through OS Commerce right off the bat, how do you set it up?). Thanks for the help if you can provide it. Yes, this is possible right out of the box, so to speak... Look in your admin console, under the Localizations section, and you'll find the pages for setting up tax classes and tax zones... You can copy the format of the Florida zone, which comes installed by default (or you can rename it and change the tax value and location details for it), and make sure you click the details button to set the actual zone where this tax rate will apply... It's a common mistake for people to just set the tax value and change the name to say, Ohio, but not actually select Ohio from the dropdown list of zones on the details page... Then you'll just make sure that in all of your product pages, you select that tax class to apply to that product... Richard. Richard Lindsey Link to comment Share on other sites More sharing options...
dukesgrl Posted February 22, 2007 Share Posted February 22, 2007 This might be a dumb question, but all I'm looking to do is charge a set amount of sales tax for people if their shipping address is in the state of Ohio, and nothing else. Is this possible through OS Commerce or do I need a module (and if it is possible through OS Commerce right off the bat, how do you set it up?). Thanks for the help if you can provide it. Not sure if you got this done but this is simple to do. Go to your admin. Click on Locations/Taxes. Go to Tax Classes-new tax class and add shipping tax...follow the prompts. Then go to Tax Rates and add Ohio and the percentage as your shipping tax. Only Ohio will be charged a shipping tax. You can do this with whatever state you need to collect from. I'm in NJ..we had the same issue here. You do not need to add this info to your products. Dorinda Link to comment Share on other sites More sharing options...
Velveeta Posted February 22, 2007 Share Posted February 22, 2007 Not sure if you got this done but this is simple to do. Go to your admin. Click on Locations/Taxes. Go to Tax Classes-new tax class and add shipping tax...follow the prompts. Then go to Tax Rates and add Ohio and the percentage as your shipping tax. Only Ohio will be charged a shipping tax. You can do this with whatever state you need to collect from. I'm in NJ..we had the same issue here. You do not need to add this info to your products. Dorinda Actually you do need to add the tax class to your products... The default is what most people leave, which is Taxable Goods, but this determines what zone tax is applied to this product when you go to checkout... For example, if you have some products that you ship (meaning you have warehouses or facilities in these places, not if you're a dropshipper and your vendor ships from here) from CA, some from NJ, and some from AZ, you would set up 3 different tax zones, with each state's tax rate in it... if product A ships from AZ, you put that tax class assignment in its product page, if product B ships from CA, you put that tax class, etc... Then, if your customer is located in AZ, the only product(s) they get taxed on are any that are shipping from your AZ facility, and the others are not taxed at all... So if you're a dropshipper, or your facilities are solely contained in Ohio, you'll charge OH state tax, and only to OH customers, but you'll need to apply that OH tax class to all of your products that fit this bill... Richard. Richard Lindsey Link to comment Share on other sites More sharing options...
rrrhythm Posted February 26, 2007 Share Posted February 26, 2007 I'm having trouble with exactly this issue. i think i've configured everything right, but must not have, because it's charging the sales tax regardless of what their billing/shipping address is. help? rj Link to comment Share on other sites More sharing options...
Velveeta Posted February 26, 2007 Share Posted February 26, 2007 I'm having trouble with exactly this issue. i think i've configured everything right, but must not have, because it's charging the sales tax regardless of what their billing/shipping address is. help? rj Verify in the tax zones section that you've got it set to the specific state you want to charge tax for, this will be under that tax zone's details... You should have a dropdown list of countries to choose from, and then a dropdown list of states... Richard. Richard Lindsey Link to comment Share on other sites More sharing options...
rrrhythm Posted February 26, 2007 Share Posted February 26, 2007 Verify in the tax zones section that you've got it set to the specific state you want to charge tax for, this will be under that tax zone's details... You should have a dropdown list of countries to choose from, and then a dropdown list of states... Richard. richard- thanks a bunch for the help. i still don't quite have it, though. following your directions, under tax zone details, yes, i have a dropdown list of countries, but now i don't have a dropdown list of states (my only option there is "All Zones", likely the problem) cheers, rj Link to comment Share on other sites More sharing options...
rrrhythm Posted February 26, 2007 Share Posted February 26, 2007 ok, i've got this solved finally (sort of). for anyone else who is following this thread, the problem was that under Admin>Locations/Taxes>Zones, there weren't any zones. once i added a zone for my state in (NC in my case), then I could go to Admin>Locations/Taxes>Tax Zones>Details, and select the country and state as per richards prior advice (note the difference between the Zones and Tax Zones sections). i say sort of fixed because now it does or does not add tax according to the customers address (if state = NC), but it's based on the DELIVERY address and not the billing address. i need to make it be based on the billing address. anyone point me to where in the code the pertinant conditional is? or maybe my problem is that i'm thinking about it from the point of the code and it's really something buried within the admin configuration. this whole thing has me feeling rather bone-headed. i don't program for a living, but i've been working on this site for almost a year now, and have gotten to be a pretty knowlegeable programmer. thanks again for the help, richard. cheers, rj Link to comment Share on other sites More sharing options...
Velveeta Posted February 26, 2007 Share Posted February 26, 2007 ok, i've got this solved finally (sort of). for anyone else who is following this thread, the problem was that under Admin>Locations/Taxes>Zones, there weren't any zones. once i added a zone for my state in (NC in my case), then I could go to Admin>Locations/Taxes>Tax Zones>Details, and select the country and state as per richards prior advice (note the difference between the Zones and Tax Zones sections). i say sort of fixed because now it does or does not add tax according to the customers address (if state = NC), but it's based on the DELIVERY address and not the billing address. i need to make it be based on the billing address. anyone point me to where in the code the pertinant conditional is? or maybe my problem is that i'm thinking about it from the point of the code and it's really something buried within the admin configuration. this whole thing has me feeling rather bone-headed. i don't program for a living, but i've been working on this site for almost a year now, and have gotten to be a pretty knowlegeable programmer. thanks again for the help, richard. cheers, rj I don't think this is an admin setting anywhere, and the pertinent code may be spread out a little bit, I don't have it in front of me right now... But I would start by checking the shopping_cart.php class file, and looking for starters at the get_products function, as I believe it does a tax check there... You'll also want to check the calculate function, and possibly the ot_tax.php order_totals module file, although it may just read from the information that's received from the shopping_cart, so you may be able to nail it all right there... Richard. Richard Lindsey Link to comment Share on other sites More sharing options...
Guest Posted February 26, 2007 Share Posted February 26, 2007 goto your osc admin->Maximum Values->Address Book Entries. Set it to 1. That will enforce just one address entry per customers. So the billing and shipping have to match. Link to comment Share on other sites More sharing options...
rrrhythm Posted February 26, 2007 Share Posted February 26, 2007 I don't think this is an admin setting anywhere, and the pertinent code may be spread out a little bit, I don't have it in front of me right now... But I would start by checking the shopping_cart.php class file, and looking for starters at the get_products function, as I believe it does a tax check there... You'll also want to check the calculate function, and possibly the ot_tax.php order_totals module file, although it may just read from the information that's received from the shopping_cart, so you may be able to nail it all right there... Richard. ok. i'll start digging into this. it does not seem to be in /modules/oder_totals/ot_tax.php, nor in /modules/order_totals.php. at first glance, it's not in class/shopping_cart.php either. the tax checks there are (i think) concerning the tax status of the product (i.e whether it's taxable or not), and don't have anything to do with the customers address. but shopping_cart.php is pretty long, so it will take me a while to digest. goto your osc admin->Maximum Values->Address Book Entries. Set it to 1. That will enforce just one address entry per customers. So the billing and shipping have to match. That's a very clever hack, mark! (but unfortunately, not what i want to do) cheers, rj Link to comment Share on other sites More sharing options...
Velveeta Posted February 26, 2007 Share Posted February 26, 2007 I forgot to mention, you may want to check the order class file as well, as it receives a list from get_products, and may then do some tax calculations of its own using that tax_class_id... Again though, I'm not positive of this, as I don't have the code in front of me :) Richard. Richard Lindsey Link to comment Share on other sites More sharing options...
rrrhythm Posted February 26, 2007 Share Posted February 26, 2007 i think i found where it probably is, in /classes/order.php (i kept thinking it would be in classes/order_total.php), but oh my, it's going to take me a while wrap my head around that bunch of inscrutible code. just when i think i really have a handle on most all of the code in osC, i find there's a whole level i haven't really touched. because i don't really have a good grasp of object oriented php, i considered it wise on my part leave all the classes more or less alone (except for the infoBox class, which i've jacked around to suit me). cheers, rj Link to comment Share on other sites More sharing options...
rrrhythm Posted February 26, 2007 Share Posted February 26, 2007 I forgot to mention, you may want to check the order class file as well, as it receives a list from get_products, and may then do some tax calculations of its own using that tax_class_id... Again though, I'm not positive of this, as I don't have the code in front of me :) Richard. yes, it is in classes/order.php, at least i think. relevant code seems to be: $tax_address_query = tep_db_query("select ab.entry_country_id, ab.entry_zone_id from " . TABLE_ADDRESS_BOOK . " ab left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id) where ab.customers_id = '" . (int)$customer_id . "' and ab.address_book_id = '" . (int)($this->content_type == 'virtual' ? $billto : $sendto) . "'"); i think the ternary operator at the end there is selecting $billto address for virtual products (which wouldn't have a $sendto address) but i tried changing that to: $tax_address_query = tep_db_query("select ab.entry_country_id, ab.entry_zone_id from " . TABLE_ADDRESS_BOOK . " ab left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id) where ab.customers_id = '" . (int)$customer_id . "' and ab.address_book_id = '" . (int)$billto . "'"); and that doesn't seem to have worked (which surprises me enough that i'm going back to double check). cheers, rj Link to comment Share on other sites More sharing options...
rrrhythm Posted February 26, 2007 Share Posted February 26, 2007 ... and that doesn't seem to have worked (which surprises me enough that i'm going back to double check). cheers, rj yep, i goofed and was uploading the wrong file. the above code change does, in fact work, so that the tax rate is based on the billing address and not the delivery address. taxes, taxes, taxes. reminds me that i better get in gear and do mine. thanks for the tips! cheers, rj Link to comment Share on other sites More sharing options...
Velveeta Posted February 26, 2007 Share Posted February 26, 2007 yes, it is in classes/order.php, at least i think. relevant code seems to be: $tax_address_query = tep_db_query("select ab.entry_country_id, ab.entry_zone_id from " . TABLE_ADDRESS_BOOK . " ab left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id) where ab.customers_id = '" . (int)$customer_id . "' and ab.address_book_id = '" . (int)($this->content_type == 'virtual' ? $billto : $sendto) . "'"); i think the ternary operator at the end there is selecting $billto address for virtual products (which wouldn't have a $sendto address) but i tried changing that to: $tax_address_query = tep_db_query("select ab.entry_country_id, ab.entry_zone_id from " . TABLE_ADDRESS_BOOK . " ab left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id) where ab.customers_id = '" . (int)$customer_id . "' and ab.address_book_id = '" . (int)$billto . "'"); and that doesn't seem to have worked (which surprises me enough that i'm going back to double check). cheers, rj If you have ssh access to the machine, you can try to find all instances of queries that rely on the shipto address with a command line like this (from the root catalog directory): find . name "*.php" -exec grep -Hn "shipto" {} \; | grep tep_db_query Richard. Richard Lindsey Link to comment Share on other sites More sharing options...
DailyLunatic Posted February 26, 2007 Share Posted February 26, 2007 for anyone else who is following this thread, the problem was that under Admin>Locations/Taxes>Zones, there weren't any zones. once i added a zone for my state in (NC in my case), then I could go to Admin>Locations/Taxes>Tax Zones>Details, and select the country and state as per richards prior advice (note the difference between the Zones and Tax Zones sections). <blink><blink> uhhh... someone mind explaining this to me? Seriously, I have brain freeze everytime i read about setting up taxes. I thoroughly do NOT understand what they are trying to tell me. Sterling (a.k.a. DailyLunatic) Useful Threads: Basics for Design. Useful URL's: Knowledge Base, SQL Tutorial, My Setup: Master Products v1.2, Need help installing Bundled Products v1.4. Link to comment Share on other sites More sharing options...
rrrhythm Posted February 26, 2007 Share Posted February 26, 2007 <blink><blink> uhhh... someone mind explaining this to me? Seriously, I have brain freeze everytime i read about setting up taxes. I thoroughly do NOT understand what they are trying to tell me. Step 1: go back and re-read this thread from the beginning, and try to sort out where people are talking about configuring things in the admin section (mostly in the beginning of this thread) and where they are getting into deeper issues of changing the php coding to change the behavior of osC (mostly in the end of this thread, and stuff you can probably ignore). Step 2: go to your admin panel Step 3. click on "Locations/Taxes" Step 4: Look for a box on the left hand side of the page that comes up. It will, in bold, say (blue text represents submenu links): Configuration Catalog Modules Customers Locations / Taxes Countries Zones Tax Zones Tax Classes Tax Rates Localization Reports Tools NewsDesk Header Tags Step 5: go back and re-read this thread from the beginning. Step 6: try to translate. For example, in post # 6 richard says: Verify in the tax zones section that you've got it set to the specific state you want to charge tax for, this will be under that tax zone's details... You should have a dropdown list of countries to choose from, and then a dropdown list of states... That means: click on the link called "Tax Zones" in the box refered to in Step 4. what comes up? is it what you want? chances are that is says something about Florida, which is great if you live in florida. if not, then you can either insert a new tax zone by clicking on the button labeled "Insert", or you can edit the existing zone by clicking on the button labeled "edit". then click on the button on the right hand side labeled "Details". what comes up? is it what you want? and again, you can either edit what's there, or insert a new one. Step 7: if you get lost, try to ask a question that is as specific as possible. tell folks what you did and exactly where you got lost or what went wrong. different people use slightly different notation/shorthand, but for example in post #8 i wrote: Admin>Locations/Taxes>Tax Zones>Details which is a shorthand way of saying: go to the admin panel, click on "Locations/Taxes", then cick on Tax Zones, then click on the Details button. good luck unfreezing that brain. cheers, rj Link to comment Share on other sites More sharing options...
DailyLunatic Posted February 27, 2007 Share Posted February 27, 2007 Step 1: go back and re-read this thread from the beginning, and try to sort out where people are talking about configuring things in the admin section (mostly in the beginning of this thread) and where they are getting into deeper issues of changing the php coding to change the behavior of osC (mostly in the end of this thread, and stuff you can probably ignore). Thank you for the detailed information. I truly believe it will be of use when I get to that point. But, I think my question is a bit more basic though at the moment. What is the difference between Zones, and Tax Zones? Are Zones bigger and Tax Zones smaller? Like State=Zone and County=Tax Zone? The other way around? What kind of zone for City? Need to understand what all these different 'zones' ARE. I'll figure out HOW after that. OK has 450+ Tax uh... 'areas' and wants taxes based on delivery address. So, I'm taking all this seriously. Not being obtuse on purpose, just very confused. Sterling (a.k.a. DailyLunatic) Useful Threads: Basics for Design. Useful URL's: Knowledge Base, SQL Tutorial, My Setup: Master Products v1.2, Need help installing Bundled Products v1.4. Link to comment Share on other sites More sharing options...
rrrhythm Posted February 27, 2007 Share Posted February 27, 2007 Not being obtuse on purpose, just very confused. i hear you, man. and i know the feeling. i spent several months feeling like i was swimming in dark and murky water, and even now, when i feel like i've got a really good grip on the whole thing, i still get confused. as for your question concerning zones, it's a good one. what is the difference between a zone and a tax zone? and what about geo-zones? i'm not really sure myself. my advice is to leave your question here for a few days to see is someone more knowlegeable can answer it (richard?), and if noone does, move your question to a new thread and see what you get. i know there is an answer for your problem out there, because think of what the folks in the EU have to deal with, can't be too differerent from what you want to do. cheers, rj Link to comment Share on other sites More sharing options...
Velveeta Posted February 27, 2007 Share Posted February 27, 2007 i hear you, man. and i know the feeling. i spent several months feeling like i was swimming in dark and murky water, and even now, when i feel like i've got a really good grip on the whole thing, i still get confused. as for your question concerning zones, it's a good one. what is the difference between a zone and a tax zone? and what about geo-zones? i'm not really sure myself. my advice is to leave your question here for a few days to see is someone more knowlegeable can answer it (richard?), and if noone does, move your question to a new thread and see what you get. i know there is an answer for your problem out there, because think of what the folks in the EU have to deal with, can't be too differerent from what you want to do. cheers, rj Here's the difference between zones, geo-zones, and tax zones... Your countries are just that, country listings, and are held in the countries table... The "Zones" are places within these countries, which are mapped to them, i.e. Hamburg, Germany.. Rome, Italy.. Moscow, Russia.. Florida, United States.. etc... The "Geo-Zones" are entries that are used in the "Tax Zones" area of the admin console... They're only used for mapping easily-remembered names and descriptions to your tax zones, that's the only purpose of this table, it has fields for its geo_zone_id, _name, _description, date_added, and last_modified... That geo_zone_id is then mapped in the zones_to_geo_zones table so that it's actually associated with a physical location, i.e. Florida, United States.. or Hamburg, Germany.. or wherever... The tax rates and tax classes are assigned to their own tables as well, and are mapped to these locations as well... The tax class is simply created as an easily-remembered entry, and these various tax zones are assigned under it... The tax rates are assigned to the actual locations via the details button on the tax zone entry itself, that way the rate is applied to 1 zone entry inside the tax class that it's assigned to... So for example, consider this default configuration: Taxable Goods - FL State Sales Tax 7.0%... FL is the zone, i.e. Florida, United States.. Taxable Goods is the Tax Class that it is assigned to 7.0% is the tax rate that is assigned to that one zone, making it a tax zone, with a name and/or description of FL State Sales Tax, and also making its entry in the geo_zones_to_zones table... Hopefully this helped, but I can definitely understand if it made you dizzy in the process :) Richard. Richard Lindsey Link to comment Share on other sites More sharing options...
jonquil Posted February 28, 2007 Share Posted February 28, 2007 This might be a dumb question, but all I'm looking to do is charge a set amount of sales tax for people if their shipping address is in the state of Ohio, and nothing else. Is this possible through OS Commerce or do I need a module (and if it is possible through OS Commerce right off the bat, how do you set it up?). Thanks for the help if you can provide it. Hi, If I remember, doesn't Ohio have multiple tax rates across the state? Does one % rate cover all counties & cities/towns? There are state-specific Contributions here you may find useful (Ohio, North Carolina, Georgia, too): http://www.oscommerce.com/community?contri...mp;category=all If anyone has a Contribution for Tennessee, please holler :) jon It's all just ones and zeros.... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.