phanchet Posted August 7, 2006 Share Posted August 7, 2006 Hi I have been reading up on the forums about the bizarre situation where sites run perfectly for ages then all of a sudden Orders no longer appear on the Order table - only in OrderCheck OrderCheck is a brilliant bit of code that really helps when payments fail for one reason or another However - if you happen to delete the most recent entry from the OrderCheck table (say Order 54) then there's a snag in this bit of code in this bit of checkout_process.php // ------------------------------------------------------------------------------------------ // OrderCheck $holding_orders_max_query = tep_db_query("select max('orders_id') as max_id from " . TABLE_HOLDING_ORDERS . ""); $holding_orders_max = tep_db_fetch_array($holding_orders_max_query); $insert_id = $holding_orders_max["max_id"]; // ------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------ // OrderCheck // Added 'orders_id' => $insert_id, to the list below $sql_data_array = array( 'orders_id' => $insert_id, .. the max value of the TABLE_HOLDING_ORDERS is one less that the max value in the ORDERS table (as you deleted it), so the update fails. Easy fix - place an order yourself, then edit the entry in the HOLDING table to have the same orders_id as the highest orders_id in the Orders table. They are then back in sync. Then remember to never delete from the OrderCheck table : (remove the delete button?) Better fix - the $insert_id should be the highest value in the OrderCheck AND Orders table, rather than just the highest in the OrderCheck table Hope that helps Phil Hanchet OneStopWebSystems.com Never Knowingly Understood Link to comment Share on other sites More sharing options...
GniDhal Posted August 19, 2006 Share Posted August 19, 2006 The new release of orderCheck would be fix this problem. http://www.oscommerce.com/community/contributions,1168 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.