Forums / Managing Customers and Orders / Orders not showing up, order numbers don't match

Orders not showing up, order numbers don't match

Locked

Started by mangosmuggler on 24 Apr 2010, 7:38 PM · Views: 1,148

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
24 Apr 2010, 7:38 PM
#1
mangosmuggler avatar

mangosmuggler

New Zenner

Join Date:
Apr 2010
Posts:
4
Plugin Contributions:
0

Orders not showing up, order numbers don't match

Hope someone can help me with this...

My orders are not showing up in the Admin-->Customers-->Orders. I'm showing that there are Pending and Processing orders in the Admin home page, but can't see them when I click on them.

I made some test purchases and got some weird results: For example the order confirmation on the web page is 2147483654, but the email confirmation is -2147483642. (Yes, it's a negative number!). The next order would be 2147483655 on the web page, but the ocnfirmation email will show -2147483641.

The order history page for the customer account shows no orders, but shows 4 page navigation links: -4, -3, -2, -1. Negative numbers again. Clicking on any of the pages displays no orders.

I checked the database, and only test orders via the PayPal payment module show up in the database, not the Admin or Order History web pages. There is no sign of any of the non-PayPal orders.

I'm using v 1.3.8, and I used both the Classic Green template and one from templates13 called 2748.

I recently transferred the store from a different server to hostgator.com and followed the instructions posted on the zen-cart site. The database imported back correctly as all the products, customers etc. are showing. Just no orders.

Has anyone else experienced this?

24 Apr 2010, 7:56 PM
#2
drbyte avatar

drbyte

Sensei

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

Re: Orders not showing up, order numbers don't match

Those numbers are the maximum value allowed for order_id numbers. Since most people start at 1 it's normally not a problem.

So, your orders table is probably damaged. You'll probably need to reset the auto_increment to match the highest legitimate orders_id in the database.

Either that, or you mussed with the database to make your next order number show as a very long number, causing it to blow out the maximum value allowed.

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

24 Apr 2010, 8:07 PM
#3
mangosmuggler avatar

mangosmuggler

New Zenner

Join Date:
Apr 2010
Posts:
4
Plugin Contributions:
0

Re: Orders not showing up, order numbers don't match

DrByte:

Those numbers are the maximum value allowed for order_id numbers. Since most people start at 1 it's normally not a problem.

So, your orders table is probably damaged. You'll probably need to reset the auto_increment to match the highest legitimate orders_id in the database.

Either that, or you mussed with the database to make your next order number show as a very long number, causing it to blow out the maximum value allowed.
Thanks... So how do I go about resetting the the auto_increment? Can I change the order number to something lower? (None of the orders so far are real orders, just test orders)

Thanks again...

24 Apr 2010, 8:37 PM
#4
drbyte avatar

drbyte

Sensei

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

Re: Orders not showing up, order numbers don't match

If none of your orders are legitimate, then do the following.

NOTE: BOTH steps are required:

  1. Use your admin area to delete all orders. Yes, that means clicking on each one, one-by-one, and clicking the Delete button.
  2. After they're ALL deleted via the admin, run this command in Admin->Tools->Install SQL Patch:```
    truncate table orders;
**** NOTE: DO NOT DO STEP #2 UNTIL YOU HAVE DONE STEP #1 FIRST ****


After that, your next order should start at 1 again.
Test 2 or 3 orders, and make sure the numbers count up correctly.

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

24 Apr 2010, 8:42 PM
#5
mangosmuggler avatar

mangosmuggler

New Zenner

Join Date:
Apr 2010
Posts:
4
Plugin Contributions:
0

Re: Orders not showing up, order numbers don't match

DrByte:

If none of your orders are legitimate, then do the following.

NOTE: BOTH steps are required:

  1. Use your admin area to delete all orders. Yes, that means clicking on each one, one-by-one, and clicking the Delete button.
  2. After they're ALL deleted via the admin, run this command in Admin->Tools->Install SQL Patch:```
    truncate table orders;
> **** NOTE: DO NOT DO STEP #2 UNTIL YOU HAVE DONE STEP #1 FIRST ****
> 
> 
> After that, your next order should start at 1 again.
> Test 2 or 3 orders, and make sure the numbers count up correctly.
Thanks... However none of the orders displays in the Admin area, can I just go ahead and run the SQL truncate?  Thanks. Can I just delete all the records in the following databases from myPHPadmin?

    files_uploaded 
    orders * 
    orders_products * 
    orders_products_attributes * 
    orders_products_download * 
    orders_status_history 
    orders_total *
24 Apr 2010, 9:22 PM
#6
drbyte avatar

drbyte

Sensei

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

Re: Orders not showing up, order numbers don't match

Sure, but I think your problems are way more serious than that.
Based solely on what you described thus far, I anticipate that you'll have problems with registering new customers, and placing new orders, and more.

Did you change MySQL versions between servers?

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

24 Apr 2010, 10:59 PM
#7
mangosmuggler avatar

mangosmuggler

New Zenner

Join Date:
Apr 2010
Posts:
4
Plugin Contributions:
0

Re: Orders not showing up, order numbers don't match

I had a look at the SQL servers from the old server and the new one and you're right, old server was 4.1.22 and new one is 5.1.30. I guess I need to upgrade to 1.3.9 of the cart and reset the database. I could just import the product info, right?

Thanks for your info, it's much appreciated.

25 Apr 2010, 4:06 AM
#8
drbyte avatar

drbyte

Sensei

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

Re: Orders not showing up, order numbers don't match

Part of the formal upgrade instructions includes upgrading your complete database. That way your data is retained during the upgrade process.
https://www.zen-cart.com/tutorials/index.php?article=98

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