Zen Cart Logo
Forums / General Questions / Sales tax not being added to some orders

Sales tax not being added to some orders

Views: 959

Results 1 to 15 of 15
12 Aug 2021, 5:26 PM
#1
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Sales tax not being added to some orders

zc 1.5.7, just upgraded in July
php 7.3 (have now upgraded from 5.6 after this happened)
template - no issues with it / no mods that change core files

One order added sales tax but three orders later, sales tax is not included. No changes to the site during the week between the two.

I recently changed the order total to make sure it sets as late as possible before the order_total as it was iffy before:
up Discount ot_group_pricing 290
Gift Certificates ot_gv 840
Low Order Fee ot_loworderfee 400
Quantity Discount ot_quantity_discount
Shipping ot_shipping 200
Sub-Total ot_subtotal 100
Tax ot_tax 300
Total ot_total 999

There are no group or customer discounts at work in the site.

Comparing the two orders, the products are both turned on for taxable. Both orders are one product only.
Both the shipping and delivery addresses are california.

The client was complaining about this problem before the upgrade if I remember correctly. I had checked it and saw nothing wrong then so it wasn't until after the upgrade that I dug into this. I did see this issue when someone used a discount coupon and that's when I changed the sort order in order total. But neither recent order has a discount coupon.

I had another well-versed zencart person follow behind me to be sure I had checked all the appropriate things and don't think I left anything out here in this post.

Any ideas?

12 Aug 2021, 11:39 PM
#2
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Sales tax not being added to some orders

This should be a traceable problem - start by outputting the order calculations on each page of the checkout until the order confirmation page. Place the order, then review the order record in the database, find the point at which the numbers change or don't add up correctly.

You could also login as the customer using the browser/device they use to see what differences there are in the page-by-page output calculations on screen and be certain to check mobile because problems like to lurk there.

The calculation problem will reveal itself :smile:

13 Aug 2021, 11:38 AM
#3
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,100
Plugin Contributions:
56

Re: Sales tax not being added to some orders

Are the payment methods the same for the two orders?

13 Aug 2021, 5:04 PM
#4
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: Sales tax not being added to some orders

lat9:

Are the payment methods the same for the two orders?

Yes, credit card.

@twitchtoo - a little more than difficult on a live site - especially considering this appears to be random. Hoping for ideas.

13 Aug 2021, 5:31 PM
#5
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,100
Plugin Contributions:
56

Re: Sales tax not being added to some orders

delia:

Yes, credit card.

@twitchtoo - a little more than difficult on a live site - especially considering this appears to be random. Hoping for ideas.
Turn your credit-card payment method's debug on; at least you'll know if that's where the taxes are getting lost.

13 Aug 2021, 5:41 PM
#6
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: Sales tax not being added to some orders

never thought of that - but it is authorize.net. logs are now turned on!

17 Aug 2021, 9:07 PM
#7
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: Sales tax not being added to some orders

an order that didn't add tax was of a higher amount according to site owner. The aim log simply shows no tax without being tax exempt for that order. I have checked the order total modules and see no reason for an amount to affect this but it's over 75 or 100 that this happens to (I cannot say this is always the case but the last 3 seem to indicate this). I haven't tested this out yet myself (tomorrow!) but in case this triggers someone's memory?

10 Oct 2021, 2:47 PM
#8
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: Sales tax not being added to some orders

This just appears random - no pattern. doesn't matter the payment method or order amount. It started last Feb, with increasing frequency so she didn't notice for months. Site was upgraded to 1.5.7c from 1.5.6 this last July and the only file changes in Feb was to set the time zone which was overridden in the 1.5.7 upgrade and updated sitemap and Seo urls- again overridden in july. THERE ARE NO CORE FILES OVERRIDDEN.

I am at a complete loss and my client is getting upset.

x_ship_to_state] => California
[x_ship_to_zip] => 92354
[x_ship_to_country] => United States
[x_description] => Dead Rodent Odor Eliminator Bundle for 2 Rooms (qty: 1)
[x_recurring_billing] => NO
[x_customer_ip] => 76.174.160.221
[x_po_num] => Oct-10-2021 12:14:20
[x_freight] => 13.19
[x_tax_exempt] => FALSE
[x_tax] => 0
[x_duty] => 0
[x_device_type] => 8
[x_allow_partial_Auth] => FALSE
[Date] => October 10, 2021, 12:14 pm
[IP] => 76.174.160.221
[Session] => 211c3264b0cfc2fc4c5b18cd87c95460
[x_type] => AUTH_CAPTURE

10 Oct 2021, 2:54 PM
#9
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,100
Plugin Contributions:
56

Re: Sales tax not being added to some orders

... and the product has an associated 'Tax Class', right?

10 Oct 2021, 3:52 PM
#10
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: Sales tax not being added to some orders

yes checked in database

10 Oct 2021, 3:56 PM
#11
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,967
Plugin Contributions:
8

Re: Sales tax not being added to some orders

have you checked the state field for the address?

if i go to what i think is the problem site, and i go to create an account, the config looks problematic as there are 2 fields for the state. see:

Attachment 19751

you have a state pulldown as well as a state field for the user to enter (this does not occur with an account and editing an existing address).

its a pure guess, but i'm guessing the tax problem may be related to the config of the state field.

best.

10 Oct 2021, 4:00 PM
#12
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: Sales tax not being added to some orders

template issue? Same template over the past few years, only customer who has noted a problem. And no changes to the old template since 2019. I definitely need to fix that but I don't see how it can be involved here.

14 Oct 2021, 1:25 PM
#13
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: Sales tax not being added to some orders

Thanks to @carlwhat for the tip that led to the solution! It was template related and due to somefiles being left during the upgrade!

14 Oct 2021, 2:26 PM
#14
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,967
Plugin Contributions:
8

Re: Sales tax not being added to some orders

delia:

Thanks to @carlwhat for the tip that led to the solution! It was template related and due to somefiles being left during the upgrade!

:thumbsup:

glad i was able to help. but you did all of the heavy lifting!

best.

23 Oct 2021, 1:51 PM
#15
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: Sales tax not being added to some orders

Well, again a problem and the first thing I noticed before. Sales tax is not being assessed if the buyer uses a coupon. I changed the order total sort to bring the coupon before the sales tax but that did not work. I see nothing in coupon creation that could affect sales tax. Any ideas, friends?