Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

No entries in orders table


Hide

Recommended Posts

Hi

 

I have modified a lot of things including shipping modules, but along the lines somewhere, new purchases are not entered into orders table.

 

Since osCommerce allows customers to enter multiple addresses into address book, I won't know which one he/she intends to send the order to unless it shows in order table as 'customer address' and 'delivery address'.

 

Where can I find the code that enters customer purchases into orders table. Anyone have any ideas ?

 

Thanks for your time.

Link to comment
Share on other sites

Hi

 

I did not touch checkout_process.php at all and it still has the code about customer_adderss, delivery_address, billing_address, etc

 

Is there an option I must have switched to off by accident that stops new orders to be entered into orders table ? Or does actual payment process by Paypal, etc has to trigger something on for orders to be entered into orders table ?

Link to comment
Share on other sites

It has to reach checkout_process.php. You may want to add some debugging code to see if it ever reaches checkout_process.php. Something like die("Made it!"); works in most cases. Note: while the debugging code is there, it definitely won't work. The debugging code is just to see if you are reaching a particular point.

 

Hth,

Matt

Link to comment
Share on other sites

Hi

 

It gives an error message if I put die after these codes, but it returns the die message if I put die code before these lines. Does anyone have checkout_process.php that I can compare ?

 

 

// load the before_process function from the payment modules

$payment_modules->before_process();

 

require(DIR_WS_CLASSES . 'order_total.php');

$order_total_modules = new order_total;

 

$order_totals = $order_total_modules->process();

 

$sql_data_array = array('customers_id' => $customer_id,

'customers_name' => $order->customer['firstname'] . ' ' . $order->customer['lastname'],

'customers_company' => $order->customer['company'],

'customers_street_address' => $order->customer['street_address'],

'customers_suburb' => $order->customer['suburb'],

'customers_city' => $order->customer['city'],

'customers_postcode' => $order->customer['postcode'],

'customers_state' => $order->customer['state'],

'customers_country' => $order->customer['country']['title'],

'customers_telephone' => $order->customer['telephone'],

'customers_email_address' => $order->customer['email_address'],

'customers_address_format_id' => $order->customer['format_id'],

'delivery_name' => $order->delivery['firstname'] . ' ' . $order->delivery['lastname'],

'delivery_company' => $order->delivery['company'],

'delivery_street_address' => $order->delivery['street_address'],

'delivery_suburb' => $order->delivery['suburb'],

'delivery_city' => $order->delivery['city'],

'delivery_postcode' => $order->delivery['postcode'],

'delivery_state' => $order->delivery['state'],

'delivery_country' => $order->delivery['country']['title'],

'delivery_address_format_id' => $order->delivery['format_id'],

'billing_name' => $order->billing['firstname'] . ' ' . $order->billing['lastname'],

'billing_company' => $order->billing['company'],

'billing_street_address' => $order->billing['street_address'],

'billing_suburb' => $order->billing['suburb'],

'billing_city' => $order->billing['city'],

'billing_postcode' => $order->billing['postcode'],

'billing_state' => $order->billing['state'],

'billing_country' => $order->billing['country']['title'],

'billing_address_format_id' => $order->billing['format_id'],

'payment_method' => $order->info['payment_method'],

'cc_type' => $order->info['cc_type'],

'cc_owner' => $order->info['cc_owner'],

'cc_number' => $order->info['cc_number'],

'cc_expires' => $order->info['cc_expires'],

'date_purchased' => 'now()',

'orders_status' => DEFAULT_ORDERS_STATUS_ID,

'comments' => $order->info['comments'],

'currency' => $order->info['currency'],

'currency_value' => $order->info['currency_value']);

tep_db_perform(TABLE_ORDERS, $sql_data_array);

$insert_id = tep_db_insert_id();

$size = sizeof($order_totals);

for ($i=0; $i<$size; $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);

}

 

$customer_notification = (SEND_EMAILS == 'true') ? '1' : '0';

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

'new_value' => DEFAULT_ORDERS_STATUS_ID,

'date_added' => 'now()',

'customer_notified' => $customer_notification);

tep_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array);

Link to comment
Share on other sites

  • 2 weeks later...

Question. Before a customer goes of site to a third party processor, is the orders table supposed to be updated? Or is that supposed to be done via the callback?

 

I am able to send the orders off to be processed. If I use COD the table gets updated. If I use an external credit company such as SecureTrading, the money is taken, but the orders table never has the order in it!

 

Regards.

Link to comment
Share on other sites

I am having the same problem. I can process a test order using COD & Check/Money Order option, but the Order is not showing up in my Customers/Orders area of the Admin Control Panel. However, if I type in the Order ID# at the top of the page, I can view the details of the order.

 

Any ideas?

 

Do I have to Admin the order to show a completed order?

Link to comment
Share on other sites

Thx for everything iiinet, I got it.

 

mocara : In most cases order table is updated by the callback since customers can just go of site to third party processor then cancel payment.

 

In-overtime : typed order id on top of page ? what page ? You could try to debug checkout_process.php like iiinet's post, see if it reaches checkout_process.php at all.

 

Hth

Link to comment
Share on other sites

Update::

 

While cruising thru the Admin CP of my cart, I came across the ORDER info in the reports area.

 

How confusing it was to click on the "Customers >> Orders" section in the left navigation menu, only to find the ORDERS area blank. I just now figured out that these must be "pending orders", not completed orders! The Syntax could be changed on the Admin CP page, which I did because I will be handing this cart off after polishing.

 

So, FYI for all of us that sometimes look at things literally, Completed purchases/transactions are in the "Reports >> Customer Orders - Total" area.

 

You can modify the descriptions in catalog/admin/includes/languages/english.php to read something a bit more compatible to what each section actually represents.

 

To Hide: Entered the Order# in the Admin CP in the "Customer >> Orders" area

Link to comment
Share on other sites

So is your problem solved now ?

 

All orders with completed payments should appear in Customers/Orders. From there you can edit the status of the order: pending, processing or delivered.

 

Check Localization/Order Status to see if you have 3 status there, pending, processing, delivered.

 

Hth

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...