Page 64 of 64 FirstFirst ... 1454626364
Results 631 to 635 of 635
  1. #631
    Join Date
    Apr 2019
    Posts
    245
    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
    9,703
    Plugin Contributions
    123

    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 Modifications
    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
    245
    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
    245
    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
    521
    Plugin Contributions
    3

    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.

 

 
Page 64 of 64 FirstFirst ... 1454626364

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