I need a monitor in the kitchen to make orders from. So I've been trying to design a program to put all orders on the screen and clear them as they are completed instead of waiting on a printer. I redesigned your template to show only what I wanted on the "report" you made which is now my monitor screen. Then had some help adding ajax to clear the order when it was made. A meta refresh kept it active until all orders of the status selected were cleared. Then it reverted to the select status screen. A meta refresh there allowed any new orders under that status to automatically reappear on the screen. The problem I had is orders came in with two statuses. Your report only allowed one status at a time. The solution I have now puts a checkbox not a drop down list. Now you can select several statuses at once.
Code:
<?php
//$statuses_array = array();
$statuses = $db->Execute("select orders_status_id, orders_status_name
from " . TABLE_ORDERS_STATUS . "
where language_id = '" . (int)$_SESSION['languages_id'] . "'
order by orders_status_id");
while (!$statuses->EOF) {
echo '<label>' . zen_draw_checkbox_field('status_'.$statuses->fields['orders_status_id'], $statuses->fields['orders_status_id'], (($statuses->fields['orders_status_id'] == 1 || $statuses->fields['orders_status_id'] == 2) ? true : false)) . ' ' . $statuses->fields['orders_status_name'] . '</label>';
/*$statuses_array[] = array('id' => $statuses->fields['orders_status_id'],
'text' => $statuses->fields['orders_status_name'] . ' [' . $statuses->fields['orders_status_id'] . ']');*/
$statuses->MoveNext();
}
echo zen_draw_hidden_field('action', 'list');
//echo zen_draw_pull_down_menu('status', $statuses_array);
?>
I continue to be amazed at how zen-cart can be adapted to fit the needs of users that were probably never even thought of at the beginning of the project. It works so well universally in filling individual and specific needs.
Thank you to all!
Bookmarks