Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

No order data being entered into orders_total table!


Furrawn

Recommended Posts

Hi. Really hoping someone can help us out on this one... It's been months and we can't figure it out. :blink:

 

No data is being entered into our orders_total table when an order is placed. So we get the order, but not the shipping choice nor the total cost (!), and the orders aren't showing up on the Admin's order page. I'm not sure what was changed in our website that created the problem. I've tried using backup files for checkout_shipping.php, checkout_payment.php, & checkout_confirmation. I've looked at /classes/order.php and /classes/order_total.php but can't figure out where this problem can be fixed.

 

Here are some clues: on checkout_process.php, at around line 55, just after this:

 

$order_totals = $order_total_modules->process();

 

When I try print_r($order_totals); it just gives me this:

 

Array ( )

 

I don't think that's normal.

 

When I try print_r($order_total_modules); it gives me this:

 

order_total Object ( [modules] => )

 

Both print_r($payment_modules); and print_r($shipping_modules); give me the correct payment and shipping modules, so it seems those variables are there.

 

I think this is the code that's not functioning (around line 115 on checkout_process.php):

 

for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) {

$sql_data_array = array('orders_id' => $insert_id,

'title' => $order_totals[$i]['title'],

'text' => $order_totals[$i]['text'],

'value' => $order_totals[$i]['value'],

'class' => $order_totals[$i]['code'],

'sort_order' => $order_totals[$i]['sort_order']);

tep_db_perform(TABLE_ORDERS_TOTAL, $sql_data_array);

}

 

But I don't know why, and I'm going around in circles going crazy with this!

 

Anybody able to shed some light?

 

Hopefully!

Furrawn

Link to comment
Share on other sites

  • 3 weeks later...

I have exactly the same issue, I do know what has caused it in my case: hosting upgraded PHP (version unknown at this time) and MySQL to MySQL 4.1.21

 

I saw in the many topics, often related to the 1064 SQL error (which had the same cause in my case), that many people have this issue with NEW orders from the point the 1064 errors started.

 

The 1064 error is now fixed by simply downloading the latest version of OsCommerce and replacing the 2 split_page_results.php files.

 

But the issue of NEW orders not appearing in the customer console (account_history.php) with negative pagination and (probably related or the same bug) the order overview in the admin panel (orders.php?cID=XXX) still stands.

 

So, If anyone has found a fix on this issue or a link to it, please post it here!

 

Cheers!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...