I've never found tax cloud to be a great solution - avalara has a paid module that works well.
Printable View
I've never found tax cloud to be a great solution - avalara has a paid module that works well.
batracy - would you consider letting me retrieve the tax info from your database so that I could upload it and others can get it? Just had a NY customer ask about it.
I have a question regarding this mod. If I configure it by county and then handle any exceptions to city if any, how does Zen-cart and or the mod decide what county the address belongs to?
I'm in South Carolina and the state has a 6% rate. Some counties charge up to 2.5% and some cities within the county may have their own addition.
For example Myrtle Beach is in Horry County so the tax for Myrtle Beach would be:
State: 6%
Horry County 1%
Myrtle Beach 1%
Total tax 8%
Being the address only has city and zip code, how will the Zen-cart and module calculate the tax to the proper 8% being I do not see how it knows its Horry County?
On the other hand, can someone tell me how to configure this mod? Also do I need to install the addressbookzone validation sql script or is it totally optional?
Is there anything we can do to help?
Greetings, if different tax rates for let's say 100 different counties and cities in one state are configured using this mod, do all 100 counties and cities show up in the drop-down menu during checkout? Thank you.
Terrific addition to ZC! Thank you! Am testing a statewide rule for Louisiana where rule is 70001-to-71497 and search field is set to Zip Code. On test orders to Sarasota, FL 34236 (shipping and billing) I am seeing 4% LA State Sales Tax. Two smaller delimited zip code lists for local parishes (counties) seem to work fine.
With 717 zip codes the delimited list seems like it would be a memory drain. Any advice? Thanks!
http://i.imgur.com/XtCuwj8.jpg
It looks like your zip codes overlap in the list, the mod is based on looking up the zip codes, you should not have any zip code listed twice, even it it is in a range. In your example ID 3 overlaps those in ID 1 and 2. This will give unexpected results, change the range to something not in the other lists.
The short answer is no. You can see just what happens by doing a test checkout on this site www.1potteryhouse.com
The site is based in Florida, and has 64 counties with varying tax rates setup based on zip codes. The mode looks at the zip code of the ship too address you enter and does a lookup in the database tables to find the tax rate. The customer only has to enter a valid address, the mod uses that information.
Thank you for the reply! Somehow missed getting notification email. So module would not support multiple rule matches? Eg if a county in state has a rate of its own I must make a single rule applying county and state for the zip codes in county. The another rule or rules for all other zips in state to just get state tax?
Has anyone seen or built a module to connect to the Washington State Tax API ? http://dor.wa.gov/Content/FindTaxesA...Interface.aspx
Hello I just downloaded this mod and have a question. I have the sales tax rate table by zip code for South Carolina. I see various zip codes consist of 2 or more counties and may have different rates for respective counties. Can this module handle this issue or if not how can I handle it?
thanks
I believe the module searches by zip code for the tax rate so whatever county name it has isn't going to matter. The name of the county is really only there to display for the customer in checkout. As long as you've got the zip code assigned it's proper tax rate, you should be fine.
Anyone tried this mod on 1.5.5f? I installed 2.5.3a version and it worked fine for tax rate calculation. However, sales tax rate for store pickup is incorrect. It should be based on my store zipcode, but it is actually based on the zipcode from shipping address.
Finally I found a walkaround solution for the previous issue. Here is the link: https://www.zen-cart.com/showthread....Menu-for-1-5-x
By this modification, you can limit this Pickup option to postcodes surrounding your physical store location. I modified the 1.5.5f version storepickup.php, and it worked good. You need to remove your store pickup module over admin page and install it back again. Also "Shipping Zone" option is blank after you install pickup module. You need to change it back to your default zone, otherwise it may not function properly.
I tried to use TaxCloud plug-in, but it looks like its registration process is very complicated.
I tried to installed this mode on 157 with php7.2, unfortunately it doesn't work. It generated warning log like following:
#1 require_once() called at [/public_html/test/includes/autoload_func.php:37]
#2 require(/public_html/test/includes/autoload_func.php) called at [/public_html/test/admin/includes/application_top.php:37]
#3 require(/public_html/test/admin/includes/application_top.php) called at [/public_html/test/admin/login.php:8]
#4 require(/public_html/test/admin/login.php) called at [/public_html/test/admin/index.php:11]
--> PHP Warning: require_once(includes/init_includes/init_local_sales_taxes_install.php): failed to open stream: No such file or directory in /public_html/test/includes/autoload_func.php on line 37.
[30-Sep-2020 14:05:28 America/Boise] PHP Fatal error: require_once(): Failed opening required 'includes/init_includes/init_local_sales_taxes_install.php' (include_path='.:/opt/cpanel/ea-php72/root/usr/share/pear') in /public_html/test/includes/autoload_func.php on line 37
Any alternatives other than TaxCloud? I need to collect tax based on county or zipcode.
does the fileactually exist in your site?Code:includes/init_includes/init_local_sales_taxes_install.php
Thanks for your reply. I re-upload all the files for this plug-in, and it worked on my 157! Thanks for your help!
There is a deprecated warning, and I added the following code to ot_local_sales_taxes.php and it is good now.
public function __construct()
{
// Constructor's functionality here, if you have any.
}
See note here: https://stackoverflow.com/questions/...tor-class-name
I love this mod and have used it for the last 2 years. I know that this has never been addressed due to how it calculates Tax. It's not doing it per item it just has a function that totals the order and kicks it out.
I need to be able to put the taxed item each into invoicing for billing purposes and I'm manually doing it now through an export and it's tedious. I did what they said to do by just removing the columns, but that just hides the problem.
Has anyone solved this problem?
Thanks!
I have the exact same issue now. If the customer uses 9-digit zipcode, his order will be "tax free". Plug-in version 2.5.3a. "$debug2" or "$myfield" are not existed any more. Here is how I changed my code, which is similar to the guide above.
At around line 86. Change the following code in includes\modules\order_total\ot_local_sales_taxes.php
To the followingCode:$apply_local_tax = check_for_datamach($taxrec['order_data'], $taxrec['matching_data']);
I tried it on my end (zc 1.57c, php7.4) and it seems to work good.Code:$apply_local_tax = check_for_datamach(substr($taxrec['order_data'], 0, 5), $taxrec['matching_data']);
Keywords for search: 9-digit, 9 digits, nine digits
Updated to fix various issues with newer PHP/Zen Cart.
Hi Swguy, I tested this plug-in on my test site, and I noticed that the previous two issues are not fixed.
One is the 9-digit zipcode issue. Once the customer entered 9-digit zipcode instead of 5 digit, his order will be "tax free". The fix is similar to my previous post.
Another is the tax rate for the store pickup. By test, if the customer selected store pickup option, the tax rate was charged by the zipcode in his shipping address, not the zipcode of my store. For pickup order, the tax should be charged by the zipcode of the store location, not by the shipping address.
Yep I just fixed PHP issues.
includes/modules/order_total/ot_local_sales_taxes.php line 43 (checking payment type = "quest") was an accidental inclusion that should be removed.
Hi Swguy. Can you please explain the "accidental inclusion" in details? Here is the line 43:
Do you mean change it to the following?PHP Code:
if (!empty($_SESSION['payment']) && $_SESSION['payment'] === 'quest') return [];
PHP Code:
if (!empty($_SESSION['payment']) && $_SESSION['payment'] === 'quest') return;
Just delete that whole line - unless you are a vendor in Alaska who takes Quest as a payment method, and does not need to charge sales tax for Quest-paid orders. :)
That is easy. Thanks!
It seems this plug-in (v2.6) doesn't work well with the zc group pricing (zc 1.57d). The tax rate is calculated based on the sub-total rate (before the group discount). The discount amount by group pricing is not used to calculate the tax. In the settings of my group discount, I set "Re-calculate Tax" option as standard, so the tax should be based on the sub-total minus discount amount.
I tried to set this option as "none" or "credit note", the result is unchanged. So it looks like no matter which option I set, it will be treated as "none".
This bug is not critical but hopefully it can be fixed later.
If you look at includes/modules/order_total/ot_local_sales_taxes.php line 129-139 - the block that starts with
if ($apply_tax_to_shipping) {
You could use some similar logic to back out the tax on the group discount amount.
Hi Swguy,
Thanks for your tip. I added the following code below your mentioned "if ($apply_tax_to_shipping)" section, and now it shows the correct group discount amount (calculated based on the total minus group discount). I don't think this way is proper but I don't know how to get the discount amount from the group pricing php file. I don't know if there is a public parameter for the group discount which I can use in this tax php file.
$tax_total_for_class_group_discount = '';
$tax_total_for_class_group_discount = zen_calculate_tax (($order->info['total'] - $order->info['tax'] - $order->info['shipping_cost']), $taxrec['tax']);
$tax_total_for_class = $tax_total_for_class_group_discount;
Also, now the total amount (last line of the checkout page) is incorrect/unchanged. How can I update the total amount?
Ok. The following code fixed the incorrect total amount issue. Still, I'm not sure if it is the proper way...
PHP Code:
$tax_total_for_class_group_discount = '';
$tax_total_diff = '';
$tax_total_for_class_group_discount = zen_calculate_tax (($order->info['total'] - $order->info['tax'] - $order->info['shipping_cost']), $taxrec['tax']);
$tax_total_diff = $tax_total_for_class - $tax_total_for_class_group_discount;
if($tax_total_diff > 0) {
$order->info['total'] -= $tax_total_diff;
$tax_total_for_class = $tax_total_for_class_group_discount;
}
Found that I was getting thrown Fatal errors on ZC 1.5.8/PHP 8.2 when trying to edit a tax rate in the backend. (When you would insert a row and click edit, you would not get the edit form and would generate a bunch of PHP errors in the log directory.) I made the following changes to get it to work:
1. Open YOUR_ADMIN/local_sales_taxes.php.
2. Edit line 255. Findand replace with:PHP Code:
zen_get_countries(TEXT_ALL_COUNTRIES)
.PHP Code:
zen_get_countries_for_admin_pulldown()
3. Edit line 272. Findand replace with:PHP Code:
zen_get_countries(TEXT_ALL_COUNTRIES)
.PHP Code:
zen_get_countries_for_admin_pulldown()
This should fix the error in 1.5.8a.
Looking for help.
Running the module, as is, running into two problems.
First, the module is adding the result local sales tax twice. I configured it for New York City which is New York State's 4% Sales Tax + NYC's 4.875%. Which totals 8.875%.
However, running an order through: The total tax being calculated is: The "state" sales tax of 4% + The City Tax of 4.875% + The City Tax of 4.875%. I went through and made sure the entry for the City was only entered once. But I cannot see where to stop the tax is being calculated twice.
Additionally, when the order is ran against a payment module: say PayPal, Stripe, Square, etc., the local sales tax module is completely bypassed and ignored.
Debugging the cart, I can see the per item tax is being calculated as 13.75% (aka 4% + 4.875% + 4.875%) and that the tax description is "State Tax + County Tax + County Tax".
Looking for any assistance on the matter.
EDIT: Seems this is kind of a known issue of sorts (https://www.zen-cart.com/showthread....-Sales-Tax-mod)
Just my 2C.
When I installed this plug-in, I disabled the original tax rate for my state, which is under locations/taxes - Tax Rates. I set the tax rate there to 0. I didn't delete it there. Then I only use local sales tax to calculate the total tax rate for every zipcode.
I'm not sure, if I didn't disable the zc tax rate, will it be double counted or not.
For your 2nd question, I'm using paypal legacy module. So on paypal end, it cannot see how much tax was charged for every order. But the total order amount is correct (goods+shipping+tax). In the past before I installed this plug-in, I can see a separate row in paypal transaction showing the tax.
But for other places such as order confirmation email or zc back end order details, I can see a separate row for the sales tax.
> Still don't see why it was being added twice.
I have seen the same issue. The order line items all look good, but the entry in orders_products.products_tax is doubled, as you note.
v3.0.0 of Local Sales Tax is now available for download: https://www.zen-cart.com/downloads.php?do=file&id=422
Released as a Zen Cart encapsulated plugin, supporting zc210+, EO 5.0.0+ and PHP 8.0+.
Small tweak: in readme_local_sales_tax.html, the h1 title is wrong. (Says "Optional/Required Shipping Insurance")
For anyone trying to use the 2.5.3 uninstall script to move up to 3.0.0, there is a problem with the uninstall script:
Around line 36 in /YOUR_ADMIN/includes/init_includes/init_local_sales_taxes_uninstall.php:
Replace with :PHP Code:
if(defined(MODULE_ORDER_TOTAL_COUNTY_LOCAL_TAX_STATUS)) {
This should clear the 500 server errors that pop up.PHP Code:
if(defined('MODULE_ORDER_TOTAL_COUNTY_LOCAL_TAX_STATUS')) {
BTW the doubling issue that both @retched and I experienced is resolved for new orders by this update. Thanks for your hard work, @lat9!
PHP 8.3 / ZC 2.1.0 / Local Sales Tax 3.0.0
Running into a problem. The module installs correctly (had to remove the Smash Taxes module changes). The table is currently set up for NY State (4.0%) and a tax rate based off of Zip Code (4.875%). However, checking out, I get the following:
https://i.imgur.com/qEJnGmd.png
The local sales tax rate works fine but for some reason the state sales tax isn't being calculated. When I disable the Local Sales Tax Plugin, the state sales tax is being calculated.
Should I just give up and dump the 4% onto the Local Sales tax table?
Do you have a 4% tax defined for the NY State zone?
Didn't you modify Squash Taxes to include state tax? Maybe check that logic or even uninstall Squash Taxes.
Possibly useful data point: I have ZC 2.1.0 + Latest Local Sales Tax, my LST rates *do* include State tax, but I have another state which is also taxed that does not use LST. Ordering with delivery to that state works as expected, with the native Zen Cart sales tax being applied properly.
I think that the local taxes are not applied for store pickup orders. When notify_order_cart_external_tax_rate_lookup() is called, $taxZoneId is the shipping address zone_id, not the store's zone_id. I do have "Store Pickup Tax Basis" in the local sales tax config set to the zone of the store.
I have posted a possible fix in the repo for this plugin's Issues section.
v3.0.1 of "Local Sales Tax" is now available for download: https://www.zen-cart.com/downloads.php?do=file&id=422
This release contains changes associated with these GitHub issues:
#5: Include state's base tax-rate in the local sales tax.
#6: Correct previous plugin removal; the base admin tool's name was local_sales_taxes.php.
#8: Incorrect tax-rate charged for storepickup orders.