|
' . zen_image_button('button_reset.gif', IMAGE_RESET) . ' ';
}
?>
' . TEXT_INFO_SEARCH_DETAIL_FILTER . $keywords;
}
?>
|
|
' . zen_image_button('button_reset.gif', IMAGE_RESET) . ' ';
}
?>
' . TEXT_INFO_SEARCH_DETAIL_FILTER_ORDERS_PRODUCTS . zen_db_prepare_input($keywords_orders_products);
}
?>
|
|
info['payment_module_code']) {
if (file_exists(DIR_FS_CATALOG_MODULES . 'payment/' . $order->info['payment_module_code'] . '.php')) {
require(DIR_FS_CATALOG_MODULES . 'payment/' . $order->info['payment_module_code'] . '.php');
require(DIR_FS_CATALOG_LANGUAGES . $_SESSION['language'] . '/modules/payment/' . $order->info['payment_module_code'] . '.php');
$module = new $order->info['payment_module_code'];
// echo $module->admin_notification($oID);
}
}
?>
|
|
' . zen_image_button('button_back.gif', IMAGE_BACK) . ''; ?> |
|
|
|
customer['format_id'], $order->customer, 1, '', ' '); ?> |
|
|
customer['telephone']; ?> |
|
customer['email_address'] . '">' . $order->customer['email_address'] . ''; ?> |
|
info['ip_address']; ?> |
|
|
delivery['format_id'], $order->delivery, 1, '', ' '); ?> |
|
|
billing['format_id'], $order->billing, 1, '', ' '); ?> |
|
|
|
|
|
info['date_purchased']); ?> |
|
info['payment_method']; ?> |
info['cc_type']) || zen_not_null($order->info['cc_owner']) || zen_not_null($order->info['cc_number'])) {
?>
|
|
info['cc_type']; ?> |
|
info['cc_owner']; ?> |
|
info['cc_number'] . (zen_not_null($order->info['cc_number']) && !strstr($order->info['cc_number'],'X') && !strstr($order->info['cc_number'],'********') ? ' ' . TEXT_MASK_CC_NUMBER . '' : ''); ?> |
|
|
info['cc_cvv'] . (zen_not_null($order->info['cc_cvv']) && !strstr($order->info['cc_cvv'],TEXT_DELETE_CVV_REPLACEMENT) ? ' ' . TEXT_DELETE_CVV_FROM_DATABASE . '' : ''); ?> |
|
|
info['cc_expires']; ?> |
|
|
admin_notification($oID); ?>
|
|
|
|
|
|
|
|
products); $i<$n; $i++) {
echo ' ' . "\n" .
' ' . $order->products[$i]['qty'] . ' x | ' . "\n" .
' ' . $order->products[$i]['name'];
if (isset($order->products[$i]['attributes']) && (sizeof($order->products[$i]['attributes']) > 0)) {
for ($j = 0, $k = sizeof($order->products[$i]['attributes']); $j < $k; $j++) {
echo ' - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . nl2br(zen_output_string_protected($order->products[$i]['attributes'][$j]['value']));
if ($order->products[$i]['attributes'][$j]['price'] != '0') echo ' (' . $order->products[$i]['attributes'][$j]['prefix'] . $currencies->format($order->products[$i]['attributes'][$j]['price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ')';
if ($order->products[$i]['attributes'][$j]['product_attribute_is_free'] == '1' and $order->products[$i]['product_is_free'] == '1') echo TEXT_INFO_ATTRIBUTE_FREE;
echo '';
}
}
echo ' | ' . "\n" .
' ' . $order->products[$i]['model'] . ' | ' . "\n" .
' ' . zen_display_tax_value($order->products[$i]['tax']) . '% | ' . "\n" .
' ' .
$currencies->format($order->products[$i]['final_price'], true, $order->info['currency'], $order->info['currency_value']) .
($order->products[$i]['onetime_charges'] != 0 ? ' ' . $currencies->format($order->products[$i]['onetime_charges'], true, $order->info['currency'], $order->info['currency_value']) : '') .
' | ' . "\n" .
' ' .
$currencies->format(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) .
($order->products[$i]['onetime_charges'] != 0 ? ' ' . $currencies->format(zen_add_tax($order->products[$i]['onetime_charges'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) : '') .
' | ' . "\n" .
' ' .
$currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) .
($order->products[$i]['onetime_charges'] != 0 ? ' ' . $currencies->format($order->products[$i]['onetime_charges'], true, $order->info['currency'], $order->info['currency_value']) : '') .
' | ' . "\n" .
' ' .
$currencies->format(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) .
($order->products[$i]['onetime_charges'] != 0 ? ' ' . $currencies->format(zen_add_tax($order->products[$i]['onetime_charges'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) : '') .
' | ' . "\n";
echo ' ' . "\n";
}
?>
totals); $i < $n; $i++) {
echo ' ' . "\n" .
' ' . $order->totals[$i]['title'] . ' | ' . "\n" .
' ' . $order->totals[$i]['text'] . ' | ' . "\n" .
' ' . "\n";
}
?>
|
|
|
|
|
|
|
Execute("select orders_status_id, date_added, customer_notified, comments
from " . TABLE_ORDERS_STATUS_HISTORY . "
where orders_id = '" . zen_db_input($oID) . "'
order by date_added");
if ($orders_history->RecordCount() > 0) {
while (!$orders_history->EOF) {
echo ' ' . "\n" .
' ' . zen_datetime_short($orders_history->fields['date_added']) . ' | ' . "\n" .
' ';
if ($orders_history->fields['customer_notified'] == '1') {
echo zen_image(DIR_WS_ICONS . 'tick.gif', ICON_TICK) . " | \n";
} else {
echo zen_image(DIR_WS_ICONS . 'cross.gif', ICON_CROSS) . "\n";
}
echo ' ' . $orders_status_array[$orders_history->fields['orders_status_id']] . ' | ' . "\n";
echo ' ' . nl2br(zen_db_output($orders_history->fields['comments'])) . ' | ' . "\n" .
' ' . "\n";
$orders_history->MoveNext();
}
} else {
echo ' ' . "\n" .
' ' . TEXT_NO_ORDER_HISTORY . ' | ' . "\n" .
' ' . "\n";
}
?>
|
|
|
|
|
info['orders_status']); ?> |
|
|
|
|
|
' . zen_image_button('button_invoice.gif', IMAGE_ORDERS_INVOICE) . ' ' . zen_image_button('button_packingslip.gif', IMAGE_ORDERS_PACKINGSLIP) . ' ' . zen_image_button('button_orders.gif', IMAGE_ORDERS) . ''; ?> |
Execute("select order_id, unique_id
from " . TABLE_COUPON_GV_QUEUE ."
where order_id = '" . $_GET['oID'] . "' and release_flag='N' limit 1");
if ($gv_check->RecordCount() > 0) {
$goto_gv = '' . zen_image_button('button_gift_queue.gif',IMAGE_GIFT_QUEUE) . '';
echo ' ';
echo ' ';
echo $goto_gv . ' ';
echo ' | ';
echo '
| ';
}
?>
|
|
|
'', 'text' => TEXT_ALL_ORDERS)), $orders_statuses), $_GET['status'], 'onChange="this.form.submit();"');
echo zen_hide_session_id();
?>
|
|
|
|
|
|
|
|
|
|
|
|
I SEE A: ' . $orders_query_raw . '
';
} elseif ($_GET['status'] != '') {
$status = zen_db_prepare_input($_GET['status']);
$orders_query_raw = "select o.orders_id, o.customers_id, o.customers_name, o.payment_method, o.shipping_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total" .
$new_fields . "
from (" . TABLE_ORDERS . " o, " .
TABLE_ORDERS_STATUS . " s " .
$new_table . ")
left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id) " . "
where o.orders_status = s.orders_status_id and s.language_id = '" . (int)$_SESSION['languages_id'] . "' and s.orders_status_id = '" . (int)$status . "' and ot.class = 'ot_total' " .
$search . " order by o.orders_id DESC";
//echo '
I SEE B: ' . $orders_query_raw . '
';
} else {
$orders_query_raw = "select " . $search_distinct . " o.orders_id, o.customers_id, o.customers_name, o.payment_method, o.shipping_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total" .
$new_fields . "
from (" . TABLE_ORDERS . " o, " .
TABLE_ORDERS_STATUS . " s " .
$new_table . ")
left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id) " . "
where (o.orders_status = s.orders_status_id and s.language_id = '" . (int)$_SESSION['languages_id'] . "' and ot.class = 'ot_total') " .
$search . " order by o.orders_id DESC";
//echo '
I SEE C: ' . $orders_query_raw . '
';
}
// Split Page
// reset page when page is unknown
if (($_GET['page'] == '' or $_GET['page'] <= 1) and $_GET['oID'] != '') {
$check_page = $db->Execute($orders_query_raw);
$check_count=1;
if ($check_page->RecordCount() > MAX_DISPLAY_SEARCH_RESULTS_ORDERS) {
while (!$check_page->EOF) {
if ($check_page->fields['orders_id'] == $_GET['oID']) {
break;
}
$check_count++;
$check_page->MoveNext();
}
$_GET['page'] = round((($check_count/MAX_DISPLAY_SEARCH_RESULTS_ORDERS)+(fmod_round($check_count,MAX_DISPLAY_SEARCH_RESULTS_ORDERS) !=0 ? .5 : 0)),0);
} else {
$_GET['page'] = 1;
}
}
// $orders_query_numrows = '';
$orders_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS_ORDERS, $orders_query_raw, $orders_query_numrows);
$orders = $db->Execute($orders_query_raw);
while (!$orders->EOF) {
if ((!isset($_GET['oID']) || (isset($_GET['oID']) && ($_GET['oID'] == $orders->fields['orders_id']))) && !isset($oInfo)) {
$oInfo = new objectInfo($orders->fields);
}
if (isset($oInfo) && is_object($oInfo) && ($orders->fields['orders_id'] == $oInfo->orders_id)) {
echo ' ' . "\n";
} else {
echo ' ' . "\n";
}
$show_difference = '';
if (($orders->fields['delivery_name'] != $orders->fields['billing_name'] and $orders->fields['delivery_name'] != '')) {
$show_difference = zen_image(DIR_WS_IMAGES . 'icon_status_red.gif', TEXT_BILLING_SHIPPING_MISMATCH, 10, 10) . ' ';
}
if (($orders->fields['delivery_street_address'] != $orders->fields['billing_street_address'] and $orders->fields['delivery_street_address'] != '')) {
$show_difference = zen_image(DIR_WS_IMAGES . 'icon_status_red.gif', TEXT_BILLING_SHIPPING_MISMATCH, 10, 10) . ' ';
}
$show_payment_type = $orders->fields['payment_module_code'] . ' ' . $orders->fields['shipping_module_code'];
?>
fields['orders_id']; ?> |
|
fields['customers_id'], 'NONSSL') . '">' . zen_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW . ' ' . TABLE_HEADING_CUSTOMERS) . ' ' . $orders->fields['customers_name'] . ($orders->fields['customers_company'] != '' ? ' ' . $orders->fields['customers_company'] : ''); ?> |
fields['order_total']); ?> |
fields['date_purchased']); ?> |
fields['orders_status_name']; ?> |
fields['orders_id']) == '' ? '' : zen_image(DIR_WS_IMAGES . 'icon_yellow_on.gif', TEXT_COMMENTS_YES, 16, 16)); ?> |
fields['orders_id'] . '&action=edit', 'NONSSL') . '">' . zen_image(DIR_WS_IMAGES . 'icon_edit.gif', ICON_EDIT) . ''; ?>fields['orders_id'] == $oInfo->orders_id)) { echo zen_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '' . zen_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . ''; } ?> |
MoveNext();
}
?>
display_count($orders_query_numrows, MAX_DISPLAY_SEARCH_RESULTS_ORDERS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_ORDERS); ?> |
display_links($orders_query_numrows, MAX_DISPLAY_SEARCH_RESULTS_ORDERS, MAX_DISPLAY_PAGE_LINKS, $_GET['page'], zen_get_all_get_params(array('page', 'oID', 'action'))); ?> |
' . zen_image_button('button_reset.gif', IMAGE_RESET) . '';
if (isset($_GET['search']) && zen_not_null($_GET['search'])) {
$keywords = zen_db_input(zen_db_prepare_input($_GET['search']));
echo ' ' . TEXT_INFO_SEARCH_DETAIL_FILTER . $keywords;
}
?>
|
|
|
'' . TEXT_INFO_HEADING_DELETE_ORDER . '');
$contents = array('form' => zen_draw_form('orders', FILENAME_ORDERS, zen_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=deleteconfirm', 'post', '', true));
// $contents[] = array('text' => TEXT_INFO_DELETE_INTRO . '
' . $cInfo->customers_firstname . ' ' . $cInfo->customers_lastname . '');
$contents[] = array('text' => TEXT_INFO_DELETE_INTRO . '
' . ENTRY_ORDER_ID . $oInfo->orders_id . ' ' . $oInfo->order_total . ' ' . $oInfo->customers_name . ($oInfo->customers_company != '' ? ' ' . $oInfo->customers_company : '') . '');
$contents[] = array('text' => ' ' . zen_draw_checkbox_field('restock') . ' ' . TEXT_INFO_RESTOCK_PRODUCT_QUANTITY);
$contents[] = array('align' => 'center', 'text' => ' ' . zen_image_submit('button_delete.gif', IMAGE_DELETE) . ' ' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '');
break;
default:
if (isset($oInfo) && is_object($oInfo)) {
$heading[] = array('text' => '[' . $oInfo->orders_id . '] ' . zen_datetime_short($oInfo->date_purchased) . '');
$contents[] = array('align' => 'center', 'text' => '' . zen_image_button('button_edit.gif', IMAGE_EDIT) . ' ' . zen_image_button('button_delete.gif', IMAGE_DELETE) . '');
$contents[] = array('align' => 'center', 'text' => '' . zen_image_button('button_invoice.gif', IMAGE_ORDERS_INVOICE) . ' ' . zen_image_button('button_packingslip.gif', IMAGE_ORDERS_PACKINGSLIP) . '');
$contents[] = array('text' => ' ' . TEXT_DATE_ORDER_CREATED . ' ' . zen_date_short($oInfo->date_purchased));
$contents[] = array('text' => ' ' . $oInfo->customers_email_address);
$contents[] = array('text' => TEXT_INFO_IP_ADDRESS . ' ' . $oInfo->ip_address);
if (zen_not_null($oInfo->last_modified)) $contents[] = array('text' => TEXT_DATE_ORDER_LAST_MODIFIED . ' ' . zen_date_short($oInfo->last_modified));
$contents[] = array('text' => ' ' . TEXT_INFO_PAYMENT_METHOD . ' ' . $oInfo->payment_method);
$contents[] = array('text' => ' ' . ENTRY_SHIPPING . ' ' . $oInfo->shipping_method);
// check if order has open gv
$gv_check = $db->Execute("select order_id, unique_id
from " . TABLE_COUPON_GV_QUEUE ."
where order_id = '" . $oInfo->orders_id . "' and release_flag='N' limit 1");
if ($gv_check->RecordCount() > 0) {
$goto_gv = '' . zen_image_button('button_gift_queue.gif',IMAGE_GIFT_QUEUE) . '';
$contents[] = array('text' => ' ' . zen_image(DIR_WS_IMAGES . 'pixel_black.gif','','100%','3'));
$contents[] = array('align' => 'center', 'text' => $goto_gv);
}
}
// indicate if comments exist
$orders_history_query = $db->Execute("select orders_status_id, date_added, customer_notified, comments from " . TABLE_ORDERS_STATUS_HISTORY . " where orders_id = '" . $oInfo->orders_id . "' and comments !='" . "'" );
if ($orders_history_query->RecordCount() > 0) {
$contents[] = array('align' => 'left', 'text' => ' ' . TABLE_HEADING_COMMENTS);
}
$contents[] = array('text' => ' ' . zen_image(DIR_WS_IMAGES . 'pixel_black.gif','','100%','3'));
$order = new order($oInfo->orders_id);
$contents[] = array('text' => 'Products Ordered: ' . sizeof($order->products) );
for ($i=0; $iproducts); $i++) {
$contents[] = array('text' => $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name']);
if (sizeof($order->products[$i]['attributes']) > 0) {
for ($j=0; $jproducts[$i]['attributes']); $j++) {
$contents[] = array('text' => ' - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . nl2br(zen_output_string_protected($order->products[$i]['attributes'][$j]['value'])) . '' );
}
}
if ($i > MAX_DISPLAY_RESULTS_ORDERS_DETAILS_LISTING and MAX_DISPLAY_RESULTS_ORDERS_DETAILS_LISTING != 0) {
$contents[] = array('align' => 'left', 'text' => TEXT_MORE);
break;
}
}
if (sizeof($order->products) > 0) {
$contents[] = array('align' => 'center', 'text' => '' . zen_image_button('button_edit.gif', IMAGE_EDIT) . '');
}
break;
}
if ( (zen_not_null($heading)) && (zen_not_null($contents)) ) {
echo ' ' . "\n";
$box = new box;
echo $box->infoBox($heading, $contents);
echo ' | ' . "\n";
}
?>
|
|