so und jetzt noch die Ausgabe unter Kunden / Bestellungen
1. /admin/includes/languages/deu/orders.php
2. /admin/orders.php
Code: Alles auswählen
<td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr class="dataTableHeadingRow">
<td class="dataTableHeadingContent"></td>
<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_NUMBER; ?></td>
<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CUSTOMERS; ?></td>
<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ORDER_TOTAL; ?></td>
<td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_DATE_PURCHASED; ?></td>
<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_STATUS; ?></td>
<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td>
</tr>
<?php
if (isset($_GET['cID'])) {
$cID = oosDBPrepareInput($_GET['cID']);
$orders_result_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
" . $oosDBTable['orders'] . " o LEFT JOIN
" . $oosDBTable['orders_total'] . " ot
ON (o.orders_id = ot.orders_id),
" . $oosDBTable['orders_status'] . " s
WHERE
o.customers_id = '" . oosDBInput($cID) . "' AND
o.orders_status = s.orders_status_id AND
s.orders_languages_id = '" . intval($_SESSION['language_id']) . "' AND
ot.class = 'ot_total'
ORDER BY
orders_id DESC";
} elseif (isset($_GET['status'])) {
$status = oosDBPrepareInput($_GET['status']);
$orders_result_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
" . $oosDBTable['orders'] . " o LEFT JOIN
" . $oosDBTable['orders_total'] . " ot
ON (o.orders_id = ot.orders_id),
" . $oosDBTable['orders_status'] . " s
WHERE
o.orders_status = s.orders_status_id AND
s.orders_languages_id = '" . intval($_SESSION['language_id']) . "' AND
s.orders_status_id = '" . oosDBInput($status) . "' AND
ot.class = 'ot_total'
ORDER BY
o.orders_id DESC";
} else {
$orders_result_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
" . $oosDBTable['orders'] . " o LEFT JOIN
" . $oosDBTable['orders_total'] . " ot
ON (o.orders_id = ot.orders_id),
" . $oosDBTable['orders_status'] . " s
WHERE
o.orders_status = s.orders_status_id AND
s.orders_languages_id = '" . intval($_SESSION['language_id']) . "' AND
ot.class = 'ot_total'
ORDER BY
o.orders_id DESC";
}
$orders_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS, $orders_result_raw, $orders_result_numrows);
$orders_result = $db->Execute($orders_result_raw);
while ($orders = $orders_result->fields) {
if ((!isset($_GET['oID']) || (isset($_GET['oID']) && ($_GET['oID'] == $orders['orders_id']))) && !isset($oInfo)) {
$oInfo = new objectInfo($orders);
}
// customers_number
$mposr = "SELECT c.customers_number, c.customers_lastname
FROM " . $oosDBTable['customers'] . " c
WHERE c.customers_id = " . $orders['customers_id'] . "
ORDER BY c.customers_id";
$mpor = $db->Execute($mposr);
$abfr = $mpor->fields;
if (isset($oInfo) && is_object($oInfo) && ($orders['orders_id'] == $oInfo->orders_id)) {
echo ' <tr class="dataTableRowSelected" onmouseover="this.style.cursor=\'hand\'" onclick="document.location.href=\'' . oosLink($aFilename['orders'], oosGetAllGetParams(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=edit') . '\'">' . "\n";
} else {
echo ' <tr class="dataTableRow" onmouseover="this.className=\'dataTableRowOver\';this.style.cursor=\'hand\'" onmouseout="this.className=\'dataTableRow\'" onclick="document.location.href=\'' . oosLink($aFilename['orders'], oosGetAllGetParams(array('oID')) . 'oID=' . $orders['orders_id']) . '\'">' . "\n";
}
?>
<td class="dataTableContent"><?php echo '<a href="' . oosLink($aFilename['orders'], oosGetAllGetParams(array('oID', 'action')) . 'oID=' . $orders['orders_id'] . '&action=edit') . '">' . oosImage(OOS_ICONS . 'preview.gif', ICON_PREVIEW) . '</a> ' ; ?></td>
<td class="dataTableContent"><?php echo $abfr['customers_number']; ?></td>
<td class="dataTableContent"><?php echo '<a href="' . oosLink($aFilename['customers'], 'search=' . $abfr['customers_lastname'], 'NONSSL') . '">' . $orders['customers_name'] . '</a>'; ?></td>
<td class="dataTableContent" align="right"><?php echo strip_tags($orders['order_total']); ?></td>
<td class="dataTableContent" align="center"><?php echo oosDatetimeShort($orders['date_purchased']); ?></td>
<td class="dataTableContent" align="right"><?php echo $orders['orders_status_name']; ?></td>
<td class="dataTableContent" align="right"><?php if (isset($oInfo) && is_object($oInfo) && ($orders['orders_id'] == $oInfo->orders_id) ) { echo oosImage(OOS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . oosLink($aFilename['orders'], oosGetAllGetParams(array('oID')) . 'oID=' . $orders['orders_id']) . '">' . oosImage(OOS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td>
</tr>
<?php
$orders_result->MoveNext();
}
?>
da wird eigentlich nicht viel gemacht - eine weitere Spalte wird eingefügt eine kleine Sql Abfrage ausgeführt fertig...
Achso so und der Kundenname hat jetzt auch nen Link zum Profil des Kunden ....das ist extrem praktisch
Viel Spaß damit
ajp