Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Database orders update problems


spottedhaggis

Recommended Posts

Hi all.

 

I have been having a nightmare problem that I just cannot figure out (I have had help from Nana on this to which I am most greatful)

 

Suddenly, and without any particular reason, though its likely an addon I put in thats the cause, orders do not show up in the admin section.

 

Added to this all email orders are displaying order number 0

 

Looking at the database, I can see that the following are correctly up to date with incremental order numbers

 

Orders - orders_id is correctly incremental

Orders_Products - Orders_id - is not correct and set to 0

Order_status_history - Orders_id - is not correct and set to 0

Orders_total - order_id - is not correct and set to 0

 

If I change them all manually in the database to the correctly incremental number I can see them all in orders through admin without issue, however the email the customer gets back has an order number 0 and the link they hvae to view the status is not accessable as it does not exist.

 

I am lost as to what I need to do to fix it.

 

can anyone help

Born - Scotland

Location - Kent, England

Job - hunting for one

Link to comment
Share on other sites

Hi all.

 

Suddenly, and without any particular reason, though its likely an addon I put in thats the cause, orders do not show up in the admin section.

 

I am lost as to what I need to do to fix it.

 

can anyone help

 

 

I have the same problem on one of the shops I maintain. As you say, must be a add-on that messed it up. I really need a fix for this too!! :blush:

Link to comment
Share on other sites

The only way at this moment I can get the orders to view in the admin panel, is to edit the orders, orders products, and all other orders tables to show that the specific order is the same order ID through out.

 

Seems Orders - Order_ID is fine and increments as it should when an order is placed, but all other Ordes_id in the database remain at 0 and thus are not viewable unless they are all set to the same number in Orders - orders_id.

 

Baffling.

 

Its got to be a code issue in a file, problem is I do not know what file it is that inserts the data and order number into the tables that are having the problem.

 

If anyone can tell me that I may be able to figure it out.

Born - Scotland

Location - Kent, England

Job - hunting for one

Link to comment
Share on other sites

Hi all, It is now resolved.

 

I had help from a good friend.

 

What did I do/we do

 

I restored a backup onto a different host, this was to see if it worked on anotherh host. This had already been done by my friend and his one worked, yet the exact same restored files did not work on mine.

 

We did this several times as it seemd the server restore function was flawed and some files were not changed.

 

I had to leave for an hour, and when I returned my friend had fixed it.

 

The isue seems to revolve around the /includes/functions/database.php file in conjunction with the following line in the /includes/configuration.php file

 

define('USE_PCONNECT', 'true'); // use persistent connections?

 

We set this to false and everything worked perfectly, however this was not a satisfactory fix because that function was there for a reason, so my firend did something with the database, I am not sure what at this time but when I speak with him agai I will find out, but what he did allowed me to enable the above function and the site now works perfectly (other than an issue of no address information appearing in either confirmation page, shipping page or the email sent out, oh and the admin section of orders (which now are VISIBLE)

 

So, in conclusion

 

Set the define above to false and see if everything works ok, if it does, then I guess we need to know if the database php file is a generic one, in which case you can have a copy of mine.

 

I hope this helps someone out of a jam, I spent an entire day and evening trying everything and nothing worked, typically its something as simple as this.

 

I believe the statement is for sessions, and setting it to false simply meanse a new connection must be established with the database each time the process is required, though its entirely possible I am totally wrong.

 

Mine works and thats all I wanted to achieve.

Born - Scotland

Location - Kent, England

Job - hunting for one

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...