Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Change the display order


sgreiner

Recommended Posts

Posted

When I am on the main page in the Admin. look at the left box titled Orders. I added the PayPal IPN contrib so I have a new entry in this box. What do I need to do so these status names are alphabetically rather then the order entered into the db?

"There is no doubt about precisely when folks began racing each other in automobiles. It was the day they built the second automobile." - Richard Petty

Posted

Where on the right do you mean? In the Admin--->Localization--->Orders Status there is no sort order option. Am I looking in the wrong place?

"There is no doubt about precisely when folks began racing each other in automobiles. It was the day they built the second automobile." - Richard Petty

Posted

admin/modules/payments. It will show:

Authorize.net

Credit Card

Cash on Delivery

iPayment 0

Check/Money Order 0

NOCHEX

PayPal 0

2CheckOut

PSiGate

SECPay

 

Just make them all zero instead of 1 2 3.... Make sense?? in the sort order column?

Posted

OK. That what I thought you were getting at. This is not what I need to do.

When you are on the MAIN Admin page, look at the left side. You have a box called orders. Inside of this box, it lists the summary of the orders by status: Pending, Processing, and Shipped. After I added the PayPal IPN contrib, I had to add a new status - which I called PayPal IPN. When the status is listed in this box, it pulls them from the DB by the order they are entered into the SQL table. I want to change the order to be alphabetically. I figure I need to modify the query to sort by alpha but I don't know exactly where to do this or how the code would be. Am I a more clear on this?

"There is no doubt about precisely when folks began racing each other in automobiles. It was the day they built the second automobile." - Richard Petty

Posted

Ok. This is what I have starting on line 25 in admin/index.php

  $box = new box;
 echo $box->menuBox($heading, $contents);

 echo '<br>';

 $orders_contents = '';
 $orders_status_query = tep_db_query("select orders_status_name, orders_status_id from " . TABLE_ORDERS_STATUS . " where language_id = '" . $languages_id . "'");
 while ($orders_status = tep_db_fetch_array($orders_status_query)) {
   $orders_pending_query = tep_db_query("select count(*) as count from " . TABLE_ORDERS . " where orders_status = '" . $orders_status['orders_status_id'] . "'");
   $orders_pending = tep_db_fetch_array($orders_pending_query);
   $orders_contents .= '<a href="' . tep_href_link(FILENAME_ORDERS, 'selected_box=customers&status=' . $orders_status['orders_status_id']) . '">' . $orders_status['orders_status_name'] . '</a>: ' . $orders_pending['count'] . '<br>';
 }
 $orders_contents = substr($orders_contents, 0, -4);

 

I think this is where the query is performed to show the status on the main admin page. I have tried a few things in here to do an "order by", but to no avail.

"There is no doubt about precisely when folks began racing each other in automobiles. It was the day they built the second automobile." - Richard Petty

Archived

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

×
×
  • Create New...