Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Broke Customer Order Admin (NOT Paypal prob!)


Guest

Recommended Posts

Hey everyone..

So I installed something new on the site and after that I could not get any orders made with the Check/MO option to show up in admin. They were there of course, but not easily viewable to me. So i searched and found the answer and played around with the fix. Unfortunately, now my orders look WEIRD. First off they are listed from oldest to newest instead of newest to oldest. Secondly, each individual transaction shows up as a seperate order (but are still tied together in terms of deletion or updating), for example

 

Jane Doe spend $30 at my site, 3 $10 items and $10 shipping.

In my Order section it looks like this:

Jane Doe $10

Jane Doe $10

Jane Doe $10

Jane Doe $30

(if I were to delete this order, all 4 entries would dissappear)

 

 

Does anyone have any idea how to fix this? I did figure out which code in orders.php made this appear like this, but if I change that code back to the way it was, then I can't see any check/Mo orders without searching and deleting/restocking is going to be a nightmare.

 

Help! =)

Thanks,

Link to comment
Share on other sites

PS.. here is some additional info:

 

I got the Orders to show up by newest first finally.. so one problem is fixed, however, it still does the weird seperating thing. Here is the section of code in orders.php that I believe is controlling it:

 if (isset($HTTP_GET_VARS['cID'])) {
     $cID = tep_db_prepare_input($HTTP_GET_VARS['cID']);
     $orders_query_raw = "select o.orders_id, o.customers_name, o.customers_id, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from " . orders . " o left join " . orders_total . " ot on (o.orders_id = ot.orders_id), " . orders_status . " s where o.customers_id = '" . (int)$cID . "' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "'ot_total' order by o.orders_id DESC";
   } elseif (!empty($HTTP_GET_VARS['status'])) {
     $status = tep_db_prepare_input($HTTP_GET_VARS['status']);
     $orders_query_raw = "select o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from " . orders . " o left join " . orders_total . " ot on (o.orders_id = ot.orders_id), " . orders_status . " s where o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and s.orders_status_id = '" . (int)$status . "' 'ot_total' order by o.orders_id DESC";
   } else {
     $orders_query_raw = "select o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from " . orders . " o left join " . orders_total . " ot on (o.orders_id = ot.orders_id), " . orders_status . " s where o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' 'ot_total' order by o.orders_id DESC";
   }
 

 

Specifically the "''ot_total' order by o.orders_id DESC" that appears 3 times, which is modified from its original "'and ot.class= 'ot_total' order by o.orders_id DESC"

 

Thanks! =)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...