jwsfun Posted November 14, 2003 Share Posted November 14, 2003 Hello, This is the first time I've contributed to osCommerce, and I hope you'll find this useful. I will be uploading a zip in the Contributions area of the osCommerce Support site later this evening. This contrib is a modification of the "City Tax Rate Hack for MS1", written by 'Ocularmagic' and 'Akshara Weave'. All credit goes to them, whereas I have only made the necessary changes to reflect a county tax, and not a city tax. One install.txt file is included, no additional .php files to add and only one change to your database (but only if you need it). Any questions, comments, or suggestions for improvement can be made here in this forum, via this thread. Thanks to the above two mentioned individuals for allowing me to utilize their work to solve a problem I've been plagued with for a long time now. I hope this mod is beneficial to the rest of you who may need it. Good luck :). Quote Link to comment Share on other sites More sharing options...
jwsfun Posted November 14, 2003 Author Share Posted November 14, 2003 Contribution is ready to go: County Sales Tax Mod Hope you like it :). Quote Link to comment Share on other sites More sharing options...
jwsfun Posted November 14, 2003 Author Share Posted November 14, 2003 I made a correction (addition) to the original zip file, so please visit THIS link instead, and NOT the one listed above: County Sales Tax Modification (Updated) Thanks :). Quote Link to comment Share on other sites More sharing options...
phisig Posted November 20, 2003 Share Posted November 20, 2003 I have applied this MOD and now the site will not load. I receive the following errors in the log file: PHP Fatal error: main(): Failed opening required 'includes/languages/.php' (include_path='.:/usr/local/lib/php-4.3.3/lib/php') in /home/users/web/b64/morsem005/commerce/catalog/includes/application_top.php on line 285 PHP Warning: main(includes/languages/.php): failed to open stream: No such file or directory in /home/users/web/b64/morsem005/commerce/catalog/includes/application_top.php on line 285 PHP Parse error: parse error in /home/users/web/b64/morsem005/commerce/catalog/includes/functions/general.php on line 311 Anyone have any suggestions? /Thanks. Quote Link to comment Share on other sites More sharing options...
phisig Posted November 20, 2003 Share Posted November 20, 2003 application_top.php // include the language translations require(DIR_WS_LANGUAGES . $language . '.php'); general.php 306 // Returns the tax rate for a zone / class 307 // TABLES: tax_rates, zones_to_geo_zones 308 function tep_get_tax_rate($class_id, $country_id = -1, $zone_id = -1) { 309 global $customer_zone_id, $customer_country_id, $customer_id; 310 311 $customer_suburb_query = tep_db_query("select entry_suburb, entry_zone_id" from . TABLE_ADDRESS_BOOK . " where customers_id = '" . $customer_id . "'"); Quote Link to comment Share on other sites More sharing options...
shris Posted January 18, 2004 Share Posted January 18, 2004 Hi. I am having the same problem with application_top. I figured out the one in the general file--it was a missing brace (the close curly brace } ) after custom tax rate 3 (the last elseif statement). The problem with application top is a little baffling, since I did not have to make any changes there--there was no reference to SUBURB to change in my original application top file. So the problem must also be in general. The variable $language is not being evaluated correctly--it is evaluating to NULL for some reason, despite the fact that the section of application top immediately preceding the affected line is the bit having to do with grabbing the language. Unfortunately knowing this doesn't help me fix it, since I'm not a coder. If anyone knows what's missing or how to fix this, I'd appreciate a clue. I'd really like to get this working, since I'm trying to build my local clientele. I suppose I could lobby the NC legislature to pressure Mecklenberg county to use the same tax rate as the 99 other counties in the state, but I'm guessing that's a rough sell. *sigh* Help? shris Quote Link to comment Share on other sites More sharing options...
Orphon Posted April 18, 2004 Share Posted April 18, 2004 after I figure out the problem in general it seems to also fix the problem in application_top Also, he says in the install doc that he doesn't get the individual text to show... it does on mine and I did it the way he says, so I dunno Quote Angela Link to comment Share on other sites More sharing options...
jcfrazier Posted April 28, 2004 Share Posted April 28, 2004 I have installed the mod and got things working fine. One question though... what if the person doesn't type the county in correctly? Like a misspelling or using all caps, or all lower case? Seems like you would have to add all counties to the database and instruct the php file to run a check against the database to check in that county exists, if not give an error message. That an have a note on the side saying to type a certain way (caps, first letter caps, etc). Quote Link to comment Share on other sites More sharing options...
Orphon Posted May 22, 2004 Share Posted May 22, 2004 (edited) I am not sure if it is due to this mod, but if I add a product and choose none for the tax class it still adds tax... I do not want to charge tax for gift vouchers and such... any help? Edited May 22, 2004 by Orphon Quote Angela Link to comment Share on other sites More sharing options...
Orphon Posted October 10, 2004 Share Posted October 10, 2004 Anyone have any idea? it seems that this mod makes the cart ignore wether you have a tax class set or not... if you are in one of the taxable zones it charges tax even if the item is marked not taxable. Anyone help ASAP? Quote Angela Link to comment Share on other sites More sharing options...
SNewman Posted July 10, 2005 Share Posted July 10, 2005 (edited) I have installed the mod and got things working fine.? One question though...? what if the person doesn't type the county in correctly?? Like a misspelling or using all caps, or all lower case? Seems like you would have to add all counties to the database and instruct the php file to run a check against the database to check in that county exists, if not give an error message.? That an have a note on the side saying to type a certain way (caps, first letter caps, etc). If I remember correctly, the MOD uses a Like operator in the MySQL query, meaning that A. capitalization does not matter and B. as long as it is close enough, it will detect the county. Edited July 10, 2005 by SNewman Quote Link to comment Share on other sites More sharing options...
mfaggion Posted August 23, 2005 Share Posted August 23, 2005 Angela, Did you ever figure anything out with this? I have the same issue. As I look at the code, it appears that the tax rates are set in the County code, and thus the normal processing of checking to ensure a tax rate has been selected for a product does not happen (or does not work). I'm going to try to see if I can get it to check for the tax rate before the mod starts. If you have any insight, let me know. If I am successful, I'll let you know. Mark I am not sure if it is due to this mod, but if I add a product and choose none for the tax class it still adds tax... I do not want to charge tax for gift vouchers and such... any help? <{POST_SNAPBACK}> Quote Link to comment Share on other sites More sharing options...
mfaggion Posted August 24, 2005 Share Posted August 24, 2005 I was able to address the issue about the tax class and tax rates. I added an if statement checking to see if the $class_id is '0' (which indicates that you did not select a tax class for the product. If it is '0', I skip over where the County mod sets the tax rates in the functions/general.php file (somewhere between lines 250 and 310, I believe). Glad to have that issue behind me. Hope it helps. Mark Quote Link to comment Share on other sites More sharing options...
Guest Posted August 24, 2005 Share Posted August 24, 2005 there is an ohio sales tax by county contribution, look at that Quote Link to comment Share on other sites More sharing options...
Leeb2 Posted April 2, 2006 Share Posted April 2, 2006 The problem with application top is a little baffling, since I did not have to make any changes there--there was no reference to SUBURB to change in my original application top file. So the problem must also be in general. Hi. For me the line in step three define('ACCOUNT_SUBURB', true); was not in either includes/application_top.php or includes/filenames.php so I just added it to application_top.php, and that worked for me. Quote Link to comment Share on other sites More sharing options...
zeetarian Posted December 22, 2008 Share Posted December 22, 2008 Hy, hopefully u will be fine. I have used ur contribution, its working fine, but issue is quite bit different. My requirement is taht i have a seprate individual price for each product, I have added a module of seprate shipping price, that workikng fine, now i want to add sales tax of 8% for produycts which are shipped from california. If i enable your contribution, then my individual shipping price dosnt work I need ur help in this regard, Login that is there is fine that u can only select only one ship[ping module(Flat/Tbale/Ind SHipping Price etc), Wiaitn for ur reply Regards, Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.