Forums / General Questions / Incorrect number of Pending Orders

Incorrect number of Pending Orders

Locked

Views: 4,304

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
21 Apr 2009, 1:34 AM
#1
mick9876 avatar

mick9876

New Zenner

Join Date:
Mar 2009
Location:
Melbourne, Australia
Posts:
13
Plugin Contributions:
0

Incorrect number of Pending Orders

Hello ZC Gurus,
In the bottom left corner of my Admin Home page, the number of Pending Orders shown is not correct. For example, the number currently shown is 9. However, when I click on "Pending:", it correctly shows me that I have in fact only 2 pending orders. Note: When I had only 1 pending order the Admin Home page was reporting 8, i.e. it is currently adding 7 to the real value.

Background Info:
New site; v1.3.8; never been upgraded; no addons installed.
This problem became apparent after I deleted about 40 test orders. It may have been there for a while.

Obviously I've customised my site to suit my business needs and as a newbie could have done something wrong.
Any input much appreciated.

21 Apr 2009, 2:51 AM
#2
mick9876 avatar

mick9876

New Zenner

Join Date:
Mar 2009
Location:
Melbourne, Australia
Posts:
13
Plugin Contributions:
0

Re: Incorrect number of Pending Orders

Adding to my original post, I have discovered that my test user appears to have 7 orders as per below:

**ID#1 Tom Tester **
Account Created: 09/03/2009
Last Modified: 21/04/2009
Last Logon: 21/04/2009
Number of Logons: 46
GV Balance $0.00
Number of Orders: 7
Last Order: 10/03/2009
Total: $225.00
Country: Australia
Number of Reviews: 2
Customer Referral
1st Discount Coupon

However, when I click on the Orders button to view Tom's orders, none appear.

I've been into the MYSQl db and reviewed the Orders table. I can see the 7 orders belonging to Tom Tester. The only difference between Tom's orders and all others is that Tom's don't have any delivery information - not sure if that is signifcant.
An option here is to delete the orders directly out of the db (as they are all only test orders), but I'm not sure of the consequences.
So the real problem here appears to be that Tom Tester does in fact have 7 orders (although i thought I had deleted them all) and they are not displaying.
Again, very grateful for any input.

21 Apr 2009, 4:57 AM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Incorrect number of Pending Orders

What is the orders_status value on each of those orders in the orders table?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

21 Apr 2009, 5:29 AM
#4
mick9876 avatar

mick9876

New Zenner

Join Date:
Mar 2009
Location:
Melbourne, Australia
Posts:
13
Plugin Contributions:
0

Re: Incorrect number of Pending Orders

All of Tom Tester's 7 orders have order_status=1.

21 Apr 2009, 5:53 AM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Incorrect number of Pending Orders

order_status = 1 refers to "Pending" status, which is why the number on the home page is including them.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

21 Apr 2009, 6:15 AM
#6
mick9876 avatar

mick9876

New Zenner

Join Date:
Mar 2009
Location:
Melbourne, Australia
Posts:
13
Plugin Contributions:
0

Re: Incorrect number of Pending Orders

OK. So the Admin Hompage is correctly reporting 9 pending orders and this is exactly what I see in the Orders table.
Also, the Customers page is correctly reporting that Tom Tester has 7 orders - again this is what I see in the Orders table.
The problem remains that I cant display Tom's 7 pending orders. They don't appear under pending orders and that don't appear under Tom's orders.
Also, I was under the impression I had deleted all of Tom's orders, but I may be mistaken. Is it possible that i attempted to delete all of Tom's orders while Tom was still logged on? Would that cause problems?

21 Apr 2009, 7:53 AM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Incorrect number of Pending Orders

mick9876:

The problem remains that I cant display Tom's 7 pending orders. They don't appear under pending orders and that don't appear under Tom's orders.That's because the display of order details in the search depends on matching data between at least 3 different tables, and thus it suggests that something has gone wrong when you deleted order data, causing it to leave partial records, resulting in incorrect search results because it's not finding the matches it expects.
mick9876:

Is it possible that i attempted to delete all of Tom's orders while Tom was still logged on? Would that cause problems?
No, managing customer order data whether they're logged in or not should have no effect, since customers cannot alter an order once it's placed and thus can't lock any database records which would affect deletion etc.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

21 Apr 2009, 11:05 AM
#8
mick9876 avatar

mick9876

New Zenner

Join Date:
Mar 2009
Location:
Melbourne, Australia
Posts:
13
Plugin Contributions:
0

Re: Incorrect number of Pending Orders

Thanks DrByte,
Based on your feedback I reviewed all of the orders related tables. I found Tom's problematic orders occurred in the "orders" and "orders_total" tables but not the "orders_products" or "orders_status_history" table. I made one unsuccessful attempt at reconstructing a complete set of order data - just to see if I could do it. But when this didn't work I just deleted all the partial order information and this cleared up the problem.
Thanks for your invaluable assistance.
Mick :smile: