Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

in os commerce we want to track the status of the order, filtered according to the status of that order i.e pending ,delivered,cancelled etc.


panjad

Recommended Posts

in os commerce i want to track the status of the order, filtered

according to the status of that order i.e pending ,delivered,cancelled

etc.

 

so if anyone have idea abt how to do that then plz post here asap

Link to comment
Share on other sites

I can't find the contribution where I got it from, but I added the code below to my catalog/admindir/includes/column_left.php file (i.e. the left hand column in the admin), it shows a list of orders at each state and each state is clickable - so if you clicked on the pending link, it will then display all orders where are pending. I found it far quicker to do this than filtering as per the above post

 

Just cut and page the text after the last ?> in the column_left.php file (and replace XXXXadminXXXX with your admin dir):

 

 

</table>

<table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft" style="margin-top:4px;">

<tr>

<td>

<?php

$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']) . '" class="menuBoxContentLink">' . $orders_status['orders_status_name'] . '</a>: <font size="1" color="brown">' . $orders_pending['count'] . '</font><br>';

}

$orders_contents = substr($orders_contents, 0, -4);

$heading = array();

$contents = array();

$heading[] = array('params' => 'class="menuBoxHeading" style="font-weight:bold;"',

'text' => '<a href="/XXXXadminXXXX/orders.php" style="text-decoration:none;"><b>Orders</b></a>');

$contents[] = array('params' => '',

'text' => $orders_contents);

$box = new box;

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

?>

</td>

</tr>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...