Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2007
    Location
    Bronx, New York, United States
    Posts
    521
    Plugin Contributions
    3

    Default TaxCloud causing sales tax to be computed twice during order emails

    I'm running ZenCart 1.5.1 and the latest version available of the TaxCloud plugin.

    During checkout, I'm noticing a few things.

    Firstly, the emails are being sent out with the tax showing one decimal even though my ZenCart is configured to show all prices as two decimals. (I wound fixing this by using the inherent number_format() as a temporary fix. as below:

    BEFORE
    Around line 1194
    PHP Code:
    $ot['text'] = '$' $newValue
    Around line 1201
    PHP Code:
    $ot_tax['text'] = '$' $taxcloudTaxTotal
    AFTER

    PHP Code:
                        $ot['text'] = '$' number_format($newValueTAX_DECIMAL_PLACES);
    ...
                    
    $ot_tax['text'] = '$' number_format($taxcloudTaxTotal,TAX_DECIMAL_PLACES); 
    Secondly, I noticed that the emails are being sent out with the sales tax line being sent out twice and calculated twice in the emails. Even though the credit card/paypal account/etc. is only being charged for it once:

    Confirmation Email: (ignore the misformatting of the details, that's my own fault)



    Super Orders view of the order, I can confirm from phpMyAdmin that this still holds to be true:



    I found the relevant coding here to TaxCloud that MIGHT be causing this issue but am not sure. Any one mind taking any guess as I'm pulling out my hair over this:



    PHP Code:
        $TAXCLOUD_ENABLE func_taxcloud_is_enabled($shippingAddress['country_id']);    
       
        if (
    $TAXCLOUD_ENABLE =='true') {   
            
    $taxcloudTaxTotal $_SESSION['taxcloudTaxTotal'];       
            if ( isset(
    $taxcloudTaxTotal) && $taxcloudTaxTotal 0) {
                
    $index 0;
                foreach (
    $order_totals as $ot) {
                    if ( 
    $ot['code'] == 'ot_total' ) { 
                        
    $newValue $ot['value'] + $taxcloudTaxTotal;
                        
    $ot['value'] = $newValue;
                        
    $ot['text'] = '$' number_format($newValueTAX_DECIMAL_PLACES);
                        
                        
    $order_totals[$index 1] = $ot;
                                    
                    
    $ot_tax = Array();
                    
    $ot_tax['code'] = 'ot_tax';
                    
    $ot_tax['title'] = 'Sales Tax (to be collected):';
                    
    $ot_tax['text'] = '$' number_format($taxcloudTaxTotalTAX_DECIMAL_PLACES);
                    
    $ot_tax['value'] = $taxcloudTaxTotal;
                    
    $ot_tax['sort_order'] = 500;
                        
    $order_totals[$index] = $ot_tax;
                    } 
                    
    $index++;
                }
            }
        } 

  2. #2
    Join Date
    Jun 2007
    Location
    Bronx, New York, United States
    Posts
    521
    Plugin Contributions
    3

    Default Re: TaxCloud causing sales tax to be computed twice during order emails

    Also as a point of information, here is the view from the checkout_payment page:



    Here is it only listed once.

  3. #3
    Join Date
    Jun 2007
    Location
    Bronx, New York, United States
    Posts
    521
    Plugin Contributions
    3

    Default Re: TaxCloud causing sales tax to be computed twice during order emails

    I found out what the problem was with the double posting. There evidently is a conflict with the Rewards Point Suite's "ot_reward_points_display" order total module. Removing this module, or in fact disabling it, enables the sales tax to be calculated as normal. (I had the reward points display set to a sort order of 1000.)

 

 

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. Sales tax causing Free Shipping if order is under set amount
    By drex in forum Built-in Shipping and Payment Modules
    Replies: 6
    Last Post: 22 May 2009, 07:41 PM
  3. Sales Tax-Order for $50 or less don't pay sales Tax
    By jhobson in forum Basic Configuration
    Replies: 0
    Last Post: 4 Sep 2008, 05:08 PM
  4. Not calculating sales tax during checkout
    By GraniteMan44 in forum General Questions
    Replies: 3
    Last Post: 2 Mar 2008, 08:36 AM
  5. Sales Tax Does Not Calculate During Checkout
    By eDigitalExpress in forum Built-in Shipping and Payment Modules
    Replies: 9
    Last Post: 7 Aug 2006, 03:29 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