Page 64 of 66 FirstFirst ... 14546263646566 LastLast
Results 631 to 640 of 655
  1. #631
    Join Date
    Apr 2019
    Posts
    292
    Plugin Contributions
    0

    Default Re: Local Sales Tax Mod - Support Thread

    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.

  2. #632
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,301
    Plugin Contributions
    125

    Default Re: Local Sales Tax Mod - Support Thread

    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.
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  3. #633
    Join Date
    Apr 2019
    Posts
    292
    Plugin Contributions
    0

    Default Re: Local Sales Tax Mod - Support Thread

    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?

  4. #634
    Join Date
    Apr 2019
    Posts
    292
    Plugin Contributions
    0

    Default Re: Local Sales Tax Mod - Support Thread

    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;
               } 

  5. #635
    Join Date
    Jun 2007
    Location
    Bronx, New York, United States
    Posts
    681
    Plugin Contributions
    8

    Default Re: Local Sales Tax Mod - Support Thread

    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. Find
    PHP Code:
    zen_get_countries(TEXT_ALL_COUNTRIES
    and replace with:
    PHP Code:
    zen_get_countries_for_admin_pulldown() 
    .
    3. Edit line 272. Find
    PHP Code:
    zen_get_countries(TEXT_ALL_COUNTRIES
    and replace with:
    PHP Code:
    zen_get_countries_for_admin_pulldown() 
    .

    This should fix the error in 1.5.8a.

  6. #636
    Join Date
    Jun 2007
    Location
    Bronx, New York, United States
    Posts
    681
    Plugin Contributions
    8

    Default Re: Local Sales Tax Mod - Support Thread

    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)

  7. #637
    Join Date
    Apr 2019
    Posts
    292
    Plugin Contributions
    0

    Default Re: Local Sales Tax Mod - Support Thread

    Quote Originally Posted by retched View Post
    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.
    Last edited by njcyx; 9 Dec 2024 at 10:07 PM.

  8. #638
    Join Date
    Jun 2007
    Location
    Bronx, New York, United States
    Posts
    681
    Plugin Contributions
    8

    Default Re: Local Sales Tax Mod - Support Thread

    Quote Originally Posted by njcyx View Post
    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.
    Actually managed to get it to work with the Squash Taxes module (they should just be combined at this point). I'm working on submitting my changes to both shortly. Still don't see why it was being added twice.

  9. #639
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,301
    Plugin Contributions
    125

    Default Re: Local Sales Tax Mod - Support Thread

    > 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.
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  10. #640
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,375
    Plugin Contributions
    94

    Default Re: Local Sales Tax Mod - Support Thread

    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+.

 

 

Similar Threads

  1. v151 Tax getting added twice after installing Local Sales Tax mod
    By RFree190 in forum General Questions
    Replies: 0
    Last Post: 19 Mar 2013, 05:10 AM
  2. v150 Problem with Local Sales Tax mod
    By pwithers in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 18 Jun 2012, 10:16 PM
  3. local sales tax mod not working
    By sharpie82 in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 2
    Last Post: 12 Dec 2011, 11:43 AM
  4. New York State Sales Tax by Zip Full Database for Local Sales Tax Mod 2011
    By SCHNiKEN in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 0
    Last Post: 11 Apr 2011, 04:51 AM
  5. Local Sales Tax Mod and Reward Points Mod
    By retched in forum Addon Payment Modules
    Replies: 1
    Last Post: 9 Feb 2011, 02:09 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR